September 25, 2018

AWS CI CD - 2nd Workflow - Infrastructure Rollouts

2nd Workflow in AWS CI CD using AWS Developer Tools Lab Series is a continuation to 1st Workflow where the EC2 instance is spinned-up as part of AWS CodePipeline from CloudFormation template stored in AWS CodeCommit.

Infrastructure Rollout & Application Deployment

2nd Workflow is a continuation to 1st Workflow where the EC2 instance is spinned-up as part of AWS CodePipeline is CloudFormation template stored in AWS CodeCommit.

In the above network diagram, Java Web Application & Infrastructure Code are developed on-premise by two different teams, committed to two different repositories in AWS CodeCommit using Git Bash and the CodePipeline will have 3 stages with parallel actions in 1st stage & sequential actions 3rd stage.

  • First stage in the pipeline is to pull the source code from the Java Web Application & Infrastructure repositories in CodeCommit and pass on the Java Web App source code to AWS CodeBuild as an input artifact. Here both the actions as executed in parallel as there is no dependency.
  • 2nd stage is Build where CodeBuild compiles the source code, packages and stores the artifact in S3.
  • 3rd stage is Deploy which takes two input artifacts - Infrastructure Code & Java Web Application deployable artifact. Execution happens in two sequential actions
    • Infrastructure Code (i.e. CloudFormation template) from Stage 1 i.e. Source Stage is taken as input and Stack is created. 
    • CodeDeploy fetches the artifact from S3 and deploys to EC2 instance(s) that just got created.

         And your website can be accessed using the EC2 Endpoint or the public IP address.
  • update the inline policy for codedeploy_group with the content from https://github.com/bhuvana-s/aws_cicd_policydocs/blob/master/policy_codedeploy.json
    These additional permissions are required to create resources from CloudFormation Template.
  • LAB 6Setup Infrastructure Repository in CodeCommit
    Cross-verify the configurations defined in the LAB 6 against the below mind-map.
    Colour Codes: Green ones are created as part of LAB 6

    No comments:

    Post a Comment