Home
%3CLINGO-SUB%20id%3D%22lingo-sub-871952%22%20slang%3D%22en-US%22%3ETop%20Tips%20for%20working%20with%20Deploying%20Azure%20App%20Services%20CI%2FCD%20Deployment%20Slots%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871952%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId-1822859302%22%20id%3D%22toc-hId-1822859302%22%3ECI%2FCD%20Best%20practice%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20800px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F133286iA15688A2A567A91B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Ci-CD.png%22%20title%3D%22Ci-CD.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EA%20must%20read%20for%20all%20Developers%20is%20the%20following%20eBook%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.msdn.com%2Fb%2Fmicrosoft_press%2Farchive%2F2014%2F07%2F23%2Ffree-ebook-building-cloud-apps-with-microsoft-azure.aspx%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3EBuilding%20Real%20World%20Cloud%20Apps%20with%20Azure%3C%2FSTRONG%3E%3C%2FA%3E%3CSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.msdn.com%2Fb%2Fmicrosoft_press%2Farchive%2F2014%2F07%2F23%2Ffree-ebook-building-cloud-apps-with-microsoft-azure.aspx%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CEM%3E%3A%20Best%20practices%20for%20DevOps%2C%20data%20storage%2C%20high%20availability%2C%20and%20more%3C%2FEM%3E%2C%20by%20Scott%20Guthrie%2C%20Mark%20Simms%2C%20Tom%20Dykstra%2C%20Rick%20Anderson%2C%20and%20Mike%20Wasson.%26nbsp%3B%26nbsp%3B%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThis%20book%20explains%2013%20patterns%20and%20practices%20that%20can%20help%20you%20be%20successful%20developing%20web%20apps%20for%20the%20cloud.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20style%3D%22text-align%3A%20left%3B%22%20id%3D%22toc-hId--729297659%22%20id%3D%22toc-hId--729297659%22%3E%3CSPAN%3ERecommendations%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3EThe%20first%20two%20recommended%20development%20process%20patterns%20were%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Faspnet%2Faspnet%2Foverview%2Fdeveloping-apps-with-windows-azure%2Fbuilding-real-world-cloud-apps-with-windows-azure%2Fautomate-everything%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22relative-path%22%3EAutomate%20Everything%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Faspnet%2Faspnet%2Foverview%2Fdeveloping-apps-with-windows-azure%2Fbuilding-real-world-cloud-apps-with-windows-azure%2Fsource-control%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22relative-path%22%3ESource%20Control%3C%2FA%3E%2C%20and%20the%20third%20process%20pattern%20combines%20them.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1013512676%22%20id%3D%22toc-hId-1013512676%22%3EContinuous%20integration%20(CI)%3C%2FH2%3E%0A%3CP%3ECI%20means%20that%20whenever%20a%20developer%20checks%20in%20code%20to%20the%20source%20repository%2C%20a%20build%20is%20automatically%20triggered.%20Continuous%20delivery%20(CD)%20takes%20this%20one%20step%20further%3A%20after%20a%20build%20and%20automated%20unit%20tests%20are%20successful%2C%20you%20automatically%20deploy%20the%20application%20to%20an%20environment%20where%20you%20can%20do%20more%20in-depth%20testing.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22continuous-integration-and-continuous-delivery-workflow%22%20id%3D%22toc-hId--1538644285%22%20id%3D%22toc-hId--1538644285%22%3EContinuous%20Integration%20and%20Continuous%20Delivery%20workflow%3C%2FH2%3E%0A%3CP%3EGenerally%20we%20recommend%20that%20you%20do%20continuous%20delivery%20to%20your%20development%20and%20staging%20environments.%20Most%20teams%2C%20even%20at%20Microsoft%2C%20require%20a%20manual%20review%20and%20approval%20process%20for%20production%20deployment.%20For%20a%20production%20deployment%20you%20might%20want%20to%20make%20sure%20it%20happens%20when%20key%20people%20on%20the%20development%20team%20are%20available%20for%20support%2C%20or%20during%20low-traffic%20periods.%20But%20there's%20nothing%20to%20prevent%20you%20from%20completely%20automating%20your%20development%20and%20test%20environments%20so%20that%20all%20a%20developer%20has%20to%20do%20is%20check%20in%20a%20change%20and%20an%20environment%20is%20set%20up%20for%20acceptance%20testing.%20for%20more%20details%20see%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Faspnet%2Faspnet%2Foverview%2Fdeveloping-apps-with-windows-azure%2Fbuilding-real-world-cloud-apps-with-windows-azure%2Fcontinuous-integration-and-continuous-delivery%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Faspnet%2Faspnet%2Foverview%2Fdeveloping-apps-with-windows-azure%2Fbuilding-real-world-cloud-apps-with-windows-azure%2Fcontinuous-integration-and-continuous-delivery%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EFor%20more%20information%20on%20the%20continuous%20integration%20and%20delivery%20features%20of%20Azure%20DevOps%20Services%2C%20see%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Findex%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22absolute-path%22%3Ethe%20Azure%20DevOps%20documentation%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you're%20looking%20for%20a%20turn-key%20project%20management%2C%20team%20collaboration%2C%20and%20source%20control%20solution%2C%20check%20out%20Azure%20DevOps%20Services.%20Sign%20up%20at%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdev.azure.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EAzure%20DevOps%20Services%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20class%3D%22border-0%20fon-normal%22%20id%3D%22toc-hId-204166050%22%20id%3D%22toc-hId-204166050%22%3EGetting%20started%20with%20Azure%20DevOps%3C%2FH2%3E%0A%3CP%3ESimplify%20and%20speed%20up%20the%20DevOps%20process%20with%20Azure%20DevOps%20services.%20A%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3Ezure%20DevOps%20Server%20Labs%20available%20now%2C%20you%20can%20l%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3Eearn%20how%20you%20can%20remove%20barriers%20between%20teams%2C%20encourage%20collaboration%2C%20and%20improve%20the%20flow%20of%20value%20to%20your%20customers.%20Simply%20%3C%2FSPAN%3E%3CA%20class%3D%22btn%20btn-sm%20btn-primary%20mt-1%22%20style%3D%22font-family%3A%20inherit%3B%20background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fazuredevopslabs.com%2Flabs%2Fdevopsserver%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EStart%20Learning%3C%2FA%3E%26nbsp%3Bthe%20labs%20will%20help%20you%20to%20get%20started%20with%20Azure%20DevOps%20services%20to%20automate%20software%20delivery%20and%20meet%20business%20needs.%20See%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fazuredevopslabs.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fazuredevopslabs.com%2F%3C%2FA%3E%26nbsp%3Bfor%20full%20details.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1946976385%22%20id%3D%22toc-hId-1946976385%22%3EExample%20with%20Azure%20App%20Service%20Deployment%20slots%3C%2FH2%3E%0A%3CP%3EWhen%20you%20deploy%20your%20web%20app%2C%20web%20app%20on%20Linux%2C%20mobile%20back%20end%2C%20or%20API%20app%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D529714%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EAzure%20App%20Service%3C%2FA%3E%2C%20you%20can%20use%20a%20separate%20deployment%20slot%20instead%20of%20the%20default%20production%20slot%20when%20you're%20running%20in%20the%26nbsp%3BStandard%2C%26nbsp%3BPremium%2C%20or%26nbsp%3BIsolated%26nbsp%3BApp%20Service%20plan%20tier.%20Deployment%20slots%20are%20live%20apps%20with%20their%20own%20host%20names.%20App%20content%20and%20configurations%20elements%20can%20be%20swapped%20between%20two%20deployment%20slots%2C%20including%20the%20production%20slot.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--605180576%22%20id%3D%22toc-hId--605180576%22%3EUsing%20Deployment%20slots%26nbsp%3B%3C%2FH2%3E%0A%3CP%3EDeploying%20your%20application%20to%20a%20deployment%20slot%20has%20the%20following%20benefits%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EYou%20can%20validate%20web%20app%20changes%20in%20a%20deployment%20slot%20before%20swapping%20it%20with%20the%20another%20slot.%3C%2FLI%3E%0A%3CLI%3EEliminate%20downtime%20on%20deployment%2C%20and%20automate%20the%20swapping.%3C%2FLI%3E%0A%3CLI%3EEasy%20to%20swap%20a%20bad%20deployment%20back.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ESee%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEach%20App%20Service%20plan%20tier%20supports%20a%20different%20number%20of%20deployment%20slots.%20There's%20no%20additional%20charge%20for%20using%20deployment%20slots.%20To%20find%20out%20the%20number%20of%20slots%20your%20app's%20tier%20supports%2C%20see%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-subscription-service-limits%23app-service-limits%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EApp%20Service%20limits%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20scale%20your%20app%20to%20a%20different%20tier%2C%20make%20sure%20that%20the%20target%20tier%20supports%20the%20number%20of%20slots%20your%20app%20already%20uses.%20For%20example%2C%20if%20your%20app%20has%20more%20than%20five%20slots%2C%20you%20can't%20scale%20it%20down%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStandard%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etier%2C%20because%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStandard%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etier%20supports%20only%20five%20deployment%20slots.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1137629759%22%20id%3D%22toc-hId-1137629759%22%3E%3CFONT%20face%3D%22arial%2Chelvetica%2Csans-serif%22%3EPractice%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EWithin%20the%20Azure%20Portal%20(%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fportal.azure.com%3C%2FA%3E)%20you%20need%20to%20take%20the%20following%20steps%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EIn%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fportal.azure.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Portal%3C%2FA%3E%2C%20open%20the%20blade%20of%20your%20Azure%20App%20Service.%3C%2FLI%3E%0A%3CLI%3EClick%20Settings%2C%20and%20then%20click%20Deployment%20slots.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20%E2%80%9Cdeployment%20slots%E2%80%9D%20blade%20click%20on%20Add%20Slot.%3C%2FLI%3E%0A%3CLI%3EIn%20the%20%E2%80%9CAdd%20a%20slot%E2%80%9D%20blade%2C%20give%20the%20slot%20a%20name%2C%20and%20select%20whether%20to%20clone%20web%20app%20configuration%20from%20another%20existing%20deployment%20slot.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EThe%20following%20Microsoft%20Doc%20has%20a%20full%20walkthroughs%20of%20developing%20deployment%20slots%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1414527202%22%20id%3D%22toc-hId--1414527202%22%3ETop%20Tips%3C%2FH2%3E%0A%3CP%3EBefore%20creating%20deployment%20slots%20you%20need%20to%20have%20a%20useful%20pattern.%20In%20my%20opinion%20it%20is%20best%20to%20use%20a%20deployment%20slot%20as%20a%20pre%20production%20environment.%20So%20in%20my%20case%20I%20use%20pre-production%20and%20production%20This%20will%20lead%20to%20the%20following%20solution%20architecture.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20617px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F133282i5AE4779F6A5D88C1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Deploymentslots.png%22%20title%3D%22Deploymentslots.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%26nbsp%3Bsolution%20architecture%20makes%20sure%20that%20the%20development%2F%20test%20%2F%20acceptation%20environment%20is%20completely%20separated%20from%20production.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBy%20simply%20utilising%20a%20pre%20production%20deployment%20slot%20you%20are%20able%20to%20test%20your%20application%20against%20the%20production%20SQL%20database.%20With%20this%20setup%26nbsp%3Byou%20can%E2%80%99t%20alter%20any%20data%20in%20pre-production%20this%20is%20why%20there%20is%20a%20dotted%20line%20between%20the%20pre%20production%20web%20app%20and%20the%20test%20%2F%20acceptation%20database.%20That%20you%20could%20use%20to%20test%20all%20your%20CRUD%20operations.%20Besides%20this%20is%20also%20makes%20sure%20that%20the%20pre%20production%20is%20as%20close%20to%20production%20as%20needed%20for%20a%20clear%20test%20results.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-328283133%22%20id%3D%22toc-hId-328283133%22%3EConsiderations%3C%2FH2%3E%0A%3CP%3EWhen%20making%20use%20of%20deployment%20slots%20there%20are%20a%20considerations%20and%20disadvantages%20to%20be%20aware%20of%3A%3C%2FP%3E%0A%3CP%3EThe%20web%20application%20and%20deployment%20slots%20are%20created%20within%20the%20same%20environment%20(This%20is%20also%20the%20case%20when%20you%20create%20a%20Azure%20Web%20App%20within%20the%20same%20App%20Service%20Plan).%20This%20means%20resources%20between%20the%20two%20instances%20are%20shared%2C%20So%20if%20you%20want%20to%20do%20a%20stress%20test%20on%20pre-production%20you%20are%20certain%20that%20it%20will%20effect%20the%20performance%20of%20the%20production%20instanc%26nbsp%3B%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3Esee%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots.%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1338597263%22%20id%3D%22toc-hId--1338597263%22%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3EAdditional%20Resources%26nbsp%3B%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fazure.microsoft.com%2Fdocumentation%2Farticles%2Fweb-sites-deploy%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EDeploy%20a%20web%20app%20in%20Azure%20App%20Service%3C%2FA%3E.%20using%20Git%2C%20Cloud%20Shell%2C%20Kudu%20Build%20Server%2C%20Azure%20Pipelines%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fprojectkudu%2Fkudu%2Fwiki%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EProject%20Kudu%20documentation%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-continuous-deployment%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22relative-path%22%3EContinuous%20deployment%20to%20Azure%20App%20Service%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fscripts%2Fcli-deploy-local-git%3Ftoc%3D%252fcli%252fazure%252ftoc.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22relative-path%22%3ESample%3A%20Create%20a%20web%20app%20and%20deploy%20code%20from%20a%20local%20Git%20repository%20(Azure%20CLI)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fscripts%2Fpowershell-deploy-local-git%3Ftoc%3D%252fpowershell%252fmodule%252ftoc.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22relative-path%22%3ESample%3A%20Create%20a%20web%20app%20and%20deploy%20code%20from%20a%20local%20Git%20repository%20(PowerShell)%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.amazon.com%2FContinuous-Delivery-Deployment-Automation-Addison-Wesley%2Fdp%2F0321601912%2Fref%3Dsr_1_1%3Fs%3Dbooks%26amp%3Bie%3DUTF8%26amp%3Bqid%3D1377126361%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3EContinuous%20Delivery%3A%20Reliable%20Software%20Releases%20through%20Build%2C%20Test%2C%20and%20Deployment%20Automation%3C%2FA%3E.%20Book%20by%20Jez%20Humble.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.amazon.com%2FRelease-It-Production-Ready-Pragmatic-Programmers%2Fdp%2F0978739213%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20data-linktype%3D%22external%22%3ERelease%20It!%20Design%20and%20Deploy%20Production-Ready%20Software%3C%2FA%3E.%20Book%20by%20Michael%20T.%20Nygard.%3C%2FP%3E%0A%3CDIV%20class%3D%22%22%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-871952%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20cloud%20enables%20you%20to%20minimize%20the%20cost%20of%20maintaining%20a%20test%20environment%20because%20you%20only%20pay%20for%20the%20environment%20resources%20as%20long%20as%20you're%20using%20them.%20%3CSPAN%3EAzure%20DevOps%20provides%20integration%20with%20popular%20open%20source%20and%20third-party%20tools%20and%20services%20across%20the%20entire%20DevOps%20workflow.%20Use%20the%20tools%20and%20languages%20you%20know.%20Spend%20less%20time%20integrating%20and%20more%20time%20delivering%20higher-quality%20software%2C%20faster.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-871952%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeployment%20%26amp%3B%20Operations%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDevOps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esource%20control%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

