All Projects → awslabs → Ecs Refarch Continuous Deployment

awslabs / Ecs Refarch Continuous Deployment

Licence: apache-2.0
ECS Reference Architecture for creating a flexible and scalable deployment pipeline to Amazon ECS using AWS CodePipeline

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Ecs Refarch Continuous Deployment

Ecs Formation
Tool to build Docker cluster composition for Amazon EC2 Container Service(ECS)
Stars: ✭ 114 (-85.31%)
Mutual labels:  aws, ecs, ec2, devops
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-93.17%)
Mutual labels:  aws, ecs, ec2
Aegea
Amazon Web Services Operator Interface
Stars: ✭ 51 (-93.43%)
Mutual labels:  aws, ecs, ec2
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 (+1175.13%)
Mutual labels:  aws, ecs, ec2
Aws Scalable Big Blue Button Example
Demonstration of how to deploy a scalable video conference solution based on Big Blue Button
Stars: ✭ 29 (-96.26%)
Mutual labels:  aws, ecs, ec2
Aws Automation
AWS automation scripts and lambda functions
Stars: ✭ 81 (-89.56%)
Mutual labels:  aws, ec2, devops
Ecs Pipeline
☁️ 🐳 ⚡️ 🚀 Create environment and deployment pipelines to ECS Fargate with CodePipeline, CodeBuild and Github using Terraform
Stars: ✭ 85 (-89.05%)
Mutual labels:  aws, ecs, devops
Ecs Nginx Proxy
Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
Stars: ✭ 93 (-88.02%)
Mutual labels:  aws, ecs, continuous-deployment
Aws Workflows On Github
Workflows for automation of AWS services setup from Github CI/CD
Stars: ✭ 95 (-87.76%)
Mutual labels:  aws, ecs, ec2
Awstaghelper
AWS bulk tagging tool
Stars: ✭ 98 (-87.37%)
Mutual labels:  aws, ec2, devops
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 (-72.42%)
Mutual labels:  aws, ecs, ec2
Inertia
✈️ Effortless, self-hosted continuous deployment for small teams and projects
Stars: ✭ 133 (-82.86%)
Mutual labels:  aws, devops, continuous-deployment
Cdk Constructs
A collection of higher-level aws cdk constructs: slack-approval-workflow, #slack & msteams notifications, chatops, blue-green-container-deployment, codecommit-backup, OWASP dependency-check, contentful-webhook, github-webhook, stripe-webhook, static-website, pull-request-check, pull-request-approval-rule, codepipeline-merge-action, codepipeline-check-parameter-action...
Stars: ✭ 282 (-63.66%)
Mutual labels:  aws, ecs, devops
Rattlesnakeos Stack
Build your own privacy and security focused Android OS in the cloud.
Stars: ✭ 490 (-36.86%)
Mutual labels:  aws, ec2
Ansible For Devops
Ansible for DevOps examples.
Stars: ✭ 5,265 (+578.48%)
Mutual labels:  aws, devops
Moto
A library that allows you to easily mock out tests based on AWS infrastructure.
Stars: ✭ 5,428 (+599.48%)
Mutual labels:  aws, ec2
Porter
Kubernetes powered PaaS that runs in your own cloud.
Stars: ✭ 498 (-35.82%)
Mutual labels:  aws, devops
Org Formation Cli
Better than landingzones!
Stars: ✭ 471 (-39.3%)
Mutual labels:  aws, devops
Aws
A collection of bash shell scripts for automating various tasks with Amazon Web Services using the AWS CLI and jq.
Stars: ✭ 493 (-36.47%)
Mutual labels:  aws, ec2
Aws Security Viz
Visualize your aws security groups.
Stars: ✭ 511 (-34.15%)
Mutual labels:  aws, ec2

ECS Reference Architecture: Continuous Deployment

The ECS Continuous Deployment reference architecture demonstrates how to achieve continuous deployment of an application to Amazon Elastic Container Service (Amazon ECS) using AWS CodePipeline and AWS CodeBuild. With continuous deployment, software revisions are deployed to a production environment automatically without explicit approval from a developer, making the entire software release process automated.

