Hosting an Update Retriever Repository in an Azure Blob
This article has moved to https://blog.lenovocdrt.com/#/2019/ur_az_blob
Update 09/18/2020: System Update v5.07.0110 now supports Blob storage access via HTTPS!
Update 01/25/2021: Update AzCopy example with sync command
When it comes to managing a centralized Update Retriever repository, challenges arise with widely distributed environments. This is where leveraging a cloud storage solution can bring value.
I thought this post may be helpful for anyone piloting a "modern" way of updating their Think products. This walk-through assumes the following tools are in place:
Populating the UR Repo
First, you'll need to download any new updates to your local machine or network share. Currently, you can only point the UR repository location to a local drive or UNC path.
You can take advantage of configuring your Update Retriever repository as a "Lenovo cloud repository" so that only the package XML's will be downloaded rather than the full updates. This process is covered here. Once all updates are downloaded successfully, you'll need to upload them to the Blob. There's a few different ways to accomplish this.
Once complete, you should see all data uploaded in the Activities pane
AzCopy: You'll need a few more pieces of information before uploading with AzCopy.
With this information, you should now be able to upload the content. Starting in AzCopyv10, you can sync directories (Thanks rgsteele for pointing that out). Here's a sample command to execute using AzCopy
The results will look something like this
PowerShell: Similar to AzCopy but instead using the Set-AzStorageBlobContent cmdlet. You'll need the Azure PowerShell module installed first. Below is a simple, sample script that was pieced together from the examples provided by the MS docs.
An example capture once the upload kicks off
Client Side Configuration
I thought this post may be helpful for anyone piloting a "modern" way of updating their Think products. This walk-through assumes the following tools are in place:
- Update Retriever
- ThinInstaller on the client
- OR
- System Update (v5.07.0110 or later)
- Azure Blob Container (a free trial account with an included 5gb limit is what I used here).
Populating the UR Repo
First, you'll need to download any new updates to your local machine or network share. Currently, you can only point the UR repository location to a local drive or UNC path.
You can take advantage of configuring your Update Retriever repository as a "Lenovo cloud repository" so that only the package XML's will be downloaded rather than the full updates. This process is covered here. Once all updates are downloaded successfully, you'll need to upload them to the Blob. There's a few different ways to accomplish this.
- Install Azure Storage Explorer and upload the folder containing the updates, database.xml, and database.xsd.
- Upload the content using AzCopy (latest version can be downloaded here)
- Upload the content using the Set-AzStorageBlobContent cmdlet.
Once complete, you should see all data uploaded in the Activities pane
AzCopy: You'll need a few more pieces of information before uploading with AzCopy.
- Blob Container URL (Storage Account/Blobs/Blob Container/Properties)
- Storage Account Access Keys (There will be 2 keys presented. Either can be used) or a SAS token. It's highly recommended to use a SAS token.
With this information, you should now be able to upload the content. Starting in AzCopyv10, you can sync directories (Thanks rgsteele for pointing that out). Here's a sample command to execute using AzCopy
AzCopy.exe sync 'C:\lenovoUpdates' 'https://your-blob.core.windows.net/updateretriever<SASToken>' --delete-destination true
The results will look something like this
PowerShell: Similar to AzCopy but instead using the Set-AzStorageBlobContent cmdlet. You'll need the Azure PowerShell module installed first. Below is a simple, sample script that was pieced together from the examples provided by the MS docs.
$srcPath = "C:\lenovoUpdates" $token = "your-sas-token" $containerName = 'your-container-name' $storageContext = New-AzStorageContext -StorageAccountName 'your-storage-account' -SasToken $token ls -File $srcPath -Recurse | Set-AzStorageBlobContent ` -Container $containerName ` -BlobType Block ` -Context $storageContext -Force
An example capture once the upload kicks off
Client Side Configuration
Thin Installer
Now that the repository is ready, you'll need to make a quick change to the ThinInstaller Configuration XML to direct the client to Blob.
Open the ThinInstaller.exe.configuration with NotePad or Notepad++ and set the new repo path the Blob Container URL as noted earlier.
Now, when ThinInstaller is launched it will connect to the UR repo in Azure
Client Side Configuration
Now that the repository is ready, you'll need to make a quick change to the ThinInstaller Configuration XML to direct the client to Blob.
Open the ThinInstaller.exe.configuration with NotePad or Notepad++ and set the new repo path the Blob Container URL as noted earlier.
Now, when ThinInstaller is launched it will connect to the UR repo in Azure
System Update
Simply update the AdminCommandLine registry value to point to your Blob URL. An example command line would be:
/CM -search A -action LIST -includerebootpackages 1,3,5 -packagetypes 1,2,3,4 -nolicense -repository https://yourblob.blob.core.windows.net/repository -exporttowmi
Refer to the System Update Suite Deployment Guide for available command line options.