CI/CD Best practice

 

Ci-CD.png

A must read for all Developers is the following eBook Building Real World Cloud Apps with Azure: Best practices for DevOps, data storage, high availability, and more, by Scott Guthrie, Mark Simms...

 

This book explains 13 patterns and practices that can help you be successful developing web apps for the cloud. 

 

Recommendations

The first two recommended development process patterns were Automate Everything and Source Control, and the third process pattern combines them.

 

Continuous integration (CI)

CI means that whenever a developer checks in code to the source repository, a build is automatically triggered. Continuous delivery (CD) takes this one step further: after a build and automated unit tests are successful, you automatically deploy the application to an environment where you can do more in-depth testing.

 

Continuous Integration and Continuous Delivery workflow

Generally we recommend that you do continuous delivery to your development and staging environments. Most teams, even at Microsoft, require a manual review and approval process for production deployment. For a production deployment you might want to make sure it happens when key people on the development team are available for support, or during low-traffic periods. But there's nothing to prevent you from completely automating your development and test environments so that all a developer has to do is check in a change and an environment is set up for acceptance testing. for more details see https://docs.microsoft.com/en-us/aspnet/aspnet/overview/developing-apps-with-windows-azure/building-...


For more information on the continuous integration and delivery features of Azure DevOps Services, see the Azure DevOps documentation.

 