Launching this AWS CloudFormation stack provisions a continuous deployment process that uses AWS CodePipeline to monitor a GitHub repository for new commits and AWS CodeBuild to create a new Docker container image and to push it into Amazon Elastic Container Registry (Amazon ECR).

When creating this stack, you can opt to deploy the service onto AWS Fargate or Amazon EC2. AWS Fargate allows you to run containers without managing clusters or services. If you choose Amazon EC2, an Auto Scaling group of t2.micro instances will be created to host your service.

Running the example

1. Fork the GitHub repository

Fork the Amazon ECS sample app GitHub repository into your GitHub account.

From your terminal application, execute the following command (make sure to replace <your_github_username> with your actual GitHub username):

git clone https://github.com/<your_github_username>/ecs-demo-php-simple-app

This creates a directory named ecs-demo-php-simple-app in your current directory, which contains the code for the Amazon ECS sample app.

2. Create the CloudFormation stack

Deploy Region Name Region Launch Types
🚀 US East (N. Virginia) us-east-1 Fargate, EC2
🚀 US East (Ohio) us-east-2 EC2
🚀 US West (N. California) us-west-1 EC2
🚀 US West (Oregon) us-west-2 EC2
🚀 EU (Ireland) eu-west-1 EC2
🚀 EU (London) eu-west-2 EC2
🚀 EU (Frankfurt) eu-central-1 EC2
🚀 Asia Pacific (Singapore) ap-southeast-1 EC2
🚀 Asia Pacific (Sydney) ap-southeast-2 EC2
🚀 Asia Pacific (Tokyo) ap-northeast-1 EC2
🚀 Asia Pacific (Seoul) ap-northeast-2 EC2
🚀 Canada (Central) ca-central-1 EC2

This reference architecture can only be deployed to Regions which have all necessary services available. See the Region Table for information about service availability.

The CloudFormation template requires the following parameters:

  • Cluster Configuration

    • Launch Type: Deploy the service using either AWS Fargate or Amazon EC2. Selecting EC2 will create an Auto Scaling group of t2.micro instances for your cluster. See the documentation to learn more about launch types.
  • GitHub Configuration

    • Repo: The repo name of the sample service.
    • Branch: The branch of the repo to deploy continuously.
    • User: Your username on GitHub.
    • Personal Access Token: Token for the user specified above. (https://github.com/settings/tokens)

The CloudFormation stack provides the following output:

  • ServiceUrl: The sample service that is being continuously deployed.
  • PipelineUrl: The continuous deployment pipeline in the AWS Management Console.

Testing the example

After the CloudFormation stack is created, the latest commit to the GitHub repository is run through the pipeline and deployed to ECS. Open the PipelineUrl to watch the first revision run through the CodePipeline pipeline. After the deploy step turns green, open the URL from ServiceUrl which loads a page similar to this:

ECS sample app

To test continuous deployment, make a change to src/index.php in the ecs-demo-php-simple-app repository and push it to GitHub. CodePipeline detects the change, builds the new application, and deploys it to your cluster automatically. After the pipeline finishes deploying the revision, reload the page to see the changes made.

Cleaning up the example resources

To remove all resources created by this example, do the following:

  1. Delete the main CloudFormation stack which deletes the substacks and resources.

  2. Manually delete resources which may contain content:

    • S3 Bucket: ArtifactBucket
    • ECR Repository: Repository

CloudFormation template resources

The following sections explains all of the resources created by the CloudFormation template provided with this example.

DeploymentPipeline

Resources that compose the deployment pipeline include the CodeBuild project, the CodePipeline pipeline, an S3 bucket for deployment artifacts, and all necessary IAM roles used by those services.

Service

An ECS task definition, service, IAM role, and ECR repository for the sample application. This template is used by the CodePipeline pipeline to deploy the sample service continuously.

Cluster

An ECS cluster optionally backed by an Auto Scaling group of EC2 instances running the Amazon ECS-optimized AMI for the EC2 launch type.

Load Balancer

An Application Load Balancer to be used for traffic to the sample application.

VPC

A VPC with two public subnets on two separate Availability Zones, an internet gateway, and a route table with a default route to the public internet.

License

This reference architecture sample is licensed under Apache 2.0.

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].