Implement for AWS ECS and Docker Compose what SAM is to Serverless for AWS Lambda
Project description
Manage, Configure and deploy your applications/services and AWS resources from your docker-compose definitions
Why use ECS Compose-X?
As a developer, working locally is a crucial part of your day to day work, and docker-compose allows you to do just that, for simple services as well as very complex structures.
Your prototype works, and you want to deploy to AWS. But what about IAM ? Networking ? Security ? Configuration ?
Using ECS Compose-X, you keep your docker-compose definitions as they are, add the AWS services you have chosen as part of that definition, such as ELB, RDS/DynamodDB Databases etc, and the program will automatically generate all the AWS CloudFormation templates required to deploy all your services.
It automatically takes care of network access requirements and IAM permissions, following best practices.
Installation
ECS Compose-X can be used as a CLI ran locally, in CICD pipelines, or as an AWS CloudFormation macro, allowing you to use your Docker Compose files directly in CloudFormation!
On AWS using AWS CloudFormation Macro
You can now deploy the CloudFormation macro to your AWS Account using AWS Serverless Application Repository (SAR).
Via pip
pip install ecs_composex
CLI Usage
usage: ecs-compose-x [-h] {up,render,create,plan,config,init,version} ...
positional arguments:
{up,render,create,plan,config,init,version}
Command to execute.
up Generates & Validates the CFN templates, Creates/Updates stack in CFN
render Generates & Validates the CFN templates locally. No upload to S3
create Generates & Validates the CFN templates locally. Uploads files to S3
plan Creates a recursive change-set to show the diff prior to an update
config Merges docker-compose files to provide with the final compose content version
init Initializes your AWS Account with prerequisites settings for ECS
version ECS ComposeX Version
optional arguments:
-h, --help show this help message and exit
Examples
# Render all your CFN templates from your docker compose and extension files
ecs-compose-x render --format yaml -n my-awesome-app -f docker-compose.yml -f aws.yml -d outputs
# Deploy / Update your application to AWS
ecs-compose-x up --format yaml -n my-awesome-app -f docker-compose.yml -f aws.yml -d outputs
Features
AWS Services support
To have an extensive list of support, refer to the compatibilty matrix and the syntax reference for each AWS services in our documentation
How is it different ?
There are a lot of similar tools out there, including published by AWS. So here are a few of the features that we think could be of interest to you.
Modularity / “Plug & Play”
The majority of people who are going to use ECS ComposeX on a daily basis should be developers who need to have an environment of their own and want to quickly iterate over it.
However, it is certainly something that Cloud Engineers in charge of the AWS accounts etc. would want to use to make their own lives easy too.
In many areas, you as the end-user of ComposeX will already have infrastructure in place: VPC, DBs and what not. So as much as possible, you will be able in ComposeX to define Lookup sections which will find your existing resources, and map these to the services.
Built for AWS Fargate
However the original deployments and work on this project was done using EC2 instances (using SpotFleet), everything is now implemented to work on AWS Fargate First (2020-06-06).
That said, all features that can be supported with EC2 instances are available to you with ECS Compose-X, which, will simply disable such settings when deployed on top of AWS Fargate.
Attributes auto-correct
A fair amount of the time, deployments via AWS CloudFormation, Ansible and other IaC will fail because of incompatible settings. This happened a number of times, with a lot of different AWS Services.
Whilst giving you the ability to use all properties of AWS CloudFormation objects, whenever possible, ECS Compose-X will understand how two services are connected and will auto-correct the settings for you.
For example, if you set the Log retention to be 42 days, which is invalid, it will automatically change that to the closest valid value (here, 30).
Documentation
Find all the documentation to get started and and start deploying to AWS
RoadMap
Blog
Credits
This package would not have been possible without the amazing job done by the AWS CloudFormation team! This package would not have been possible without the amazing community around Troposphere! This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ecs_composex-0.15.5.tar.gz
.
File metadata
- Download URL: ecs_composex-0.15.5.tar.gz
- Upload date:
- Size: 297.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9642dd91db481f36fd93f30ef22e00b66382520c77423e6905cfcea54e22f715 |
|
MD5 | 311b7f3d298f5d6fb724cca303401520 |
|
BLAKE2b-256 | 344bb063ec7b4f583c69288af1865f3733b1a87026ce8771aaf64988d7291165 |
Provenance
File details
Details for the file ecs_composex-0.15.5-py2.py3-none-any.whl
.
File metadata
- Download URL: ecs_composex-0.15.5-py2.py3-none-any.whl
- Upload date:
- Size: 280.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bdb56d9741588f954d214a403bef2b26f327a4ff3bbcec0a519ef4f2ee65cff |
|
MD5 | 5844382cecbe7958e89472f811dd5061 |
|
BLAKE2b-256 | 86fb3d3fa76f415334574056707978e4cc66256c803a593e4438e41f9d0f2c02 |