- Project Description
- Services used in the project
- E2E walk-through: CI
- E2E walk-through: CD
- A glimpse into the deployment stage work in progress.
- We Have successfully deployed our website into the cloud provider.
- preparing the other deployment stages and conditional approval for the production environment.
- We can see that our dev-env and qa-env already live and the prod still waiting for my approval on the cd to prevent Mistakes , errors and bugs from reaching the main production environment.
- I navigated back into Azure DevOps platform and give the approval for deployment.
- We Can see after clicking the approvel we can see that we our final stage already launched and live.
- Deployment using terraform.
- Iac CI
- Iac CD
- To-Do
The Project is a simple website that provides the ability to buy and sell parts as an e-commerce website I have decided to create the full cycle of DevOps CI/CD Life Cycle and I will go and describe what I'm doing in each phase so let's start.
- Azure DevOps repos,CI/CD Pipelines/Artifact.
- Azure Cloud WebAppServices / Azure SQL.
- Iac deployment with Terraform.
- I have used Azure Repos to upload the source code of the used example.
- I have configured a CI Pipeline to automatically build upon any new commit to the azure repo You can Check up the link for the CI Here the following image shows up the used sequence on the CI Pipeline, After the CI is done with the build will store the package on Azure drop artifact.
CI Pipeline build agent sequence:
-
After that, it was the Azure server backend creation of Resource group that contain Web-app - Database and server for the connection.
-
To create the full deployment plan I have created an environment for each stage Dev,QA and deployment the following pics show up creation of each stage.
-
This is Dev environment example and i don't want to post so many pictures so i will show only the dev env for now and you can check the others in the Resources
-You can check the CD on Azure DevOps from Here
We can see that our dev-env and qa-env already live and the prod still waiting for my approval on the cd to prevent Mistakes , errors and bugs from reaching the main production environment.
We Can see after clicking the approval we can see that we our final stage already launched and live.
-
we will notice the difference between the manual steps of deployment even though both is given in a CI/CD pipeline but the Iac is making it much easier since it will create the Infrastructure and its components in the background given a single terraform file that will provide us with much easier for preparing multi environments and re-usability.
-
You can review the Iac from Here
-
The terraform file will configure the resource groups, SQL DB, maintain the connection string and configure the firewall rules that we did manually.
- The difference in the Ci for the Iac that we will maintains a copy of the tf along to be stored with the publish artifact so it can be used by the CD pipeline as shown in the picture below.
- We can notice that we have new added tasks to our cd given that we using different deployment methods.
- installing, init then apply the terraform to our agent to be able to perform the terraform tasks since terraform needed to be installed on the machine that performs the given task.
- locate our TF file to be able to deploy it.
- After the successful run of our CI our deployment to dev env started and as shown in the picture below that we still don't have anything created in our Azure portal.
- After few minutes we can notice that our resource group got created with its components.
- Our website is live and ready to be used.