https://github.com/azavea/django-ecsmanage
Run any Django management command on an AWS Elastic Container Service (ECS) cluster.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.6%) to scientific vocabulary
Keywords
amazon-ecs
aws
aws-fargate
django
hacktoberfest
Keywords from Contributors
beach
semantic-segmentation
hydrology
watersheds
photovoltaics
Last synced: 5 months ago
·
JSON representation
Repository
Run any Django management command on an AWS Elastic Container Service (ECS) cluster.
Basic Info
Statistics
- Stars: 24
- Watchers: 7
- Forks: 2
- Open Issues: 2
- Releases: 0
Topics
amazon-ecs
aws
aws-fargate
django
hacktoberfest
Created almost 7 years ago
· Last pushed almost 2 years ago
Metadata Files
Readme
Changelog
License
README.rst
django-ecsmanage
================
.. image:: https://github.com/azavea/django-ecsmanage/workflows/CI/badge.svg?branch=develop
:target: https://github.com/azavea/django-ecsmanage/actions?query=workflow%3ACI
A Django app that provides a management command allowing you to run any
other management command on an AWS Elastic Container Service (ECS)
cluster.
With ``django-ecsmanage``, you can easily run migrations and other
one-off tasks on a remote cluster from the command line:
::
$ django-admin ecsmanage migrate
Table of Contents
-----------------
- `Installation`_
- `Configuration`_
- `Environments`_
- `AWS Resources`_
- `Developing`_
Installation
------------
Install from PyPi using pip:
.. code:: bash
$ pip install django-ecsmanage
Update ``INSTALLED_APPS`` in your Django settings to install the app:
.. code:: python
INSTALLED_APPS = (
...
'ecsmanage',
)
Configuration
-------------
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 associated with that
environment. For example:
.. code:: python
ECSMANAGE_ENVIRONMENTS = {
'default': {
'TASK_DEFINITION_NAME': 'StagingAppCLI',
'CONTAINER_NAME': 'django',
'CLUSTER_NAME': 'ecsStagingCluster',
'LAUNCH_TYPE': 'FARGATE',
'PLATFORM_VERSION': '1.4.0',
'SECURITY_GROUP_TAGS': {
'Name': 'sgAppEcsService',
'Environment': 'Staging',
'Project': 'ProjectName'
},
'SUBNET_TAGS': {
'Name': 'PrivateSubnet',
'Environment': 'Staging',
'Project': 'ProjectName'
},
'ASSIGN_PUBLIC_IP': 'DISABLED',
'AWS_REGION': 'us-east-1',
},
}
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``
configuration as an example:
.. code:: python
ECSMANAGE_ENVIRONMENTS = {
'default': {
'TASK_DEFINITION_NAME': 'StagingAppCLI',
'CLUSTER_NAME': 'ecsStagingCluster',
'SECURITY_GROUP_TAGS': {
'Name': 'sgStagingAppEcsService',
},
'SUBNET_TAGS': {
'Name': 'StagingPrivateSubnet',
},
},
'production': {
'TASK_DEFINITION_NAME': 'ProductionAppCLI',
'CLUSTER_NAME': 'ecsProductionCluster',
'SECURITY_GROUP_TAGS': {
'Name': 'sgProductionAppEcsService',
},
'SUBNET_TAGS': {
'Name': 'ProductionPrivateSubnet',
},
},
}
This configuration defines two environments, ``default`` and
``production``. Using the above settings, you could run production
migrations with the following command:
.. code:: bash
$ django-admin ecsmanage --env production migrate
If the ``--env`` argument is not present, the command will default to
the environment named ``default``.
AWS Resources
~~~~~~~~~~~~~
The following environment configuration keys help the management command locate
the appropriate AWS resources for your cluster:
+--------------------------+------------------------------------------------------------------+---------------+
| Key | Description | Default |
| | | |
| | | |
| | | |
+==========================+==================================================================+===============+
| ``TASK_DEFINITION_NAME`` | The name of your ECS task definition. The command | |
| | will automatically retrieve the latest definition. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``CONTAINER_NAME`` | The name of the Django container in your ECS task definition. | ``django`` |
+--------------------------+------------------------------------------------------------------+---------------+
| ``CLUSTER_NAME`` | The name of your ECS cluster. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``SECURITY_GROUP_TAGS`` | A dictionary of tags to use to identify a security | |
| | group for your task. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``SUBNET_TAGS`` | A dictionary of tags to use to identify a subnet | |
| | for your task. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``ASSIGN_PUBLIC_IP`` | Whether to automatically assign a public IP address to your | ``DISABLED`` |
| | task. Can be ``ENABLED`` or ``DISABLED``. | |
+--------------------------+------------------------------------------------------------------+---------------+
| ``LAUNCH_TYPE`` | The ECS launch type for your task. | ``FARGATE`` |
+--------------------------+------------------------------------------------------------------+---------------+
| ``PLATFORM_VERSION`` | The Fargate platform version, if ``LAUNCH_TYPE`` is ``FARGATE``. | ``LATEST`` |
+--------------------------+------------------------------------------------------------------+---------------+
| ``AWS_REGION`` | The AWS region to run your task. | ``us-east-1`` |
+--------------------------+------------------------------------------------------------------+---------------+
Developing
----------
Local development is managed with Python virtual environments. Make sure
that you have Python 3.8+ and pip installed before starting.
Install the development package in a virtual environment:
.. code:: bash
$ ./scripts/update
Run the tests:
.. code:: bash
$ ./scripts/test
.. _Installation: #installation
.. _Configuration: #configuration
.. _Environments: #environments
.. _AWS Resources: #aws-resources
.. _Developing: #developing
Owner
- Name: Azavea
- Login: azavea
- Kind: organization
- Location: Philadelphia, PA
- Website: https://www.azavea.com
- Repositories: 383
- Profile: https://github.com/azavea
Geospatial software engineering for good
GitHub Events
Total
Last Year
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Hector Castro | 4****o | 13 |
| Terence Tuhinanshu | t****e@t****m | 7 |
| Rocky Breslow | r****w@a****m | 6 |
| Cole Kettler | me@c****m | 5 |
| JN Hernández | j****z@g****m | 3 |
| dependabot[bot] | s****t@d****m | 1 |
| dependabot-preview[bot] | 2****] | 1 |
| Jean Cochrane | j****e@a****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 13
- Total pull requests: 23
- Average time to close issues: 3 months
- Average time to close pull requests: 5 days
- Total issue authors: 7
- Total pull request authors: 7
- Average comments per issue: 0.46
- Average comments per pull request: 0.91
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- hectcastro (6)
- colekettler (2)
- fungjj92 (1)
- rbreslow (1)
- davivc (1)
- jwalgran (1)
- rajadain (1)
Pull Request Authors
- hectcastro (6)
- colekettler (5)
- rbreslow (4)
- dependabot-preview[bot] (4)
- KlaasH (2)
- rajadain (2)
- jeancochrane (1)
Top Labels
Issue Labels
operations (12)
size: 1 (5)
size: 2 (2)
enhancement (1)
bug (1)
okr (1)
pair (1)
Pull Request Labels
dependencies (4)
Packages
- Total packages: 1
-
Total downloads:
- pypi 3,621 last-month
- Total dependent packages: 0
- Total dependent repositories: 2
- Total versions: 9
- Total maintainers: 1
pypi.org: django-ecsmanage
Run any Django management command on an AWS Elastic Container Service (ECS) cluster.
- Homepage: https://github.com/azavea/django-ecsmanage/
- Documentation: https://django-ecsmanage.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 4.0.1
published almost 2 years ago
Rankings
Downloads: 8.5%
Dependent packages count: 10.1%
Dependent repos count: 11.6%
Average: 12.4%
Stargazers count: 12.6%
Forks count: 19.1%
Maintainers (1)
Last synced:
6 months ago
Dependencies
.github/workflows/continuous_integration.yml
actions
- actions/cache v2 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
.github/workflows/release.yml
actions
- actions/checkout v2 composite
- actions/setup-python v2 composite
setup.py
pypi