Contents
  1. 1. Continuous Delivery

Code

source code ansible
source code helloworld

Continuous Delivery

codepipline01
codepipline02
Source
Test
Deploy
Approval
Production
Jenkins01
Jenkins02
Jenkins03

1
2
3
npm config set registry http://registry.npmjs.org/ 
npm install
./node_modules/mocha/bin/mocha

Creating the new cloudformation stack for production

1
2
3
4
5
6
7
8
aws cloudformation create-stack --capabilities CAPABILITY_IAM --stack-name helloworld-production --template-body file://nodeserver-cf.template --parameters ParameterKey=KeyPair,ParameterValue=EffectiveDevOpsAWS
aws cloudformation wait stack-create-complete --stack-name helloworld-production
arn=$(aws deploy get-deployment-group --application-name helloworld --deployment-group-name staging --query 'deploymentGroupInfo.serviceRoleArn')
aws deploy create-deployment-group --application-name helloworld --ec2-tag-filters Key=aws:cloudformation:stack-name,Type=KEY_AND_VALUE,Value=helloworld-production --deployment-group-name production --service-role-arn $arn
aws deploy create-deployment-group --application-name helloworld --ec2-tag-filters Key=aws:cloudformation:stack-name,Type=KEY_AND_VALUE,Value=helloworld-production --deployment-group-name production --service-role-arn arn:aws:iam::012152306932:role/CodeDeployRole
aws deploy list-deployment-groups --application-name helloworld
aws sns create-topic --name production-deploy-approval
aws sns subscribe --topic-arn arn:aws:sns:ap-southeast-2:012152306932:production-deploy-approval --protocol email --notification-endpoint foobar@gmail.com
Contents
  1. 1. Continuous Delivery