Introduction

The goal of this workshop is to demonstrate the interoperability of Jenkins on AWS Infrastructure and deploy applications with a CICD pipeline instantiated using Infrastructure-as-a-Code (IaC).

We are going to use 3 pieces of IaC:
(a) CloudFormation Template: First, we will run the CloudFormation template (written in yaml format) to deploy Jenkins on ECS Infrastructure along with the CloudWatch policies to auto-scale resources on demand.
(b) CDK Code: Then, we will instantiate the EKS infrastructure using CDK (written in typescript), for provisioning of the application.
(c ) Jenkinsfile: Later, we will create Jenkins Pipeline using Jenkinsfile written in groovy.



Jenkins can be used as an Orchestrator to pull down the code from a Code Repository, build the artifacts and deploy it on the target compute infrastructure. In this case, we will pull the code from GitHub, build and containerize the image and deploy it on EKS Worker Nodes from the Container Registry.

By the end of this workshop, we will build a Jenkins CI/CD pipeline as shown below, with GitHub as source, containerizing the application and deploying the flask application into EKS using Blue/Green methodology: dashboard

The figure below shows the overall architecture and equivalent CI/CD pipeline configured on Jenkins: dashboard

This workshop focuses on providing a simplistic method of configuring Jenkins, however, in practice, Jenkins can very well utilize the plugins for CodeBuild and CodeDeploy and hide the complexity under these AWS managed services.

The CDK launch will also create an AWS CodePipeline in parallel allowing the user to compare between AWS CodePipeline and Jenkins and select the best tool that fits their requirement.

dashboard
Workshop Author Contact: vnikunj@amazon.com