Hosting an Update Retriever Repository in an Azure 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:
I won't cover creating the Storage account or Blob, just the process of uploading the Update Retriever content to the Blob container and how to configure the ThinInstaller Configuration XML on the client. Note though, the Container access level should be set to Blob (anonymous read access for blobs only).

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. 

 Storage Explorer: Authenticate to your Storage account, navigate to the folder containing your updates and choose to upload by folder



 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)





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
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.