Home
%3CLINGO-SUB%20id%3D%22lingo-sub-847608%22%20slang%3D%22en-US%22%3EDeploying%20to%20Production%20using%20Local%20Cache%20and%20Swap%20with%20Preview%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-847608%22%20slang%3D%22en-US%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%20style%3D%22direction%3A%20ltr%3B%22%3E%0A%3CTABLE%20style%3D%22direction%3A%20ltr%3B%20border-collapse%3A%20collapse%3B%20margin-left%3A%20.3333in%3B%20border%3A%200pt%20solid%20%23A3A3A3%3B%22%20title%3D%22%22%20border%3D%220%22%20summary%3D%22%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22border-width%3A%200pt%3B%20background-color%3A%20%23deebf6%3B%20vertical-align%3A%20top%3B%20width%3A%207.9909in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ENote%3C%2FSPAN%3E%3A%20This%20article%20applies%20to%20Windows%20App%20Service%20Plan%20only%20as%20both%20%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ELocal%20Cache%3C%2FSPAN%3Eand%20%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ESwap%20with%20Preview%3C%2FSPAN%3Eare%20not%20available%20for%20Linux%20App%20Service%20Plan's.%20Additionally%2C%20%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ESlot%20Swap%20%3C%2FSPAN%3Efeature%20is%20available%20for%20sites%20running%20in%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EStandard%20%3C%2FSPAN%3Eor%20higher%20pricing%20tiers.%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3EScenario%3C%2FSPAN%3E%3A%20There%20is%20a%20site%20in%20production%20which%20is%20running%20on%202%20instances%20and%20has%20Local%20Cache%20enabled.%20We%20need%20to%20deploy%20new%20content%20to%20it%20with%20minimal%20downtime.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3EPre-requisites%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%221%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%221%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EThe%20App%20Service%20Plan%20is%20using%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EWindows%20OS%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EThe%20production%20slot%20has%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-local-cache%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ELocal%20Cache%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eenabled.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EThe%20staging%20slot%20where%20the%20new%20content%2Fcode%20is%20being%20deployed%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Edoesn't%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Ehave%20%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-local-cache%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ELocal%20Cache%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eenabled.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%22%3ESteps%20to%20deploy%3C%2FSPAN%3E%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%221%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%221%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EIf%20not%20already%20created%2C%20then%20create%20a%20new%20staging%20slot.%20%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EDeploy%20the%20code%20to%20the%20staging%20slot.%20%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ENavigate%20to%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EDeployment%20slots%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eand%20click%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ESwap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ESelect%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ESource%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eand%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ETarget%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eslots%20and%20select%20the%20checkbox%20%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EPerform%20swap%20with%20preview%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%22.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20442px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131017i7B7B951BEE5D6D91%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Swapwithpreview1.jpg%22%20title%3D%22Swapwithpreview1.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%221%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%225%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EYou%20can%20review%20the%20changes%20that%20will%20be%20applied%20and%20then%20click%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EStart%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Ebutton.%20This%20will%20initiate%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EPhase%20one%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eof%20the%20swap.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EThis%20will%20perform%20a%20restart%20of%20the%20application%20so%20that%20the%20prod%20settings%20can%20be%20applied%20to%20the%20application%20and%20also%20to%20initialize%20Local%20Cache.%20This%20completes%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EPhase%20one%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eof%20the%20swap.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EOnce%20the%20app%20has%20been%20restarted%2C%20browse%20the%20slot%20to%20review%20the%20changes%20that%20were%20made%20to%20the%20new%20code%20base%20for%20this%20application.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EIn%20order%20to%20proceed%20with%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EPhase%20two%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%2C%20we%20need%20to%20wait%20for%20Local%20cache%20initialization%20to%20complete.%20Follow%20the%20below%20steps%20to%20determine%20if%20the%20Local%20Cache%20has%20been%20initialized.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%22i%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%221%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EBrowse%20to%20the%20KUDU%20Console%20of%20the%20slot.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EClick%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EProcess%20Explorer%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Emenu.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3EYou%20will%20see%20a%20list%20of%20process.%20Right%20click%20the%20process%20that%20doesn't%20have%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3ESCM%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Etag%20against%20it%20and%20click%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20bold%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3Eproperties%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E.%3C%2FSPAN%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20475px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131018i8D1F74CDDAB4579F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ProcExp.jpg%22%20title%3D%22ProcExp.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EClick%20on%20Environment%20variables%20and%20find%20environment%20variable%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20color%3A%20%237030a0%3B%20background%3A%20%23F2DCDB%3B%22%3EWEBSITE_LOCALCACHE_READY%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E.%20If%20the%20value%20of%20this%20variable%20is%20set%20to%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3ETRUE%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%2C%20then%20Local%20Cache%20has%20been%20initialized%2C%20if%20it%20is%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EFalse%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%2C%20then%20Local%20Cache%20initialization%20is%20still%20in%20progress.%20%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20514px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131019i12C52F797C97E51A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ProcProperties2.jpg%22%20title%3D%22ProcProperties2.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3C%2FOL%3E%0A%3CDIV%20style%3D%22direction%3A%20ltr%3B%22%3E%0A%3CTABLE%20style%3D%22direction%3A%20ltr%3B%20border-collapse%3A%20collapse%3B%20margin-left%3A%20.7083in%3B%20border%3A%200pt%20solid%20%23A3A3A3%3B%22%20title%3D%22%22%20border%3D%220%22%20summary%3D%22%22%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20style%3D%22border-width%3A%200pt%3B%20background-color%3A%20%23deebf6%3B%20vertical-align%3A%20top%3B%20width%3A%206.5902in%3B%20padding%3A%204pt%204pt%204pt%204pt%3B%22%3E%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%3CFONT%20size%3D%223%22%3E%3CSTRONG%3ENOTE%3C%2FSTRONG%3E%3A%20You%20can%20call%20the%20KUDU%20api%20to%20automate%20the%20above%20process.%20Review%20the%20documentation%20%3CSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fprojectkudu%2Fkudu%2Fwiki%2FProcess-Threads-list-and-minidump-gcdump-diagsession%23process-environment-variable%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%3C%2FSTRONG%3E.%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3C%2FDIV%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20margin-left%3A%20.375in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20style%3D%22margin-left%3A%20.375in%3B%20direction%3A%20ltr%3B%20unicode-bidi%3A%20embed%3B%20margin-top%3A%200in%3B%20margin-bottom%3A%200in%3B%20font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%20type%3D%221%22%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%229%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EOnce%20the%20%3C%2FSPAN%3E%3C%2FFONT%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eprocess%20%3C%2FSPAN%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eenvironment%20variable%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20color%3A%20%237030a0%3B%20background%3A%20%23F2DCDB%3B%22%3EWEBSITE_LOCALCACHE_READY%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eis%20set%20to%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Consolas%3B%20font-size%3A%2011.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%20color%3A%20%237030a0%3B%20background%3A%20%23F2DCDB%3B%22%3ETRUE%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%2C%20browse%20the%20slot%20and%20if%20everything%20looks%20good%2C%20set%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3ESwap%20action%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eto%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EComplete%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eand%20click%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EComplete%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Ebutton.%20If%20you%20need%20to%20revert%20the%20change%2C%20then%20set%20the%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3ESwap%20action%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eto%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3ECancel%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Eand%20click%20on%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3ECancel%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Ebutton.%3C%2FSPAN%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20558px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F131020i73B3DE86BC8F4001%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Swapwithpreview2.jpg%22%20title%3D%22Swapwithpreview2.jpg%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3C%2FLI%3E%0A%3CLI%20style%3D%22margin-top%3A%200%3B%20margin-bottom%3A%200%3B%20vertical-align%3A%20middle%3B%22%20value%3D%2210%22%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3EThe%20%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20bold%3B%20font-style%3A%20normal%3B%22%3EComplete%20Swap%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3Ewill%20now%20promote%20the%20staging%20slot%20to%20production.%20Since%20its%20already%20running%20against%20Local%20Cache%2C%20the%20site%20will%20not%20encounter%20additional%20restarts%20and%20will%20be%20serving%20production%20traffic.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CSTRONG%3EFurther%20Reading%3C%2FSTRONG%3E%3A%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Foverview-local-cache%23how-the-local-cache-changes-the-behavior-of-app-service%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EHow%20the%20local%20cache%20changes%20the%20behavior%20of%20App%20Service%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fdeploy-staging-slots%23Multi-Phase%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESwap%20with%20preview%20(multi-phase%20swap)%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Segoe%20UI'%3B%20font-size%3A%2010.0pt%3B%20font-weight%3A%20normal%3B%20font-style%3A%20normal%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fruslany.net%2F2017%2F11%2Fmost-common-deployment-slot-swap-failures-and-how-to-fix-them%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ECommon%20deployment%20slot%20swap%20failures%20and%20how%20to%20fix%20them%3C%2FA%3E%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%3C%2FLINGO-BODY%3E
Microsoft

 

