Skip to content

Commit d615c0a

Browse files
author
childish-sambino
authored
chore: drop the docker and services stuff (#130)
1 parent b3e6171 commit d615c0a

File tree

138 files changed

+6
-26131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+6
-26131
lines changed

.travis.yml

-23
This file was deleted.

CONTRIBUTING.md

-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Hello! Thank you for choosing to help contribute to one of the SendGrid open sou
77
- [Improvements to the Codebase](#improvements-to-the-codebase)
88
- [How we use branches](#how-we-use-branches)
99
- [Development Environment](#development-environment)
10-
- [Using Docker](#using-docker)
1110
- [Install and Run Locally](#install-and-run-locally)
1211
- [Prerequisites](#prerequisites)
1312
- [Initial setup:](#initial-setup)
@@ -69,9 +68,6 @@ All PRs and changes will be made to the `main` branch.
6968

7069
### Development Environment ###
7170

72-
#### Using Docker ####
73-
You can use our Docker image to avoid setting up the development environment yourself. See [USAGE.md](docker/USAGE.md).
74-
7571
#### Install and Run Locally ####
7672

7773
##### Prerequisites #####
@@ -91,7 +87,6 @@ cd dx-automator
9187

9288
Please see the Installation section in the README
9389

94-
9590
<a name="style-guidelines-and-naming-conventions"></a>
9691

9792
## Style Guidelines & Naming Conventions
@@ -106,18 +101,6 @@ Please run your code through:
106101
- [pylint](https://www.pylint.org/)
107102
- [pep8](https://pypi.python.org/pypi/pep8)
108103

109-
## Debugging
110-
111-
`docker logs <name of service>`
112-
113-
To ensure your logging gets written in the container, within your Python app:
114-
115-
```
116-
import sys
117-
sys.stderr.write("")
118-
sys.stderr.write("\n")
119-
```
120-
121104
## Creating a Pull Request<a name="creating-a-pull-request"></a>
122105

123106
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,

README.md

+6-197
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
# The Developer Experience (DX) Automator
22

3-
This tool is intended to help make managing multiple Github repositories much easier for DX, DevRel, and Open Source Engineering teams.
4-
5-
We will deploy the code to pypi and create an initial release once the MVP is ready. Thank you for your support!
6-
7-
**The default branch name for this repository has been changed to `main` as of 07/23/2020.**
3+
This tool is intended to help make managing multiple GitHub repositories much easier for DX, DevRel, and Open Source Engineering teams.
84

95
## Contributing
10-
Everyone who participates in our repo is expected to comply with our [Code of Conduct](CODE_OF_CONDUCT.md).
11-
12-
We welcome [contributions](CONTRIBUTING.md) in the form of issues, pull requests and code reviews. Or you can simply shoot us an [email](mailto:[email protected]).
13-
14-
## Attributions
15-
We believe in open source and want to give credit where it's due. We used an amazing tutorial at [testdriven.io](https://testdriven.io) to guide us in setting up a solid foundation using flask, docker, and (eventually) node and react. This tutorial helped us build and iterate this project successfully!
16-
17-
## Prerequisites
18-
19-
* Virtual Box
20-
* Docker
216

22-
## Usage - Local
7+
Everyone who participates in our repo is expected to comply with our [Code of Conduct](CODE_OF_CONDUCT.md).
238

24-
### Standalone Scripts
9+
We welcome [contributions](CONTRIBUTING.md) in the form of issues, pull requests and code reviews.
2510

26-
Some example scripts don't require a running Automator web server to execute (e.g., `action_items`, `metrics`, `opened_items`, `closed_items`). Use the steps below to run these scripts.
11+
## Usage - Standalone Scripts
2712

28-
#### Environment Setup
13+
### Environment Setup
2914

3015
Update the development environment with your [GITHUB_TOKEN](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line), for example:
3116

@@ -40,186 +25,10 @@ make install
4025
source venv/bin/activate
4126
```
4227

43-
#### Running Scripts
28+
### Running Scripts
4429

4530
```bash
4631
python ./examples/action_items.py
4732
python ./examples/metrics.py daily
4833
python ./examples/metrics.py weekly
4934
```
50-
51-
### Create Local Docker Machine
52-
53-
```bash
54-
docker-machine create -d virtualbox dx-automator-dev
55-
```
56-
57-
### Deploy Locally
58-
59-
Setup your environment variables:
60-
61-
```bash
62-
cp ./services/github/.env_sample ./services/github/.env
63-
cp ./services/looker/.env_sample ./services/looker/.env
64-
cp ./services/hacktoberfest/.env_sample ./services/hacktoberfest/.env
65-
```
66-
67-
Start:
68-
69-
```bash
70-
source ./init.sh
71-
```
72-
73-
Run these commands to test if everything is working correctly.
74-
75-
```bash
76-
curl http://$DX_IP/tasks/ping/pong
77-
curl http://$DX_IP/tasks
78-
curl http://$DX_IP/users/ping
79-
curl http://$DX_IP/users
80-
curl http://$DX_IP/github/ping
81-
curl http://$DX_IP/github/members // must have the proper authorization
82-
curl http://$DX_IP/github/is_member/<github_username> // check if a paricular GitHub username is part of your GitHub organization
83-
curl --globoff "http://$DX_IP/github/items?repo=<repo_name>&issue_type=<issues or pull_requests>&labels[]=<label 1>?labels[]=<label 2>&states[]=<state 1>&states[]=<state 2>&limits[]=first&limits[]=100"
84-
curl http://$DX_IP/looker/ping
85-
curl http://$DX_IP/looker/4404
86-
curl http://$DX_IP/hacktoberfest/ping
87-
curl http://$DX_IP/hacktoberfest/sendgrid/leaders/2018
88-
```
89-
90-
Grab the IP address.
91-
92-
```
93-
echo $DX_IP
94-
```
95-
96-
And now paste that IP into your browser and you should see a task list.
97-
98-
### Stop Local Containers and the Docker Machine
99-
100-
```bash
101-
source ./stop.sh
102-
```
103-
104-
### Stop Local Containers and Delete Images and the Docker Machine
105-
106-
```bash
107-
source ./kill.sh
108-
```
109-
110-
### Connect to the Local DB
111-
112-
```bash
113-
docker-compose -f docker-compose-dev.yml exec users-db psql -U postgres
114-
# \c users_dev
115-
# select * from users;
116-
# \q
117-
```
118-
119-
### Connect to a service's container and enter a Bash prompt
120-
121-
```bash
122-
docker exec -it <container name> /bin/bash
123-
```
124-
125-
### Admin Commands
126-
127-
#### Restart a Particular Service
128-
129-
```bash
130-
docker-compose -f docker-compose-dev.yml restart <Name of Service>
131-
```
132-
133-
#### Run a Particular Test within a Python Service
134-
135-
```bash
136-
docker-compose -f docker-compose-dev.yml run <service> python3 -m unittest <path.to.test>
137-
```
138-
139-
For example
140-
141-
```bash
142-
docker-compose -f docker-compose-dev.yml run tasks python3 -m unittest project.tests.test_tasks
143-
```
144-
145-
#### Update the Hacktoberfest leaderboard
146-
147-
```bash
148-
curl http://$DX_IP/hacktoberfest/leaders/update
149-
```
150-
151-
#### Populate the local DB with all open GitHub issues and PRs
152-
153-
Note that by running this script a backup will be created with a file format of `tasks-db-backup.[current time stamp]`.
154-
155-
```bash
156-
./scripts/init-task-db
157-
docker-compose -f docker-compose-dev.yml exec tasks-db psql -U postgres
158-
# \c tasks_dev
159-
# select * from tasks;
160-
# \q
161-
```
162-
163-
### Examples
164-
165-
#### Get a List of the Top 20 Issues or PRs
166-
167-
```bash
168-
./scripts/init-task-db
169-
python3 examples/update_rice_scores.py
170-
python3 examples/rice_sorted_list_of_issues_and_prs.py
171-
```
172-
173-
#### Retrieve all open and unlabeled issues
174-
175-
```bash
176-
python ./examples/unlabeled_issues.py
177-
```
178-
179-
#### Retrieve all open issues that are bugs
180-
181-
```bash
182-
python ./examples/open_security_issues.py
183-
```
184-
185-
#### Retrieve all open issues that are security related
186-
187-
```bash
188-
python ./examples/open_bugs.py
189-
```
190-
191-
#### Retrieve all open issues that need a follow up response
192-
193-
```bash
194-
python ./examples/follow_up.py
195-
```
196-
197-
#### Retrieve all open prs that need a code review
198-
```bash
199-
python ./examples/code_review.py
200-
```
201-
202-
#### Retrieve a list of releases for each repo
203-
204-
```bash
205-
python ./examples/releases.py
206-
```
207-
208-
## Usage - Cloud
209-
210-
### Create AWS Docker Machine
211-
212-
```bash
213-
docker-machine create --driver amazonec2 dx-automator-prod
214-
```
215-
216-
### Deploy to AWS
217-
218-
```bash
219-
docker-machine env dx-automator-prod
220-
eval $(docker-machine env dx-automator-prod)
221-
docker-compose -f docker-compose-prod.yml up -d --build
222-
DX_IP="$(docker-machine ip dx-automator-prod)"
223-
curl http://$DX_IP/users/ping
224-
curl http://$DX_IP/users
225-
```

0 commit comments

Comments
 (0)