Coder Social home page Coder Social logo

codepipeline-template's Introduction

CodePipeline Template

This repo is a template for containerized applications deployed with CodePipeline -> CodeBuild -> CloudFormation -> ECS

GitHub Authentication Setup (Currently Manual)

  1. Create a Personal Access Token in GitHub for CodePipeline: https://docs.aws.amazon.com/codepipeline/latest/userguide/GitHub-create-personal-token-CLI.html
  2. Place the Personal Access Token in an SSM Parameter in the desired AWS Account / Region named /CodePipeline/GitHub

Docker Hub Authentication Setup (Currently Manual)

  1. Create a Username and Personal Access Token on Docker Hub (free-tier user is fine)
  2. Place the Username in an SSM Parameter in the desired AWS Account / Region named /CodePipeline/dockerhub-user
  3. Place the Personal Access Token in an SSM Parameter in the desired AWS Account / Region named /CodePipeline/dockerhub-password

Application Deployment

  1. Authenticate to desired AWS Account with Administrator Access in your bash shell
  2. Navigate to root directory of this repository
  3. Review parameters in config.sh and update (if needed)
  4. Run ./init <Branch Name> ("Branch Name" must exist in the repository)
  5. Watch CloudFormation console for progress deploying initializer template (build/init.yml)
  6. Watch CodePipeline console for progress of first pipeline run & monitor CodeBuild + CloudFormation progress
  7. Commit + Push changes to branch in order to trigger a new build

Application Destruction (Currently Manual)

  1. Delete any objects from S3 Buckets (Build + Web + Web Logs)
  2. Delete any ECR Container Images
  3. Delete any Manual Route53 Records (e.g. ACM cert verification CNAMEs)
  4. Delete the CloudFormation Stack for the deployment

Notes

  • CodeBuild + CodePipeline + CloudFormation IAM Roles are currently overprivileged and should be scoped better
  • Load Balancer should be configured to make a better HA ECS deployment
  • Web Stack is currently disabled (commented out) but will enable CloudFront + API Gateway + Lambda (talk to Marty first if you want to explore)
  • Load Balancer could be added as an origin behind CloudFront + Route53 Config

codepipeline-template's People

Contributors

marty-sullivan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.