The client faced a challenge: they needed to design, create, and automate a cloud Jenkins infrastructure with containerized Windows and Linux build agents. The infrastructure needed to be scalable and able to handle webhook requests from GitHub.
After careful planning, the Luneba team decided to use the ECS cluster with Fargate services that run in separate VPC in hub-and-spoke network. Jenkins master node is running as Fargate service, build agents run as short-living tasks.
One challenge the team faced was that Windows containers could not be run on Fargate as tasks, so we had to manage ECS container instances outside of the ECS cluster as EC2 instances. EC2 Autoscaling was used to autoscale these instances as needed. However, this did not impede the ability to run containerized Windows agents on Jenkins.
We also chose to use Nginx as a reverse proxy to pass webhook requests from GitHub to Jenkins. Fargate service runs Nginx as long-living tasks.
To manage the infrastructure, the team used CloudFormation templates. To implement a reliable application, Jenkins master node configuration is kept in YAML files and build data is kept in shared EFS storage.
Overall, Luneba was able to successfully implement the client’s cloud-native Jenkins environment that was integrated with GitHub and it is now running smoothly. The cost of usage corresponds to the Pay-As-You-Go model, so the client is able to easily manage and control their costs.
Migrate Jenkins from on-premise to AWS
Integrate Jenkins with GitHub with Enterprise Plan
Luneba’s Proposed Solution
Design, create and automate cloud Jenkins infrastructure with containerized Windows and Linux agents.
Describe auto-scaling EC2 instances to run Jenkins Windows agents.
Create an Nginx cluster to pass webhook requests from GitHub to Jenkins.
Describe Jenkins infrastructure by CloudFormation templates, and keep Jenkins master node data in YAML files.
CloudFormation, EC2, EC2 Autoscaling, ALB, VPC, EFS, ECR, ECS with Services, Fargate and EC2 tasks, S3, IAM, Secret Manager, Route 53, CloudWatch, Docker, PowerShell Core, Jenkins, Nginx, GitHub.
Cloud-native Jenkins is up and running
Jenkins is integrated with GitHub
The cost of usage corresponds to the Pay-As-You-Go model
The client faced a challenge: they needed to design, create, and automate a cloud Jenkins infrastructure with containerized Windows and Linux build agents.
The client needed to create a reliable, high-available, scalable, and secure cloud infrastructure for their microservice application. They needed to support four environments for their development team, and automate builds and deployments. Additionally, the client needed to ensure secure access to inner resources for their Dev and QA engineers.