Background: My company is a leader in product lifecycle management (PLM), so our application needed to be stellar, as well. It is a multi-container application and needs to be hosted on AWS Cloud FARGATE. Typically manual deployment takes around one full day, including all configurations. I used the Jenkins CI pipeline to host the application on AWS cloud with ease and without manual intervention. But AWS FARGATE has limitations to support multi-containers per tasks definitions, so the challenge was to update task definition and services every time for every code change in Bitbucket.
Goals: Deploy application on AWS Cloud FARGATE containers quickly, and with less manual effort.
Solution & Results: To deploy our multi-container application, we created one Jenkins instance with Docker and Docker-compose integration. For every code change, it detects the change that Docker composes locally to create the images. It then tags those images, saving them to a local repository.
With the ECR plugin, we then push those newly created images to AWS ECR repository. Using Shell Script and jq utility, we can easily update the multiple FARGATE task definitions for multi-container applications. Once done, we then update the FARGATE services accordingly in order to have our latest updated application running up on the cloud.
Jenkins rocks in so many ways: 1) less time required to have the latest application on AWS FARGATE containers, 2) less maintenance, and 3) large community support.
The results were just what I was hoping for: