In this blog, we will discuss about the PowerShell Cmdlets that should be used to deploy the Sitecore XP instance to Azure.

Below is the list of files that I have placed in a folder.

Azure
My PowerShell code is available in the sitecoreazurexp.ps1 file. Below is the code.

  1. #Azure SubscriptionID
  2. $SubscriptionId = "Subscription id here";
  3. #Name of Resource Group. The DeploymentId in azuredeploy.parameters.json should also be the name of the Resource Group
  4. $Name = "xp1-rg";
  5. #Location of the Sitecore license file.
  6. $LicenseXmlPath = "license.xml";
  7. #Location of the ARM template file.
  8. $ArmTemplatePath = "azuredeploy.json";
  9. #location of the parameters.json file.
  10. $ArmParametersPath = "azuredeploy.parameters.json";
  11. #Name of Azure Location / Data Center
  12. $location = "EastUS";
  13. #Load the Azure Toolkit module
  14. Import-Module "D:\Sitecore\AzureXp1\Sitecore Azure Toolkit 1.0 rev. 161125\tools\Sitecore.Cloud.Cmdlets.psm1"
  15. #Add Azure account
  16. Add-AzureRMAccount
  17. #Select the subscription.
  18. Set-AzureRMContext -SubscriptionId $SubscriptionId
  19. #Start the deployment
  20. get-date;Start-SitecoreAzureDeployment -location $location -Name $Name -ArmTemplatePath $ArmTemplatePath -ArmParametersPath $ArmParametersPath -LicenseXmlPath $LicenseXmlPath -SetKeyValue @{} -Verbose;get-date

The above commands along with the comments is self-explanatory.

Select the code and click on "Execute", as shown below.

Azure

This clicking will prompt you to provide the credentials of your Azure Subscription.

Azure

Provide the username and password and click on the "Sign in" button.

You can log into your subscription and navigate to the Resource Group and view the Essentials tab, as shown below.

Azure

Click on the "1 Deploying" to view the progress on the deployment.

Azure

If you have configured all the settings correctly, it would take approximately 25 minutes to successfully deploy the Sitecore XP1 instance on Azure App Services.

Let’s navigate to the Sitecore Content Management role.

Azure

That’s it. We have successfully deployed the Sitecore XP1 instance on Azure App Service.