Automating Web Deployment on Cloud
This repository addresses the automation of web deployment on the cloud in multiple phases. It involves setting up a basic web application deployment to serve static files using Docker, Terraform, and Kubernetes. The provided code focuses on a specific aspect of this process, which includes building the Docker image, updating Terraform code with the latest tag, and creating a pull request in Git as part of the continuous integration (CI) process. Once the code is merged into the main branch, it triggers a Terraform plan in the Terraform code, deploying and exposing the application in Kubernetes
This phase automates the process of building and pushing Docker images. Here’s how it works:
Automatic Trigger: The process is automatically triggered if there is any pull request and changes are detected in the Docker folder.
Image Tag Version: By default, the image tag version is set to DOCKER_TAG=0.${github.run_number}.${github.event.number}-dev
. This ensures that each build has a unique version identifier.
Custom Image Tag: Users have the option to provide their own image tag. They can do this by navigating to the GitHub Actions workflow and modifying the image tag parameter.
Workflow Execution:
This phase streamlines the process of Docker image management, ensuring consistency and reliability in the deployment pipeline.
This phase handles the updating of the image tag and the creation of pull requests. Here’s a breakdown of the process:
Continuous Integration: This phase integrates the updated image tag into the deployment pipeline, ensuring smooth and continuous deployment.
Image Tag Update: The image tag is updated as part of this phase to reflect the changes made to the Docker image. This ensures that the latest version of the image is used for deployment.
Terraform Plan: The Terraform plan is generated to assess the impact of the changes made to the infrastructure. This step provides insight into the modifications that will be applied during the deployment process.
Pull Request Creation:
Workflow Execution:
This phase ensures that changes to the Docker image and infrastructure are properly evaluated and integrated into the deployment pipeline, maintaining the reliability and stability of the application.
This phase focuses on deploying the changes to the infrastructure and application. Here’s a detailed overview:
Review and Approve:
Deployment Process:
UI Access:
Workflow Integration:
This phase completes the deployment cycle, ensuring that changes to the infrastructure and application are successfully deployed and accessible to users. It emphasizes the importance of thorough review and approval processes to maintain the reliability and stability of the deployed environment.