ecs-deplojo
ecs-deplojo copied to clipboard
Support for non-multiple-accounts infrastructure
Some facts as I experience most of the projects I work on:
- Most of projects are setup secure by having their own aws account (e.g. test and production separated).
- Also in almost every case the infrastructure for test is the same for production, only smaller instance sizes and/or desired counts to minimize capacity
When having an AWS account where you have multiple environments setup in, the task definition names will conflict with each other.
A suggestion, make the configuration more abstract:
---
clusters:
test:
test-example
production:
production-example
environments:
test:
DATABASE_URL: postgresql://
production:
DATABASE_URL: postgresql://
task_definitions:
web:
template: task_definitions/web.json
overrides:
production:
memory: 512
services:
web:
task_definition: web
before_deploy:
- task_definition: manage
container: uwsgi
command: manage.py migrate --noinput
Deploy with e.g. ecs-deplojo --config example.yaml --env production --var="image=example:latest"
This would result in quite large config files (for some of our projects > 400 lines) Need to think about this a bit more
I'd think you could always generate a config file on the fly with templating.