Continuous delivery using Jenkins DSL, KMS, ECS, Cloudformation and Kubernetes
We build deployment pipelines and continuous delivery for organizations that want to increase their productivity. Here are some of the challenges that our clients commonly face:
Building Jenkins and installing plugins itself normally isn’t infrastructure as code
We always need solution for encrypting secrets for Jenkins
Some time build fails due to resource constraints
With the release of ecs-refarch-cloudformation, AWS created a blueprint to run micro services on ECS using Cloud-formation. It uses YAML format to manage cloud formation—much better than dealing with JSON.
We extended the same blueprint and added Jenkins master and slave. Master is also running on ECS. Slaves are auto scaling, and ALB is in front of it.
Why run Jenkins in ECS?
You can Scale up and down based on the build load
You’ll be able to Build Jenkins just like any other service. Official Jenkins image has built in support to install plugins
Jenkins Jobs are part of the container. Official Jenkins image also makes it as to add seed jobs to as part of the run time.
No additional effort required to get centralized logging for Jenkins build , logs are easily be shipped to
CloudWatch
Architecture:
Jenkins in Kubernetes
If you’re not that much into ECS and would like a different approach you can deploy the same jenkins image we built Here in a Kubernetes cluster. Follow the instructions in the repository’s Readme to build and push the image.
Just like in ECS we configured the kubernetes cluster to scale in or out based on the load its receiving, in this case we are using overall memory utilization of the auto scaling group. The jenkinsci/kubernetes-plugin can be used to run dynamic jenkins slaves inside the kubernetes cluster, so it’s just a matter of refactoring the jobs to run on those slaves and the auto scaling group will add more instances to the cluster when necessary.
Why run Jenkins in Kubernetes
You can scale the number of nodes in the cluster based on the load jenkins receives.
You can build your own custom version of Jenkins as a Helm chart and easily deploy it to the cluster
You can pull your jenkins images from a public or private repository using Helm. Further instructions for that can be found in our repository.
Architecture:
Jenkins pipeline output:
How to get started:
Here is the link to the code repo. Follow the Readme and comment if there are any issues.
We would like to know if you have similar setup or you have questions regarding this setup. Pull requests are welcomed 😃
nClouds Named a 2024 Geography and Global AWS Partner Award Finalist for MSP and SaaS Categories
nClouds recognized as MSP Partner of the Year and SaaS SI Partner of the Year finalist, ranking highly among the many AWS Partners around...
Read MoreRead More
Blog Post
Common Challenges in Cloud Security and Compliance (And How to Overcome Them)
As businesses increasingly migrate to cloud environments, the need for robust security and compliance measures has never been more critical. However, achieving and maintaining...
Read MoreRead More
Blog Post
nClouds Takes Part in Panel Discussing Technology Transformation Strategies
Industry experts gathered for a highly anticipated panel focusing on “Transforming for Success: Technical Optimization Strategies to Enhance Portfolio Company Valuation.”
Read MoreRead More
Blog Post
Navigating VMware Price Hikes: Why Migrating to AWS Could Be Your Best Option
The recent acquisition of VMware by Broadcom has led to a turbulent period for many organizations, with price hikes leaving customers in difficult positions.