build and deployment with jenkins and code deploy on aws
TRANSCRIPT
Build and Deploymentwith Jenkins and Code Deploy
on AWS
-Mitesh Sharma
Build And Deployment
AWS EC2 Server
Build, Test, Deploy
Find issues, fix them, Add features
Dev Machine
Build And Deployment
AWS EC2 ServerDev Machine
Build SCP from dev to server Deploy
Build And Deployment
AWS EC2 ServerDev Machine
Build Deploy
Build And Deployment
Trigger Build and deploy
AWS EC2 ServerDev Machine
Deploy
Code Push
Build And Deployment with CodeDeploy
Trigger Build and deploy
AWS EC2 ServerDev Machine
Deployed
Code Push
+AWS
CodeDeploy
AWS Code Deploy: What we needAmazon EC2 with CodeDeploy Agent
Amazon S3
AWS CodeDeploy
AWS Code DeployGetting ready:
Assign proper roles and permissions both to AWS CodeDeploy and EC2
Tag the instance where we want to do deployment
Install agent if not using AMI which already have oneCreate Application Specify Deployment
GroupSpecify Deployment
Configration Upload Revision
DeployCheck Result
Life Cycle EventsAgent goes through series of events
Steps allow us to control application development
For example: We can close application cleanly using these steps.
AppSpec.yml sits in application’s source directory which allows us to define hooks
AWS Code Deploy
ApplicationStop
BeforeInstall
AfterInstall
ApplicationStart
ValidateService
Agent
Start
Download Bundle
Install
End
Jenkins Machine
Content+
AppSpec.yml
EC2 Machine
Amazon S3 / Github can be used
CodeDeploy
Deployment Management
Content+
AppSpec.yml
Deployment Group
Agent Agent
Agent Agent
Agent Agent
1
2 3
4
AWS Code Deploy
IssuesBuild and deployment at same place restrict us from deploying same
build on multiple environments
Need to build multiple times for each environment
Code pushes can happen between different builds for deployment on different environment
Build and deployment needs to be decoupled
Jenkins Machine
Content with env conf withAppSpec.yml
EC2 Machine
Amazon S3 /
Github can be used
CodeDeploy
Deployment Management
Content+
AppSpec.yml
Deployment Group
Agent Agent
Agent Agent
Agent Agent
1
2 3
4
AWS Code Deploy
Jenkins Machine
Build
Demo
ThanksTwitter : @mitesh_shamraGithub : https://github.com/MiteshSharma