Azure Blob Storage Witness Quick Start Guide
Introduction
This quick start guide describes how to create and deploy a witness using Azure Storage for either DxEnterprise or DxOdyssey. Using this guide, the user will create an Azure Storage Account, then use an Access Key or Shared Access Signature (SAS) URL in DxAdmin or DxCLI to connect to the witness.
Prerequisites
- An Azure account. Go to the Microsoft Azure Portal to set up an account.
Create an Azure Storage Account
-
Once an Azure account has been set up, select Azure Storage to create a new storage account.
-
Assign the storage account to a new or existing resource group and give it a name.
Create an Access Key or SAS URL for the Witness
- Access Key
- SAS URL
-
In the storage account, select Azure Keys on the left menu.
-
Select Show Keys.
-
Select Copy to copy the connection string.
-
Select Shared Access Signature on the left side menu.
-
Select Service, Container and Object under Allowed resource types.
-
Select a Start and End time for the SAS.
-
Select Generate SAS and connection string.
-
Select Copy to copy the Blob service SAS URL.
Add the Witness
Adding the cluster witness can be done via DxEnterprise's UI, DxAdmin, or through DxCLI.
- DxAdmin
- DxCLI
-
In DxAdmin, navigate to Advanced Configuration > Cluster Settings > Witness > WitnessProperties, then select the ellipses (...) to the right of WitnessProperties.
-
In the witness manager window, select Add Witness.
-
For witness type, select Azure Blob Storage.
-
Paste the Connection String or Blob service SAS URL into the Witness Path box and select Test. Once it passes the test, select OK.
-
Select the Apply button to save the configuration.
-
Windows Only: Open the Command Prompt as an administrator and change directory to
C:\Program Files\DH2i\bin
. -
Run the command
dxcli set-witness
to set the cluster witness.
Example
- Access Key
- SAS URL
dxcli set-witness "az:DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=/nbFVz1fOKH7b0RaY/5Ms8uytbY99PZsspZkcHvNtVRj//pUk4jUPV7owaUSuDd6eExv96sBvkCXsleATEsT33==;EndpointSuffix=core.windows.net"
dxcli set-witness "az:https://mystorage.blob.core.windows.net/?sv=2020-02-10&ss=b&srt=o&sp=rwdlactfx&se=2021-06-09T13:15:48Z&st=2021-06-09T05:15:48Z&spr=https&sig=cRDqOc25lpHfbP8X1hlkDnV4H1wJycCyuuqlgu8U1xg%3D"