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.
My PowerShell code is available in the sitecoreazurexp.ps1 file. Below is the code.
- #Azure SubscriptionID
-
- $SubscriptionId = "Subscription id here";
-
- #Name of Resource Group. The DeploymentId in azuredeploy.parameters.json should also be the name of the Resource Group
-
- $Name = "xp1-rg";
-
- #Location of the Sitecore license file.
-
- $LicenseXmlPath = "license.xml";
-
- #Location of the ARM template file.
-
- $ArmTemplatePath = "azuredeploy.json";
-
- #location of the parameters.json file.
-
- $ArmParametersPath = "azuredeploy.parameters.json";
-
- #Name of Azure Location / Data Center
-
- $location = "EastUS";
-
- #Load the Azure Toolkit module
-
- Import-Module "D:\Sitecore\AzureXp1\Sitecore Azure Toolkit 1.0 rev. 161125\tools\Sitecore.Cloud.Cmdlets.psm1"
-
- #Add Azure account
-
- Add-AzureRMAccount
-
- #Select the subscription.
-
- Set-AzureRMContext -SubscriptionId $SubscriptionId
-
- #Start the deployment
-
- 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.
This clicking will prompt you to provide the credentials of your Azure Subscription.
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.
Click on the "1 Deploying" to view the progress on the deployment.
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.
That’s it. We have successfully deployed the Sitecore XP1 instance on Azure App Service.