Today, I practiced creating a complete ๐ฅ๐ฒ๐น๐ฒ๐ฎ๐๐ฒ ๐ฃ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ in Azure DevOps for deploying a sample ๐๐ฆ๐ฃ.๐ก๐๐ง ๐๐ผ๐ฟ๐ฒ ๐๐ฒ๐ฏ ๐ฎ๐ฝ๐ฝ๐น๐ถ๐ฐ๐ฎ๐๐ถ๐ผ๐ป across ๐๐ฒ๐, ๐ง๐ฒ๐๐, ๐ฎ๐ป๐ฑ ๐ฃ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป environments using ๐๐๐๐ฟ๐ฒ ๐๐ฝ๐ฝ ๐ฆ๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ.
โ ๐ญ. ๐ฃ๐ฟ๐ฒ๐ฝ๐ฎ๐ฟ๐ฒ ๐๐ต๐ฒ ๐๐๐ถ๐น๐ฑ ๐๐ฟ๐๐ถ๐ณ๐ฎ๐ฐ๐
- Created a CI pipeline to build and publish the ASP.NET Core app
- Generated the artifact (
.zip
or.dll
files) to be used in the release pipeline
โ ๐ฎ. ๐ฆ๐ฒ๐ ๐จ๐ฝ ๐๐๐๐ฟ๐ฒ ๐๐ฝ๐ฝ ๐ฆ๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ๐
-
Created three Azure App Services (or deployment slots):
- One for ๐๐ฒ๐๐ฒ๐น๐ผ๐ฝ๐บ๐ฒ๐ป๐
- One for ๐ง๐ฒ๐๐๐ถ๐ป๐ด (๐ค๐)
- One for ๐ฃ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐ถ๐ผ๐ป
โ ๐ฏ. ๐๐ฟ๐ฒ๐ฎ๐๐ฒ ๐ฎ ๐ฅ๐ฒ๐น๐ฒ๐ฎ๐๐ฒ ๐ฃ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ ๐ถ๐ป ๐๐๐๐ฟ๐ฒ ๐๐ฒ๐๐ข๐ฝ๐
- Navigated to ๐ฃ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ๐ > ๐ฅ๐ฒ๐น๐ฒ๐ฎ๐๐ฒ๐ > ๐ก๐ฒ๐ ๐ฃ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ
- Linked the build artifact from the CI pipeline
- Defined ๐๐ต๐ฟ๐ฒ๐ฒ ๐๐๐ฎ๐ด๐ฒ๐: Dev, Test, and Production
โ ๐ฐ. ๐๐ผ๐ป๐ณ๐ถ๐ด๐๐ฟ๐ฒ ๐๐ฎ๐ฐ๐ต ๐ฆ๐๐ฎ๐ด๐ฒ
- Added the ๐๐๐๐ฟ๐ฒ ๐๐ฝ๐ฝ ๐ฆ๐ฒ๐ฟ๐๐ถ๐ฐ๐ฒ ๐ฑ๐ฒ๐ฝ๐น๐ผ๐ ๐๐ฎ๐๐ธ in each stage
- Selected the appropriate app service for the environment
- Used variables to manage environment-specific settings (like connection strings or API keys)
โ ๐ฑ. ๐๐ฑ๐ฑ ๐๐ฝ๐ฝ๐ฟ๐ผ๐๐ฎ๐น ๐๐ฎ๐๐ฒ๐
- Added ๐ฝ๐ฟ๐ฒ-๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐ ๐ฎ๐ฝ๐ฝ๐ฟ๐ผ๐๐ฎ๐น๐ before the Production stage to ensure safe and reviewed deployments
- Set conditions for sequential deployment (Dev โ Test โ Prod)
โ ๐ฒ. ๐๐ฒ๐ฝ๐น๐ผ๐ ๐ฎ๐ป๐ฑ ๐ฉ๐ฎ๐น๐ถ๐ฑ๐ฎ๐๐ฒ
- Triggered the pipeline
- Verified successful deployment to each environment
- Ensured the web app ran correctly in Dev, Test, and Prod stages
This setup ensures ๐ฎ๐๐๐ผ๐บ๐ฎ๐๐ฒ๐ฑ, ๐ฟ๐ฒ๐น๐ถ๐ฎ๐ฏ๐น๐ฒ, ๐ฎ๐ป๐ฑ ๐ฐ๐ผ๐ป๐๐ฟ๐ผ๐น๐น๐ฒ๐ฑ ๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐๐ across environmentsโminimizing errors and improving delivery speed.
๐๐ผ๐ ๐ฑ๐ผ ๐๐ผ๐ ๐ต๐ฎ๐ป๐ฑ๐น๐ฒ ๐ฒ๐ป๐๐ถ๐ฟ๐ผ๐ป๐บ๐ฒ๐ป๐-๐๐ฝ๐ฒ๐ฐ๐ถ๐ณ๐ถ๐ฐ ๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐บ๐ฒ๐ป๐๐ ๐ถ๐ป ๐๐ผ๐๐ฟ ๐๐/๐๐ ๐๐ผ๐ฟ๐ธ๐ณ๐น๐ผ๐๐? ๐๐ฎ๐๐ฒ ๐๐ผ๐ ๐ถ๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐๐ฒ๐ฑ ๐ฎ ๐บ๐๐น๐๐ถ-๐๐๐ฎ๐ด๐ฒ ๐ฟ๐ฒ๐น๐ฒ๐ฎ๐๐ฒ ๐ฝ๐ถ๐ฝ๐ฒ๐น๐ถ๐ป๐ฒ ๐๐ถ๐๐ต ๐ฎ๐ฝ๐ฝ๐ฟ๐ผ๐๐ฎ๐น ๐ด๐ฎ๐๐ฒ๐ ๐ถ๐ป ๐๐๐๐ฟ๐ฒ ๐๐ฒ๐๐ข๐ฝ๐?
Click now here : tinyurl.com/mwn4ts7j