How to create sitecore CM and CD on azure

By Shekhar Gigras

Prerequisites

 

Azure Portal Steps

  • Create the resource group on azure portal (We create the everything in one resource group because we are using free account and so easy to delete one resource group after the training class)
  • Create the storage account under this resource group on azure portal

  • Create Container under this storage

 

Azure Storage Explorer Steps

  • Open Azure Storage Explorer Application and add connection with your Azure Subscription

 

  • Upload Sitecore Installation File on azure(why we choose storage explorer, reason is we can upload the folder through this tool)

 

  • Upload AzureRM template (5 files is main files)
  • azuredeploy.json (in this file we have 3 node. Variable,Parameter,resources)
    • Variable : only use in same file
    • Parameter : transfer in other file (here you can change the database password and other thing like price plan, Recommanded to change the database password otherwise script will create encrypted random password)
    • Resource : create Price Plan, App Service, Database
  • azuredeploy.parameters.json
    • Set the Main parameter like sql server username and password, sitecore username and password, set the sitecore installation file path, resource group name​​​​​​​

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "deploymentId": {
      "value": "RM-SITECORE-CM-CD"
    },
    "sqlServerLogin": {
      "value": "sitecore-admin"
    },
    "sqlServerPassword": {
      "value": "Password11***"
    },
    "cmMsDeployPackageUrl": {
      "value": "https://storagesitecorecmcd.blob.core.windows.net/containersitecorecmcd/Sitecore/Sitecore 9.0.2 rev. 180604 (Cloud)_cm.scwdp.zip"
    },
    "cdMsDeployPackageUrl": {
      "value": "https://storagesitecorecmcd.blob.core.windows.net/containersitecorecmcd/Sitecore/Sitecore 9.0.2 rev. 180604 (Cloud)_cd.scwdp.zip"
    },
    "sitecoreAdminPassword": {
      "value": "Password11***"
    },
    "licenseXml": {
      "value": "D:\\azure-sitecore\\license.xml"
    }
  }
}

  • ​​​​​​​nested/application.json
  • ​​​​​​​nested/infrastructure.json
  • addons/sc2020-002-293863.json

no need to upload the "azuredeploy.parameters.json" file

Sitecore Installation Power Shell Scripts

  • Create powershell script for installation

#Check Azure Module

#Get-Module PowerShellGet -list | Select-Object Name,version,path

# Not install then install Azure Module

#Install-Module AzureRM -AllowClobber

#Azure sitecore Configuration

#Extract the Azure toolkit zip file
$AzureSDK = "D:\azure-sitecore\sitecorexm\toolkit\tools\Sitecore.Cloud.Cmdlets.psm1" 
$ArmTemplateUrl = "https://storagesitecorecmcd.blob.core.windows.net/containersitecorecmcd/XM902/azuredeploy.json"

$deploymentId = "RM-SITECORE-CM-CD"
$LicenseXmlPath = "D:\azure-sitecore\license.xml"

$location = "East US"

#$ArmTemplatePath = "" -ArmTemplatePath $ArmTemplatePath
$ArmParametersPath = "D:\azure-sitecore\sitecorexm\XM902\azuredeploy.parameters.json"
$SetKeyValue = @{}


#Initialize Azure Sitecore
Import-Module $AzureSDK
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine


$subscriptionid = ""
#Add-AzureRmAccount
Import-AzureRmContext -Path vyom-gigras-adglobal-profile-latest.json
Set-AzureRmContext -SubscriptionId $subscriptionid


Start-SitecoreAzureDeployment -location $location -name $deploymentId -ArmTemplateUrl $ArmTemplateUrl -ArmParametersPath $ArmParametersPath -LicenseXmlPath $LicenseXmlPath -SetKeyValue $SetKeyValue

  • Run Powershell script
  • Go to azure portal and see the deployment status

​​​​​​​

 

Click on Cm App service and Copy URL and past it browser https://rm-sitecore-cm-cd-cm.azurewebsites.net/sitecore (login as per the azuredeploy.parameters.json).

Same with CD App service

​​​​​​​

 

Connect by Whatsapp

Posted in Azure, Sitecore on May 25, 2020


Comments

Please sign in to comment!