All Projects → in4it → Ecs Deploy

in4it / Ecs Deploy

Licence: apache-2.0
ecs-deploy is a continuous deployment platform for AWS ECS. It automates deploys based a simple json/yaml file which can be integrated in your CI/CD

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Ecs Deploy

Ecs Nginx Proxy
Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
Stars: ✭ 93 (-60.59%)
Mutual labels:  aws, ecs, continuous-delivery
Ecs Exporter
Export AWS ECS cluster metrics to Prometheus
Stars: ✭ 127 (-46.19%)
Mutual labels:  aws, ecs
Ecs Formation
Tool to build Docker cluster composition for Amazon EC2 Container Service(ECS)
Stars: ✭ 114 (-51.69%)
Mutual labels:  aws, ecs
Ladder
A general purpose extensible autoscaler for the cloud
Stars: ✭ 143 (-39.41%)
Mutual labels:  aws, ecs
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+4092.8%)
Mutual labels:  aws, ecs
Aws Workflows On Github
Workflows for automation of AWS services setup from Github CI/CD
Stars: ✭ 95 (-59.75%)
Mutual labels:  aws, ecs
Terraform Aws Cicd
Terraform Module for CI/CD with AWS Code Pipeline and Code Build
Stars: ✭ 138 (-41.53%)
Mutual labels:  aws, continuous-delivery
Terraform Ecs Autoscale Alb
ECS cluster with instance and service autoscaling configured and running behind an ALB with path based routing set up
Stars: ✭ 60 (-74.58%)
Mutual labels:  aws, ecs
Eventstormingworkshop
EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Stars: ✭ 184 (-22.03%)
Mutual labels:  aws, ecs
Firecamp
Serverless Platform for the stateful services
Stars: ✭ 194 (-17.8%)
Mutual labels:  aws, ecs
Terraform Aws Ecs
Terraform module which creates AWS ECS resources
Stars: ✭ 203 (-13.98%)
Mutual labels:  aws, ecs
Ecs Pipeline
☁️ 🐳 ⚡️ 🚀 Create environment and deployment pipelines to ECS Fargate with CodePipeline, CodeBuild and Github using Terraform
Stars: ✭ 85 (-63.98%)
Mutual labels:  aws, ecs
Awsssmchaosrunner
Amazon's light-weight library for chaos engineering on AWS. It can be used for EC2, ECS (with EC2 launch type) and Fargate.
Stars: ✭ 214 (-9.32%)
Mutual labels:  aws, ecs
Aws Ecs Airflow
Run Airflow in AWS ECS(Elastic Container Service) using Fargate tasks
Stars: ✭ 107 (-54.66%)
Mutual labels:  aws, ecs
Terraform Aws Ecs Codepipeline
Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS https://cloudposse.com/
Stars: ✭ 85 (-63.98%)
Mutual labels:  aws, ecs
Designing Cloud Native Microservices On Aws
Introduce a fluent way to design cloud native microservices via EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Stars: ✭ 131 (-44.49%)
Mutual labels:  aws, ecs
Aegea
Amazon Web Services Operator Interface
Stars: ✭ 51 (-78.39%)
Mutual labels:  aws, ecs
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-77.54%)
Mutual labels:  aws, ecs
Rack
Private PaaS built on native AWS services for maximum privacy and minimum upkeep
Stars: ✭ 1,836 (+677.97%)
Mutual labels:  aws, ecs
Terraform Fargate Example
Example repository to run an ECS cluster on Fargate
Stars: ✭ 206 (-12.71%)
Mutual labels:  aws, ecs

ECS deploy

ECS Deploy is a REST API server written in Go that can be used to deploy services on ECS from anywhere. It typically is executed as part of your deployment pipeline. Continuous Integration software (like Jenkins, CircleCI, Bitbucket or others) often don't have proper integration with ECS. This API server can be deployed on ECS and will be used to provide continuous deployment on ECS.

  • Registers services in DynamoDB
  • Creates ECR repository
  • Creates necessary IAM roles
  • Creates ALB target and listener rules
  • Creates and updates ECS Services based on json/yaml input
  • SAML supported Web UI to redeploy/rollback versions, add/update/delete parameters, examine event/container logs, scale, and run manual tasks
  • Support to scale out and scale in ECS Container Instances

The UI

Usage

Download

You can download ecs-deploy and ecs-client from the releases page or you can use the image from dockerhub.

Bootstrap ECS cluster

You can bootstrap a new ECS cluster using ecs-deploy. It'll setup a autoscaling group, ALB, IAM roles, and the ECS cluster.

./ecs-deploy --bootstrap \
  --alb-security-groups sg-123456 \
  --cloudwatch-logs-enabled \
  --cloudwatch-logs-prefix mycompany \
  --cluster-name mycluster \
  --ecs-desired-size 1 \
  --ecs-max-size 1 \
  --ecs-min-size 1 \
  --ecs-security-groups sg-123456 \
  --ecs-subnets subnet-123456 \
  --environment staging \
  --instance-type t2.micro \
  --key-name mykey \
  --loadbalancer-domain cluster.in4it.io \
  --paramstore-enabled \
  --paramstore-kms-arn aws:arn:kms:region:accountid:key/1234 \
  --paramstore-prefix mycompany \
  --profile your-aws-profile \
  --region your-aws-region

