You are here: Installation > Microsoft Azure VM installations > Obtaining and preparing disk images

Obtaining and preparing disk images for Azure deployments

Pexip publishes Azure-optimized disk images for the Management Node and for Conferencing Nodes.

Preparing disk images for use

Before you can use the published Pexip Infinity disk images, you must copy them to your storage account in Azure. This guide refers to a disk image copied to your storage account as a prepared disk image. All deployment operations use prepared disk images.

The following PowerShell script will copy the published disk images for a Management Node and for a Conferencing Node to your storage account so that they may be used to deploy VM instances.

You must edit the variables in the script to provide the name of your Azure subscription ($subscriptionName), the name of the resource group ($resourceGroupName), the name of the storage account ($storageAccountName), and the Pexip Infinity version-build number to use ( $version — currently 13-0-0-32124-0-0 for v13 software). If you are running an older version of Pexip Infinity software, see Version information for previous Pexip Infinity releases.

# Name of your Azure subscription
$subscriptionName = ""
# Name of the resource group to use
$resourceGroupName = ""
# Name of the storage account to copy the disk images into
$storageAccountName = ""
# Name of the container within the storage account to copy the disk images into
$containerName = "vm-images"
# Version of Pexip Infinity to copy
$version = "13-0-0-32124-0-0"

# Add your Azure account to the PowerShell environment
Add-AzureRmAccount

# Set the current subscription
Get-AzureRmSubscription -SubscriptionName $subscriptionName | Select-AzureRmSubscription

# Obtain the access key for the storage account
$storageAccountKey = Get-AzureRmStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccountName
If($storageAccountKey.GetType().Name -eq "StorageAccountKeys") {
    # AzureRM.Storage < 1.1.0
    $storageAccountKey = $storageAccountKey.Key1
} Else {
    # AzureRm.Storage 1.1.0
    $storageAccountKey = $storageAccountKey[0].Value
}			

# Create the storage access context
$ctx = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey

# Ensure that the container exists
New-AzureStorageContainer -Name $containerName -Context $ctx

# Start copying the Management Node image
$mgmt = Start-AzureStorageBlobCopy -AbsoluteUri "https://pexipas.blob.core.windows.net/infinity/$version/management-node.vhd" -DestContainer $containerName -DestBlob "pexip-infinity-$version-management-node.vhd" -DestContext $ctx

# Start copying the Conferencing Node image
$cnfc = Start-AzureStorageBlobCopy -AbsoluteUri "https://pexipas.blob.core.windows.net/infinity/$version/conferencing-node.vhd" -DestContainer $containerName -DestBlob "pexip-infinity-$version-conferencing-node.vhd" -DestContext $ctx

# Wait for the Management Node image to finish copying
$status = Get-AzureStorageBlobCopyState -Blob $mgmt.Name -Container $containerName -Context $ctx
While($status.Status -eq "Pending") {
    $status
    $status = Get-AzureStorageBlobCopyState -Blob $mgmt.Name -Container $containerName -Context $ctx
    Start-Sleep 10
}
$status

# Wait for the Conferencing Node image to finish copying
$status = Get-AzureStorageBlobCopyState -Blob $cnfc.Name -Container $containerName -Context $ctx
While($status.Status -eq "Pending") {
    $status
    $status = Get-AzureStorageBlobCopyState -Blob $cnfc.Name -Container $containerName -Context $ctx
    Start-Sleep 10
}
$status

# Print out the prepared disk image URLs for later use
"Prepared Management Node disk image:   " + $mgmt.ICloudBlob.Uri.AbsoluteUri
"Prepared Conferencing Node disk image: " + $cnfc.ICloudBlob.Uri.AbsoluteUri

Alternatively, if using the Azure CLI, the following script is equivalent.

You must edit the variables in the script to provide the name of your Azure subscription (subscriptionName), the name of the resource group (resourceGroupName), the name of the storage account (storageAccountName) and the Pexip Infinity version number to use ( version — currently 13-0-0-32124-0-0 for v13 software). If you are running an older version of Pexip Infinity software, see Version information for previous Pexip Infinity releases.

