Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.73 KB

HOW-TO.md

File metadata and controls

56 lines (39 loc) · 1.73 KB

Story 2: Create a pipeline for Continuous Deployment

  • Add the template and commit it locally (to a develop branch)
$ git checkout -b develop
$ git add templates
$ git commit -m "Adding template from first kata"

  • Create a repository on your account on github.com and
# Add a remote pointing to the upstream repository on github.com
# $ git remote add origin YOUR_REPOSITORY_CLONE_URL_HERE
# For example:
$ git remote add origin git@github.com:krishnan-mani/the-cf-workshop.git

# Push to the upstream remote
$ git push -u origin develop

  • Create a pipeline to deploy the stack off the develop branch
# Copy pipeline.yaml to templates/pipeline.yaml
# Copy pipeline-parameters.example.json to templates/pipeline-parameters.json
# Edit templates/pipeline-parameters.json and provide the repository name, the repository owner, and personal access token from Github

# Create a stack to provision the pipeline in CodePipeline

$ aws cloudformation create-stack \
    --stack-name pipeline-webapp-develop \
    --template-body file://templates/pipeline.yaml \
    --parameters file://templates/pipeline-parameters.json \
    --capabilities CAPABILITY_IAM

  • Ensure that the pipeline runs successfully and deploys the CloudFormation stack named webapp-develop
  • Delete the stack created earlier by hand (webapp-dev)
$ aws cloudformation delete-stack \
    --stack-name webapp-dev
    
  • All subsequent template changes will be deployed to the stack by the pipeline, on changes being pushed to the develop branch
  • onwards to kata-3