You'll need to setup the security groups and VPC/subnets first. The ALB security group should allow port 80 and 443 incoming, the ECS security group should allow 32768:61000 from the ALB.

If you no longer need the cluster, you can remove it by specifying --delete-cluster instead of --bootstrap

Bootstrap with terraform

Alternatively you can use terraform to deploy the ecs cluster. See terraform/README.md for a terraform module that spins up an ecs cluster.

Deploy to ECS Cluster

To deploy the examples (an nginx server and a echoserver), use ecs-client:

Login interactively:

./ecs-client login --url http://yourdomain/ecs-cluster

Login with environment variables:

ECS_DEPLOY_LOGIN=deploy ECS_DEPLOY_PASSWORD=password ./ecs-client login --url http://yourdomain/ecs-cluster

Deploy:

./ecs-client deploy -f examples/services/multiple-services/multiple-services.yaml

Configuration (Environment variables)

AWS Specific variables:

  • AWS_REGION=region # mandatory

Authentication variables;

  • JWT_SECRET=secret # mandatory
  • DEPLOY_PASSWORD=deploy # mandatory
  • DEVELOPER_PASSWORD=developer # mandatory

Service specific variables

These will be used when deploying services

  • AWS_ACCOUNT_ENV=dev|staging|testing|qa|prod
  • PARAMSTORE_ENABLED=yes
  • PARAMSTORE_PREFIX=mycompany
  • PARAMSTORE_KMS_ARN=
  • CLOUDWATCH_LOGS_ENABLED=yes
  • CLOUDWATCH_LOGS_PREFIX=mycompany
  • LOADBALANCER_DOMAIN=mycompany.com

DynamoDB specific variables

  • DYNAMODB_TABLE=Services

ECR

  • ECR_SCAN_ON_PUSH=true

SAML

SAML can be enabled using the following environment variables

To create a new key and certificate, the following openssl command can be used:

openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 3650 -nodes -subj "/CN=myservice.mycompany.com"

Web UI

  • PARAMSTORE_ASSUME_ROLE=arn # arn to assume when querying the parameter store

Autoscaling (down and up)

Setup

Usage

  • Autoscaling (up) will be triggered when the largest container (in respect to mem/cpu) cannot be scheduled on the cluster
  • Autoscaling (down) will be triggered when there is enough capacity available on the cluster to remove an instance (instance size + largest container + buffer)

Configuration

The defaults are set for the most common use cases, but can be changed by setting environment variables:

Environment variable Default value Description
PARAMSTORE_ENABLED no Use "yes" to enable the parameter store.
PARAMSTORE_PREFIX "" Prefix to use for the parameter store. mycompany will result in /mycompany/servicename/variable
PARAMSTORE_KMS_ARN "" Specify a KMS ARN to encrypt/decrypt variables
PARAMSTORE_INJECT no Use "Yes" to enable injection of secrets into the task definition
AUTOSCALING_STRATEGIES LargestContainerUp,LargestContainerDown List of autoscaling strategies to apply. See below for different types
AUTOSCALING_DOWN_STRATEGY gracefully Only gracefully supported now (uses interval and period before executing the scaling down operation)
AUTOSCALING_UP_STRATEGY immediately Scale up strategy (immediatey, gracefully)
AUTOSCALING_DOWN_COOLDOWN 5 Cooldown period after scaling down
AUTOSCALING_DOWN_INTERVAL 60 Seconds between intervals to check resource usage before scaling, after a scaling down operation is detected
AUTOSCALING_DOWN_PERIOD 5 Periods to check before scaling
AUTOSCALING_UP_COOLDOWN 5 Cooldown period after scaling up
AUTOSCALING_UP_INTERVAL 60 Seconds between intervals to check resource usage before scaling, after a scaling up operation is detected
AUTOSCALING_UP_PERIOD 5 Periods to check before scaling
SERVICE_DISCOVERY_TTL 60 TTL for service discovery records
SERVICE_DISCOVERY_FAILURETHRESHOLD 3 Failure threshold for service discovery records
AWS_RESOURCE_CREATION_ENABLED yes Let ecs-deploy create AWS IAM resources for you
SLACK_WEBHOOKS "" Comma seperated Slack webhooks, optionally with a channel (format: url1:#channel,url2:#channel)
SLACK_USERNAME ecs-deploy Slack username
ECS_TASK_ROLE_PERMISSION_BOUNDARY_ARN "" permission boundary for ecs task roles
ECR_SCAN_ON_PUSH false Enable ECR image scanning

Autoscaling Strategies

Strategy Description
LargestContainerUp Scale when the largest container (+buffer) in the cluster cannot be scheduled anymore on a node
LargestContainerDown Scale down when there is enough capacity to schedule the largest container (buffer) after a node is removed
Polling Poll all services every minute to check if a task can't be scheduled due to resource constraints (10 services per api call, only 1 call per second)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].