This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# django-ecs-deploy

Make config files from Django settings variables and templates.

## Installation

From your Django app, install the module from pip:

pip install django-ecs-deploy

Then make sure it is included in your `INSTALLED_APPS` section:

INSTALLED_APPS = (
...
'ecs_deploy',
)

## Usage

This command assumes you're using [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy) for your web server setup. It also uses your Django settings as well as environment variables to configure builds. It expects the following variables:

### Settings / Environment Variables

`django-ecs-deploy` looks for the following settings in the `settings` file and from your environment. Environment variables will override `settings`:

* `PROJECT` - The name of your project for use as a basename for tasks and Docker image names. Untested with special characters.
* `TIER` - Used in conjunction with the `BUILD_ID` environment setting for Docker image versioning (`staging125`) and with `PROJECT` to define ECS task names (`myproject-staging`)
* `DOCKER_REPOSITORY` - The name of the docker repo to store images in
* `DOCKER_IMAGE` - The name of the base docker image
* `BUILD_ID` - Used along with `TIER` for the image version (`staging124`)
* `DJANGO_SETTINGS_MODULE` - The tier you use to run this command will also be set in the ECS Task's container
* `VIRTUAL_HOST` (optional) - For use with [jwilder/nginx-proxy](https://github.com/jwilder/nginx-proxy)
* `DOCKER_APT_PACKAGES` (optional) - If set, a list of Debian package names will be installed
* `DOCKER_YUM_PACKAGES` (optional) - If set, a list of Yum package names will be installed
* `CREATE_FREETDS_CONFIG` (optional) - If set, `/etc/freetds.conf` will be created with reasonable defaults
* `COMPRESS_ENABLED` (optional) - If set, `python manage.py compress --force` will be run during image build
* `ECS_CLUSTER` (optional) - Defaults to `default`. If set, override ECS cluster name your services will be deployed to.
* `DOCKER_MAX_MEMORY` (optional) - Defaults to 256. Sets max memory in task definition.

#### Port Mapping

Mapping one port is currently supported using the following settings:

* `DOCKER_HOST_PORT` (optional) - The port to use on the host machine. No mapping will be configured if this is not set.
* `DOCKER_CONTAINER_PORT` (optional) - Defaults to `DOCKER_HOST_PORT`
* `DOCKER_PORT_PROTOCOL` (optional) - Defaults to `tcp`

#### Secure Credential Deployment

The following three keys require `awscli` to be installed via your `requirements.txt`:

* `CREDENTIALS_BUCKET` (optional) - source s3 bucket name to retrieve credentials onto Docker container
* `CREDENTIALS_KEY` (optional) - source s3 key for credentials
* `CREDENTIALS_DEST_PATH` (optional) - path to place credentials file on remote server. `pwd` is `/usr/src/app`

The basic command for the retrieval of the credentials counts on an IAM role with access to your bucket, and looks like this:

aws s3 cp s3://{{ CREDENTIALS_BUCKET }}/{{ CREDENTIALS_KEY }} {{ CREDENTIALS_DEST_PATH }}

### Execution

Set the appropriate settings and environment variables, then run:

python manage.py ecsdeploy

## Possible Features

I threw this together to serve a need. It makes a lot of assumptions right now about the way you're using it, like what is required vs. optional, etc. I'm totally open to pull requests that make the system more flexible.

The system assumes you have a service created based on `PROJECT` and `TIER` in your settings, and will not create the service for you or use different names.
Release History

Release History

0.1.14

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.13

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.12

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.11

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.10

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.9

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-ecs-deploy-0.1.14.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Mar 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting