We are using a bunch of EC2 instances which might scale in the future (around 100 instances), now we are looking towards auto deployments using either Jenkins or AWS Code deploy.
I found that we can use AWS Code deploy plugin with Jenkins, but What are the pros and cons of following?
1) Standalone AWS Code Deploy 2) Jenkins with AWS Code Deploy plugin.
Jenkins and AWS CodePipeline are both easy to use and set up. Jenkins installation is straightforward and can be completed in minutes. AWS provides templates that rely on CodeBuild and CodeDeploy to start creating your pipelines.
AWS CodeDeploy belongs to "Deployment as a Service" category of the tech stack, while Jenkins can be primarily classified under "Continuous Integration". Some of the features offered by AWS CodeDeploy are: AWS CodeDeploy fully automates your code deployments, allowing you to deploy reliably and rapidly.
CodePipeline is a continuous "deployment" tool, while Jenkins is more of a continuous "integration" tool. Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run.
To integrate with Jenkins, AWS CodePipeline requires you to install the CodePipeline Plugin for Jenkins on any instance of Jenkins you want to use with CodePipeline. You should also configure a dedicated IAM user to use for permissions between your Jenkins project and CodePipeline.
We use both CodeDeploy and Jenkins to manage deployments to our AWS environments.
They each have their roles, and I do not see it as a pro/con analysis. I believe you need BOTH to manage both continuous integration builds (Jenkins) and the process of deploying tested builds to your EC2 environments (CodeDeploy)
Here is our setup:
Jenkins polls our SCM for changed. When a change occurs, the app is built, archived into a ZIP, and registered as a deployable artifact in CodeDeploy. We label the revision with the Jenkins build number - say app_6111.zip. Each build is sent the our code deployment bucket: s3:codedeploy-example-com/app
In CodeDeploy we have an application configured, with deployment groups for each environment eg Testing, Production. Since we use #1, all our builds are always ready for immediately deployment. So with one or two clicks, we deploy revision app_6111.zip to a Testing server, for example.
For us, Jenkins is a swiss army knife of modern devops and continuous integration, testing and deployment. Its the backbone from which we can manage builds, testing and building deployment artifacts. We can integrate with all AWS services such as S3, CodeDeploy, Elastic Beanstalk etc.
To answer your specific questions:
I found that we can use AWS Code deploy plugin with Jenkins, but What are the pros and cons of following?
1) Standalone AWS Code Deploy
A standalone CodeDeploy will not be integrated with your build process. It must be configured to either a static S3 artifact that is manually uploaded, or a Github URL. Github is fine, but there is no concept of a build - it deploys from the master or other branch. You cannot easily roll back to a known build for example. Testing is not integrated. No ability to pipeline tasks/jobs.
2) Jenkins with AWS Code Deploy plugin.
This is the preferred approach IMHO. Use both tools. Build known and tested builds, then register the deployment to CodeDeploy. Life is good.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With