Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize Django module for one-off management commands #2

Merged
merged 27 commits into from
Apr 8, 2019
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7a7d1ab
Scaffold Python package and move over source code
Feb 27, 2019
3dd7116
Add PR template and test artifacts
Feb 27, 2019
a35b00e
Adjust ecsmanage command to read configuration values
Feb 27, 2019
dbe4a70
Get ecsmanage command working
Feb 28, 2019
159e654
Make management command installable
Feb 28, 2019
a46dc8d
Initialize tests
Feb 28, 2019
b2e542c
Draft simple README
Feb 28, 2019
4096b3f
Add Travis config and drop support for py2.7 + py3.5
Feb 28, 2019
f42609d
Clean up Travis config
Feb 28, 2019
f929023
Document workarounds in .travis.yml
jeancochrane Mar 2, 2019
80c3ba5
Clean up README
jeancochrane Mar 2, 2019
0aff8d3
Specify Python 3.6+ support
jeancochrane Mar 2, 2019
6c031a8
Use AWS region name for Boto3 clients
jeancochrane Mar 2, 2019
cc8ecbb
Update setup.py to reflect Python 3.6+ requirement
jeancochrane Mar 2, 2019
1aeac5d
Make sure scripts/update can run in one pass
rbreslow Mar 13, 2019
004ebee
Satisfy linter requirements
rbreslow Mar 13, 2019
8ab47fa
Only pass networkConfiguration for awsvpc network mode
rbreslow Mar 14, 2019
0156d2d
fixup! Only pass networkConfiguration for awsvpc network mode
rbreslow Mar 14, 2019
0dfcaf7
Use setuptools_scm to manage Python package version
rbreslow Mar 14, 2019
94a7ccb
Fix README
hectcastro Apr 6, 2019
0433873
Add support for Black
hectcastro Apr 6, 2019
aa4e0d9
Relax all Black version constraints
hectcastro Apr 6, 2019
cfb5714
Publish to PyPi using azavea user
rbreslow Apr 8, 2019
df23ccb
Single self.stdout.write() call
rbreslow Apr 8, 2019
88b5dfa
Remove moto
rbreslow Apr 8, 2019
e7ac83c
Update MANIFEST.in
rbreslow Apr 8, 2019
fa21255
Remove deploys on develop because untagged scm version violates PEP 4…
rbreslow Apr 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up README
Add additional notes and context to the README.
  • Loading branch information
jeancochrane authored Mar 2, 2019
commit 80c3ba5af142438be9eefa1d527ad4fe78fe3f20
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ A Django app that provides a management command allowing you to run any
other management command on an AWS Elastic Container Service
(ECS) cluster.

Useful for running migrations and other one-off commands in staging and
production environments. With `django-ecsmanage`, you can easily run migrations
With `django-ecsmanage`, you can easily run migrations and other one-off tasks
on a remote cluster from the command line:

```
Expand All @@ -22,10 +21,10 @@ $ django-admin ecsmanage migrate

## Installation

Install from GitHub using pip:
Install from PyPi using pip:

```
$ pip install git+https://github.com/azavea/django-ecsmanage.git
$ pip install django-ecsmanage
```

Update `INSTALLED_APPS` in your Django settings to install the app:
Expand All @@ -43,7 +42,7 @@ Settings for the management command are kept in a single configuration
dictionary in your Django settings named `ECSMANAGE_ENVIRONMENTS`. Each entry in
`ECSMANAGE_ENVIRONMENTS` should be a key-value pair corresponding to a
named environment (like `default` or `production`) and a set of AWS resources
in that environment. For example:
associated with that environment. For example:

```python
ECSMANAGE_ENVIRONMENTS = {
Expand All @@ -66,11 +65,14 @@ ECSMANAGE_ENVIRONMENTS = {
}
```

This configuration defines a single environment, named `default`, with
associated AWS ECS resources.

### Environments

The key name for an environment can be any string. You can use this name
with the `--env` flag when running the command to run a command on a
different environment. Take this `ECSMANAGE_ENVIRONMENTS` variable
different environment. Take this `ECSMANAGE_ENVIRONMENTS` configuration
as an example:

```python
Expand Down Expand Up @@ -98,6 +100,7 @@ ECSMANAGE_ENVIRONMENTS = {
}
```

This configuration defines two environments, `default` and `production`.
Using the above settings, you could run production migrations with the
following command:

Expand All @@ -110,7 +113,7 @@ environment named `default`.

### AWS Resources

The following keys in an environment help the management command locate
The following environment configuration keys help the management command locate
the appropriate AWS resources for your cluster:

| key name | description | default |
Expand Down Expand Up @@ -138,4 +141,4 @@ Run the tests:

```
$ ./scripts/test
```
```