Concepts:
- Continuous Delivery - Automates the entire software release process up to production.
- Continuous Integration - Focused on automatically building and testing code.
AWS CodePipeline is a continuous delivery service you can use to model, visualize, and automate the steps required to release your software. AWS CodePipeline automates the steps required to release your software changes continuously.
When Developers Commit changes to a source repository and a specified branch, AWS CodePipeline automatically detects the changes. Those changes are built and tested. AWS CodePipeline can deploy applications to Amazon EC2 instances by using AWS CodeDeploy.
AWS CodeDeploy
Each Pipeline has 3 parts:
- Source Provider, where you can choose from:
- GitHub
- AWS CodeCommit
- AWS S3
- Build Provider, your choices are:
- AWS CodeBuild
- Jenkins CI
- Deploy Provider, using one of:
- AWS CodeDeploy
- AWS ElasticBeanstalk
So you see that there are multiple ways you can setup a CodePipeline pipeline. The last part (deploy provider) is necessarily an AWS-backed service because, after all, AWS isn't about to launch a product to help you deploy to its cloud competitors.
Code Pipeline = Source Provider + Build provider + Deploy Provider
You can, for instance, have a full AWS-based pipeline, with CodeCommit -> CodeBuild -> CodeDeploy.
Or you can choose external providers for the first two providers, with GitHub -> Jenkins CI -> AWS ElasticBeanstalk.
All Examples will use a Scala App, such as the one here: Packaging an Akka-Http Application using SBT and Docker: Simple Example
On this post, we'll explain how to define a pipeline consisting of the following 3 parts:
Source provider | Build Provider | Deploy Provider |
---|---|---|
GitHub | AWS CodeBuild | AWS ElasticBeanstalk |
AWS CodeDeploy:-
Works with various systems for configuration management, source control, continuous integration, continuous delivery, and continuous deployment.
You do not need to make changes to your existing code to use AWS CodeDeploy. You can use AWS CodeDeploy to control the pace of deployment across Amazon EC2 instances and to define the actions to be taken at each stage.
Step 1 - AWS Service Role Creation:
- Go to the AWS IAM in the Console
- For AWS CodeDeploy --> Role name --> select service as CodeDeploy --> Attach AWSCodePipelineFullAccess policy as well in the Role.
- For AWS EC2 Role --> Role name --> select service as EC2 --> Create new policy with below json --> attach.
Step 2 - AWS EC2 Instance
- Create EC2 instance or update existing instance with EC2 Role created in the above step.
- Install the AWS CodeDeploy agent on the EC2 instance by following commands
- sudo apt-get update
- sudo apt-get install python-pip ruby wget
- cd /home/ubuntu
- wget https://aws-codedeploy-<<bucket region>>.s3.amazonaws.com/latest/install
- chmod +x ./install
- sudo ./install auto
- sudo service codedeploy-agent start
- sudo systemctl enable codedeploy-agent
"Statement": [
{ "Action":
[ "s3:Get*", "s3:List*" ], "Effect": "Allow", "Resource": "*" }
] }
- Step 3 - CodeDeploy Integration
- Go to the AWS CodeDeploy Service in console
- Click Create Application and give application name and deployment group name.
- Deployment type as
- In-place Deployment - if you just want to update instance
- Blue/green Deployment - if you want to replace instance with the new one.
- Environment Configuration --> select EC2 instance on which you want to configure it.Choose the deployment configuration. More Information
- Select Service Role created above for the CodeDeploy.
- Go to the AWS CodePipeline Service in console.
- Name - Give Pipeline Name.
- Source Provider - Choose the GitHub repository you want to use as the source location for your pipeline. In Branch, from the drop-down list, choose the branch you want to use, and then choose Next step. More Information in GitHub Integration.
- Build: No Build to skip the configuration of a build stage.
- Deployment Provider: Choose AWS CodeDeploy, type or choose the name of an existing AWS CodeDeploy application in Application name and the name of a deployment group for that application in Deployment group.
- Service Role: type or choose the name of an existing role setup for AWS CodePipeline. If you do not have a service role, choose Create role, and then on the IAM console page that describes the role that will be created for you, choose Allow.
Note: You have to be Admin of Repo you want to deploy/use.
Sign up here with your email
7 comments
Write commentsNice artical
ReplyGreat Article Brother, it help us.
ReplyGold Casino: The Ultimate Guide For UK Players matchpoint matchpoint 우리카지노 계열사 우리카지노 계열사 890Slot machines - Slot machines - Best casino bonuses
Replysmm panel
Replysmm panel
İs ilanlari
İnstagram takipçi satın al
Hirdavatci
beyazesyateknikservisi.com.tr
SERVİS
Tiktok Para Hilesi
maltepe arçelik klima servisi
Replybeykoz bosch klima servisi
üsküdar bosch klima servisi
beykoz arçelik klima servisi
üsküdar arçelik klima servisi
pendik samsung klima servisi
pendik mitsubishi klima servisi
tuzla vestel klima servisi
tuzla bosch klima servisi
Good content. You write beautiful things.
Replykorsan taksi
hacklink
mrbahis
mrbahis
taksi
sportsbet
sportsbet
vbet
vbet
Good content. You write beautiful things.
Replysportsbet
korsan taksi
hacklink
mrbahis
vbet
hacklink
mrbahis
vbet
sportsbet
ConversionConversion EmoticonEmoticon