#!/bin/sh

set -e

# Name of your Azure subscription
subscriptionName=""
# Name of the resource group to use
resourceGroupName=""
# Name of the storage account to copy the disk images into
storageAccountName=""
# Name of the container within the storage account to copy the disk images into
containerName="vm-images"
# Version of Pexip Infinity to copy
version="13-0-0-32124-0-0"

# Ensure CLI is in ARM mode
azure config mode arm

# Log in to Azure
azure login

# Set the current suscription
azure account set $subscriptionName

# Obtain the access key for the storage account
storageAccountKey=$(azure storage account keys list -g $resourceGroupName $storageAccountName | grep 'Primary' | sed -e 's/^.*Primary: \(.*\)$/\1/')

# Ensure that the container exists
azure storage container create -a $storageAccountName -k $storageAccountKey $containerName || true

# Start copying the Management Node image
azure storage blob copy start --dest-account-name $storageAccountName --dest-account-key $storageAccountKey --dest-container $containerName --dest-blob "pexip-infinity-$version-management-node.vhd" "https://pexipas.blob.core.windows.net/infinity/$version/management-node.vhd"

# Start copying the Conferencing Node image
azure storage blob copy start --dest-account-name $storageAccountName --dest-account-key $storageAccountKey --dest-container $containerName --dest-blob "pexip-infinity-$version-conferencing-node.vhd" "https://pexipas.blob.core.windows.net/infinity/$version/conferencing-node.vhd"

# Wait for the Management Node image to finish copying
while azure storage blob copy show --json -a $storageAccountName -k $storageAccountKey --container $containerName --blob "pexip-infinity-$version-management-node.vhd" | grep -q '"copyStatus": "pending"'; do sleep 10; done
azure storage blob copy show --json -a $storageAccountName -k $storageAccountKey --container $containerName --blob "pexip-infinity-$version-management-node.vhd"

# Wait for the Conferencing Node image to finish copying
while azure storage blob copy show --json -a $storageAccountName -k $storageAccountKey --container $containerName --blob "pexip-infinity-$version-conferencing-node.vhd" | grep -q '"copyStatus": "pending"'; do sleep 10; done
azure storage blob copy show --json -a $storageAccountName -k $storageAccountKey --container $containerName --blob "pexip-infinity-$version-conferencing-node.vhd"

# Print out the prepared disk image URLs for later use
echo "Prepared Management Node disk image:   https://$storageAccountName.blob.core.windows.net/$containerName/pexip-infinity-$version-management-node.vhd"
echo "Prepared Conferencing Node disk image: https://$storageAccountName.blob.core.windows.net/$containerName/pexip-infinity-$version-conferencing-node.vhd"

Now that you have your prepared disk images in your Azure storage account you can use them to create the VM instances in Azure in which you can deploy the Pexip Infinity Management Node and Conferencing Nodes.

Version information for previous Pexip Infinity releases

If you are running an older version of Pexip Infinity software, and you want to deploy a new Conferencing Node, you must use a published Pexip Infinity disk image version that corresponds to the software version running on your Management Node. This includes dot releases — so for example, for a v12.1 Management Node you must install a v12.1 Conferencing Node rather than a v12 Conferencing Node. Similarly, if your system has been upgraded since you first installed the Management Node and some Conferencing Nodes, you will need to obtain and prepare the appropriate Conferencing Node image corresponding to the software version you are currently running.

To obtain the published disk images for older software versions (for both the Management Node and for a Conferencing Node) you need to use the appropriate software version number in the PowerShell scripts supplied above.

You must replace the current version number (13-0-0-32124-0-0) with the relevant older version as given in the table below:

Pexip Infinity release Version number to use in script
v12 12-0-0-29682-0-0
v12.1 12-1-0-29734-0-0
v12.2 12-2-0-29803-0-0