AzureGenel

Webapp Deployment Slots – Azure App Service

Bu makalede sizlerle Azure App Services kullanarak staging ve production slotlar oluşturacağız ve test (staging) slotunda olan kodumuzu production slotuna taşıyacağız. Öncelikle bu ortamların hazırlanabilmesi için azure tarafında gerekli alt yapıyı ve Teknik ayarlamaları beraber yapacağız.

App Service kullanarak yapacağız bu deployment slots’ların bize sağlayadığı başlıca avantajlar;

-Staging yani test ortamında yaptığımız değişiklikleri production ortama taşımadan önce kodumuzda yaptığımız değişiklikleri kontrol etmemiz sağlar.
-Swapping işleminden önce yani staging< > production taşımadan önce uygulamalarınızın çalışacağız instance’ların warm-up kontrolünü yapabilirsiniz.
-Kesinti sürelerini en aza indirebilirsiniz.
-Eğer production deploymentdan sonra herhangi bir sorun yaşarsanız hızlı bir şekilde çalışan en iyi versiyonuna geri alabilirsiniz.

O zaman adım adım bu işlemleri azure portal üzerinden uygulayalım. Bunun için öncelikle bir azure hesabınıza bağlı bir subscription olması gerekiyor.

Task diagramı;

Task 1: Create an Azure web app.

Create a web app using the Azure portal.

The web app should run on Windows and use the PHP 7.4 runtime stack.

Task 2: Create a staging deployment slot.

Verify there is a production deployment slot.

Create a new staging deployment slot.

Task 3: Configure web app deployment settings.

Deploy the web app from a local Git.
Provide the authentication credentials

Task 4: Deploy code to the staging deployment slot.

Use Azure PowerShell to clone the remote repository and set the local path.

Add the remote git using the authentication credentials.

Display the default web page in a new browser tab. Push the sample web app code from the local repository to the Azure web app staging deployment slot

Bu kısımda uygulamamız için bir storage hesabı oluşturuyoruz.

Git repodan kodlarımızı çekiyoruz.

Kodları çektikten sonra yukarıdaki url tıklayarak uygulamamız açıyoruz.

Task 5: Swap the staging slots.

Swap the deployment slots.

Verify the default web page has been replaced with the Hello World page.

Kodumuzu staging ortamından production ortamına taşıdık ve url değişti.