Skip to content

Hosting a repository in an Azure blob

Azure

System Update v5.07.0110 and later supports Blob storage access via HTTPS

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.

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 Update Retriever repository

First, you'll need to download any new updates to your local machine or network share. Currently, you can only set a 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.

Method 1: 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.

Method 2: 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. 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

Method 3: 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 Thin Installer Configuration XML to direct the client to the Blob container. Open the ThinInstaller.exe.configuration file and set the new repo path the Blob Container URL as noted earlier.

When Thin Installer is launched it will connect to the Update Retriever repository 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.