July 26, 2017 | Charlie Turano
This is part 3 in my series of blog posts on Sitecore deployments on Azure.
The other posts in this series can be found here:-
In the previous post, we setup a default Sitecore install, using the basic packages from Sitecore. Now we want to modify that install so that our initial install contains the Sitecore Package Deployer module. This module allows us to drop in Sitecore Update Packages on the file system, which will automatically be installed into the website. This is an excellent way for us to enable continuous integration to the website, being able to install our item updates to the website along with our code.
Cleanup Prior Post's Resource Group
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 the custom package. This way our default install will be Default Sitecore + the Module.
Bootstrap Module
The Sitecore.Cloud.Integration.Bootload.wdp.zip file was obtained from the Sitecore GitHub mentioned in this article: Configure the Bootloader module for a Sitecore deployment .
Upload it to your online blob storage container, the same way we uploaded the CM, CD, PRC and REP packages earlier (into the sitecore82u3 container).
Import Cmdlets for Module Package Creation
The Sitecore Azure Toolkit has some additional Cmdlets that allow you to create scwdp packages from modules. Typically these modules come in the form of Zip packages, that we find from the Sitecore Marketplace, or as .update packages, like those that can be created through TDS Classic.
The Sitecore documentation for creating these packages mentions the use of the
Create the Sitecore Package Deployer Package Option 1: Use the above Cmdlet to create the package Using the above Cmdlet, create the scwdp.zip package from your update or zip package. Note: For more advanced scenarios, you can modify the output module package as described by the Sitecore documentation. This can allow you to apply transformations, embed files, adjust parameters etc. as needed for a more complex package and deployment. Option 2: Manually Create the Package Initially, when attempting to take the Sitecore Package Deployer module's update file, and using these commands on it, I found that the toolkit didn't correctly package up the module. It seems as those these commands work on the basic Sitecore modules (WFFM, EXM, SXA etc.) but not for any other modules. To get around this, I copied the package for the bootloader, unzipped it...and kept the same structure inside. I then copied over the Sitecore Package Deployer files into that directory. Then I zipped it up, and renamed it to .scwdp.zip. Simple! We've uploaded the resulting scwdp.zip file to our Github repo, here. Once you have a properly build scwdp.zip package, upload it to your online blob storage container like the other packages. Sitecore Package Deployer Configuration The module requires some configuration for itself. As we can see, the bootloader also comes with a .json file (addons/bootloader.json). I took this file, and modified it for the Sitecore Package Deployer module. Here is the result. Now upload this json file to your blob storage folder. I placed it in the SitecorePackageDeployer folder. Module Configuration The last step is to wire it all up. To install the Sitecore Package Deployer into your Sitecore environments we just need to configure it as a module in the azuredeploy.parameters.json You will need to configure the urls in the above module snippet to point at the correct locations in your blob storage. You can obtain an example script for the above install from the file SC82U3_XP/azuredeploy.parameters.json.example from here. Notice that the Bootloader module is defined first in the items array. This is that bootloader that we pulled down from Sitecore earlier. It is a tiny module that facilitates the installation of custom modules...which, in this case, is our Sitecore Package Deployer. The Sitecore Package Deployer configuration follows, pointing to our new scwdp package, and configuration. Running the same Install.ps1 script from the previous post now builds up an entire Sitecore Azure instance, WITH our custom module included. In the next post, we will look at adding our own project's built code and items to the install. Read the complete project on GitHub.
Cmdlet. To use this Cmdlet run the following in a PowerShell window. ConvertTo-SCModuleWebDeployPackage
> Notice that this pulls in the Cmdlets from the DLL, not the psm1 script that was used earlier. This will bring in a bunch of Cmdlets that help us create packages for Sitecore deployments, including the one mentioned above. (Note: Beware that a similarly named Cmdlet, ConvertTo-SitecoreWebDeployPackage, was already brought in by the psm1 import. This Cmdlet produced incorrect packages for me, so I would advise against using it for now).Import-Module .\Tools\Sitecore.Cloud.Cmdlets.dll -Verbose
ConvertTo-SCModuleWebDeployPackage -Path [PathToUpdatePackage] -Destination [FolderToSaveSCWDPPackage]
"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"
}
}
]
}
}