If you're looking for a turn-key project management, team collaboration, and source control solution, check out Azure DevOps Services. Sign up at Azure DevOps Services.

 

Getting started with Azure DevOps

Simplify and speed up the DevOps process with Azure DevOps services. Azure DevOps Server Labs available now, you can learn how you can remove barriers between teams, encourage collaboration, and improve the flow of value to your customers. Simply Start Learning the labs will help you to get started with Azure DevOps services to automate software delivery and meet business needs. See https://azuredevopslabs.com/ for full details.

 

Example with Azure App Service Deployment slots

When you deploy your web app, web app on Linux, mobile back end, or API app to Azure App Service, you can use a separate deployment slot instead of the default production slot when you're running in the Standard, Premium, or Isolated App Service plan tier. Deployment slots are live apps with their own host names. App content and configurations elements can be swapped between two deployment slots, including the production slot.

 

Using Deployment slots 

Deploying your application to a deployment slot has the following benefits:

  • You can validate web app changes in a deployment slot before swapping it with the another slot.
  • Eliminate downtime on deployment, and automate the swapping.
  • Easy to swap a bad deployment back.

See https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots 

 

Each App Service plan tier supports a different number of deployment slots. There's no additional charge for using deployment slots. To find out the number of slots your app's tier supports, see App Service limits.

 

