Soru

Zorluk: OrtaConfigure Azure App Services

An administrator is deploying a new version of a web application to an Azure App Service web app. The application is currently running in a staging deployment slot and needs to be swapped into the production slot. You need to configure a swap operation that allows you to test the new code under production configuration settings (such as connection strings and application settings) before any client traffic is routed to the new version.

Which sequence of actions should you perform to complete this process?

  1. 1Navigate to the App Service page, select Deployment slots, and click Swap.
  2. 2Set the Swap type to Swap with preview, and select the staging slot as the source and the production slot as the target.
  3. 3Click Start Swap.
  4. 4Browse to the staging slot's URL to test and verify the application behavior.
  5. 5Open the Swap dialog again and click Complete Swap.

Cevap

The correct sequence of actions is: Navigate to the Deployment slots page and select Swap; configure the swap settings for a Swap with preview from staging to production; start the swap to apply target settings to the source slot; browse the staging slot URL to verify application functionality; and finally, complete the swap to route production traffic.
Starting a swap with preview applies the configuration of the target slot to the source slot, allowing validation before the final code swap occurs. Testing must be performed on the source slot while in this preview state before finalizing (completing) the swap or cancelling it.

Adım Adım Çözüm

1
Navigate to the App Service page, select Deployment slots, and click Swap.
The Swap configuration dialog opens.
This initiates the configuration wizard for swapping slots.
2
Set the swap type to Swap with preview, select staging as the source, and production as the target.
The configuration is set to deploy the source slot code under target slot settings without executing a full cutover.
This specifies that we want to validate the target slot settings on our staging code before going live.
3
Click Start Swap.
The staging slot restarts with production configuration settings applied.
This applies the target slot configurations (such as connection strings and app settings) to the staging slot so it behaves as if it were in production.
4
Browse to the staging slot's URL and test the application.
The application's behavior is verified using the production configuration settings.
This ensures the application is running correctly under production settings before changing DNS/routing settings.
5
Go back to the Swap dialog and select Complete Swap.
The swap operation completes, routing production traffic to the staging slot code (which is now in the production slot).
This completes the swap, making the new deployment live.

Anahtar Kavram

Azure App Service Deployment Slots Swap with Preview workflow
Tahmini Süre:2m 0s
Bu soruyu puanla