August 03, 2017 | Charlie Turano
This is part 4 in the series of blog posts on Sitecore deployments on Azure. The other posts in this series can be found
here:
Part 1: Setting up the Solution and VSO Build
Part 2: Preparing the Default Scripts and Packages for Azure Deployment
Part 3: Adding Custom Modules to an Azure Deployment
In the previous post, we setup a complete Sitecore Azure instance, adding some custom modules to the default install.
Now we want to modify the scripts so that the compiled LaunchSitecore site is also provisioned into the new XP environment
that setup. To make this easy, we decided to use the MSDeploy package created during the VSO build (see part 1 in this
series). This package contains all the compiled code for the site. The compiled code for the CM and CD should be exactly
the same.
First, make sure you remove the resource group you created in the previous blog post from your Azure account. We are completely
recreating that entire resource group....but, as mentioned, we're adding our project's code into the mix (through the MSDeploy
package our build created). This way our default install will be Default Sitecore + the Sitecore Package Deployer Module
+ the MSDeploy package from our project.
Setting up the install script to push an MSDeploy package generated by a build server is relatively simple.
The first step is to upload our custom scripts to the Sitecore container in blob storage that was created earlier (with the default scripts). Upload our custom scripts for MSDeploy. Place these in the same relative folder path (/xp/custom) so that the relative paths continue to match up.
The deploy script needs to be configured to deploy the MSDeploy package into the new instance using the "modules" configuration section of the azuredeploy.parameters.json file. This is the same location that we added the custom module, the Sitecore Package Deployer, in the previous post.
"modules": {
"value": {
"items": [
{
"name": "bootloader",
"templateLink": "https://????.blob.core.windows.net/sitecore/xp/addons/bootloader.json",
"parameters": {
"msDeployPackageUrl": "https://????.blob.core.windows.net/sitecore82u3/Sitecore.Cloud.Integration.Bootload.wdp.zip?[shared access signature]"
}
},
{
"name": "sitecore-package-deployer",
"templateLink": "https://????.blob.core.windows.net/sitecore/SitecorePackageDeployer/SitecorePackageDeployer.azuredeploy.json",
"parameters": {
"msDeployPackageUrl": "https://????.blob.core.windows.net/sitecore/SitecorePackageDeployer/SitecorePackageDeployer-1.8.scwdp.zip"
}
},
{
"name": "launch-sitecore",
"templateLink": "https://????.blob.core.windows.net/sitecore/custom/InstallMSDeployPackage.azuredeploy.json",
"parameters": {
"msDeployPackageUrl": "https://????.blob.core.windows.net/LaunchSitecore/Release1.2.zip?[shared access signature]"
}
}
]
}
}
Once the website is setup and running, the Sitecore items can be deployed to the new Sitecore instance using the Sitecore Update Package generated during the build and the Sitecore Package Deployer installed on the CM. Simply ftp the .scitem.update package created during the build to the [cm ftp address]/site/wwwroot/App_Data/SitecorePackageDeployer folder. The package deployer will find the update package and install the items in the Sitecore database.
Please Note: We experienced some performance problems deploying items on the CM server when the application
logging was set to "Information". Your results may be different. Please see these options for improving the performance of the update package installation.
When the item deployment completes, you should publish the site and have a complete working Sitecore instance in the
cloud.
In the next post, we will be utilizing an Azure 'staging slot' to give us zero down time deployments.
Catching up? Start at the beginning! Check out Part 1 of our series, or read the complete project on Github.