Note: This article applies to Windows App Service Plan only as both Local Cache and Swap with Preview are not available for Linux App Service Plan's. Additionally, Slot Swap feature is available for sites running in Standard or higher pricing tiers.

 

Scenario: There is a site in production which is running on 2 instances and has Local Cache enabled. We need to deploy new content to it with minimal downtime.

 

Pre-requisites:

  1. The App Service Plan is using Windows OS.
  2. The production slot has Local Cache enabled.
  3. The staging slot where the new content/code is being deployed doesn't have Local Cache enabled.

 

Steps to deploy:

  1. If not already created, then create a new staging slot.
  2. Deploy the code to the staging slot.
  3. Navigate to Deployment slots and click on Swap.
  4. Select the Source and the Target slots and select the checkbox "Perform swap with preview".

    Swapwithpreview1.jpg

     

  1. You can review the changes that will be applied and then click on Start Swap button. This will initiate Phase one of the swap.
  2. This will perform a restart of the application so that the prod settings can be applied to the application and also to initialize Local Cache. This completes Phase one of the swap.
  3. Once the app has been restarted, browse the slot to review the changes that were made to the new code base for this application.
  4. In order to proceed with Phase two, we need to wait for Local cache initialization to complete. Follow the below steps to determine if the Local Cache has been initialized.
    1. Browse to the KUDU Console of the slot.
    2. Click on Process Explorer menu.
    3. You will see a list of process. Right click the process that doesn't have the SCM tag against it and click on properties.
      ProcExp.jpg
    4. Click on Environment variables and find environment variable WEBSITE_LOCALCACHE_READY. If the value of this variable is set to TRUE, then Local Cache has been initialized, if it is False, then Local Cache initialization is still in progress.
      ProcProperties2.jpg

       

NOTE: You can call the KUDU api to automate the above process. Review the documentation here.

 

  1. Once the process environment variable WEBSITE_LOCALCACHE_READY is set to TRUE, browse the slot and if everything looks good, set the Swap action to Complete Swap and click on Complete Swap button. If you need to revert the change, then set the Swap action to Cancel Swap and click on Cancel Swap button.

    Swapwithpreview2.jpg
  2. The Complete Swap will now promote the staging slot to production. Since its already running against Local Cache, the site will not encounter additional restarts and will be serving production traffic.

 

Further Reading: