Giter Site home page Giter Site logo

ecs-deployment-pipeline-example's Introduction

ecs-deployment-pipeline-example

Amazon ECS deployment example using GitHub Actions and Terraform and ecspresso.
The following are available.

  • A test environment is created for each pull request
  • When merged into the main branch, a staging environment will be created
  • Create the production environment by manually executing GitHub Actions
  • GitHub's OIDC is used for authentication with AWS

Usage

Configuring Secrets

Add the following to Secrets.

Name Value
AWS_ACCOUNT_ID AWS account ID
PERSONAL_ACCESS_TOKEN A GitHub personal access token
DOMAIN Domain name of the environment
TFSTATE_BUCKET S3 bucket to store tfstate
SLACK_BOT_TOKEN Slack App's Bot Token from the OAuth & Permissions page
SLACK_CHANNEL Slack channel name

Configuring Environment Variable

Add the following to Environment Variable on Local.

Name Value
PERSONAL_ACCESS_TOKEN A GitHub personal access token

Configuring Deploy Script for Production

Fix the following in deploy-production.sh for your environment.

Variable Description
ORG GitHub Organization Name
REPO GitHub Repository Name
BRANCH Branch Name

Moving the files of GitHub Actions

This repository does not place workflows in .gihub/workflows, so move workflows under .github.

Creating a Route53 host zone

Create a host zone for the domain.

Creating Common Resources

cd terraform/common
terraform init -backend-config='bucket=<The bucket name set in TFSTATE_BUCKET>'
terraform apply -var domain='<Domain name>' -var repository='<GitHub Org/Repository name>'

Thanks to

I used the following as a reference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.