Install Headless Services as a Web Deploy Package on Azure
This topic describes how to install Headless Services using a Web Deploy Package (WDP) and ARM templates in an Azure-hosted Sitecore instance.
To install Headless Services with a WDP and with ARM templates:
-
Download an officially released Sitecore Headless Services WDP matching the version of your rendering SDK version and Sitecore topology.
-
Download a matching ARM template for your rendering SDK version and topology.
-
Store both files at a publicly available location, such as Azure storage.
-
Prepare a file named
parameters.jsonwith the content similar to the following:RequestResponse{ "sqlServerLogin": {"value": "sql"}, "sqlServerPassword": {"value": "Password12345"}, "jssMsDeployPackageUrl": {"value": "<PackageUrl>"}, "jssCDMsDeployPackageUrl": { "value": "<CDPackageUrl>"} } -
Provision Headless Services using the following script:
RequestResponseparam ( $DeploymentId = "<deploymentId>", $ParametersPath = "<path to parameters file>", $SubscriptionName = "<subscription name>", $TemplateUri = "<ARM template url>" ) Import-Module Az.Accounts Import-Module Az.Resources Connect-AzAccount Set-AzContext -SubscriptionName "$SubscriptionName" $ModuleName = "JSS" # Deployment Name that describes what is supposed to be deployed by this template $DeploymentName = "$DeploymentId-$ModuleName" New-AzResourceGroupDeployment -Name $DeploymentName -ResourceGroupName $DeploymentId -TemplateUri $TemplateUri -TemplateParameterFile $ParametersPath -Mode Incremental -Verbose -
If you are planning to deploy JavaScript applications, configure the Node.js version on Azure to the version you used in development. We recommend using the latest long-term support (LTS) version.
-
If you are planning to deploy JavaScript applications, to allow Headless Services to create content on the Sitecore instance, you must assign the correct security rights to the sitecore/JSS Import Service Users role:
-
In the content tree, click sitecore, Content.
-
Follow the instructions for assigning access rights specifically to an item and, for the sitecore/JSS Import Service Users role, assign Create rights to items and descendants.
-