Production Docker with GKE Kubernetes CI/CD with Travis CI Setup

Project Description

Overview:

This case study showcases the process of containerizing a multi-container application using Docker and setting up Travis CI/CD for continuous deployment on Google Kubernetes Engine. The project involved containerizing a multi-container application consisting of a frontend container built using React, a backend container built using Express, and a Postgres database for data storage. The goal was to provide a complete end-to-end solution for deploying the application in a secure and scalable manner.

Challenges:

The primary challenge was to ensure that the deployment process was secure and that the credentials required for deployment were protected. Additionally, the team had to ensure that the deployment process was efficient and that the application was deployed quickly to reduce downtime.

Project Solution

To address the challenges, the team first containerized the multi-container application using Docker. This involved building a frontend container using React, a backend container using Express, and a Postgres database for data storage. The team then set up Travis CI/CD with encrypted roles for Google Service Account Role to ensure that the deployment process was secure and that the credentials required for deployment were protected. The team also encrypted the file in the repository to set up Travis.

To ensure that the deployment process was efficient, the team set up Travis CI/CD to build the image when a push on the MASTER branch took place. Travis CI/CD built the image from the new repository and started running tests. The coverage from testing was taken and saved, and the command moved forward only if successful. Once the image was built and the tests passed, Travis accessed the Google Kubernetes Engine and applied the configuration settings. The latest files were brought in to the system, calling for the latest images. The latest images were tagged with GitHub SHA values to enable the latest image pulls, addressing the latest issue for image tagging.

Results:

Overall, the project provided a complete end-to-end solution for containerizing a multi-container application using Docker and setting up Travis CI/CD with encrypted roles for Google Service Account Role. The deployment process was secure and efficient, and the application was deployed quickly to reduce downtime. The team was able to apply the configuration settings to the master node of Kubernetes, and the Kubernetes master used the configuration to change the Nodes/VMs and adjust and update all environments with the new code, respectively. This solution helped the team streamline their deployment process and ensure that their application was deployed in a secure and scalable manner.