To scale your app to a different tier, make sure that the target tier supports the number of slots your app already uses. For example, if your app has more than five slots, you can't scale it down to the Standard tier, because the Standard tier supports only five deployment slots.

 

Practice

Within the Azure Portal (https://portal.azure.com) you need to take the following steps:

  1. In the Azure Portal, open the blade of your Azure App Service.
  2. Click Settings, and then click Deployment slots.
  3. In the “deployment slots” blade click on Add Slot.
  4. In the “Add a slot” blade, give the slot a name, and select whether to clone web app configuration from another existing deployment slot.

The following Microsoft Doc has a full walkthroughs of developing deployment slots https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots 

 

Top Tips

Before creating deployment slots you need to have a useful pattern. In my opinion it is best to use a deployment slot as a pre production environment. So in my case I use pre-production and production This will lead to the following solution architecture.

Deploymentslots.png

This solution architecture makes sure that the development/ test / acceptation environment is completely separated from production. 

 

By simply utilising a pre production deployment slot you are able to test your application against the production SQL database. With this setup you can’t alter any data in pre-production this is why there is a dotted line between the pre production web app and the test / acceptation database. That you could use to test all your CRUD operations. Besides this is also makes sure that the pre production is as close to production as needed for a clear test results.

 

Considerations

When making use of deployment slots there are a considerations and disadvantages to be aware of:

The web application and deployment slots are created within the same environment (This is also the case when you create a Azure Web App within the same App Service Plan). This means resources between the two instances are shared, So if you want to do a stress test on pre-production you are certain that it will effect the performance of the production instanc see https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots.

 

Additional Resources 

 

Deploy a web app in Azure App Service. using Git, Cloud Shell, Kudu Build Server, Azure Pipelines

 

Project Kudu documentation

 

Continuous deployment to Azure App Service

 

Sample: Create a web app and deploy code from a local Git repository (Azure CLI)

 

Sample: Create a web app and deploy code from a local Git repository (PowerShell)

 

Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation. Book by Jez Humble.

 

Release It! Design and Deploy Production-Ready Software. Book by Michael T. Nygard.