Uploading and Deploying a vTA Image Through the Azure CLI
A different way to create and manage Azure resources is through the Azure CLI. In this chapter we indicate how to use the CLI to perform the operations done via the web GUI in the chapter Uploading and Deploying a vTA Image Through the Azure Web GUI.
Full documentation of the Azure CLI is found here: https://docs.microsoft.com/en-us/cli/azure
Creating a Storage Account
Here is shown:
- how to create a resource group (this is assumed to exist in the web GUI in the chapter Uploading and Deploying a vTA Image Through the Azure Web GUI)
- how to create a storage account within the resource group
- how to create access keys. Access keys are used to authenticate applications when they make requests to the Azure storage account. They are needed for some of the operations that follow.
# Create resource group az group create --location northeurope --name netrounds # Create storage account az storage account create --name netroundsstorage --resource-group netrounds --location northeurope export AZURE_STORAGE_ACCOUNT=netroundsstorage # Get access key az storage account keys list --resource-group netrounds --account-name netroundsstorage -o table export AZURE_STORAGE_KEY=<one of the keys from the above command>
Creating a Storage Container (Blob)
# Create storage container az storage container create --name netroundscontainer --account-name netroundsstorage --account-key AZURE_STORAGE_KEY
Uploading the Test Agent VHD File to the Storage Container
The VHD file you have downloaded from Netrounds Control Center is named
netrounds-test-agent_<version number>.vhd
. This is provided as the
--file
argument. The –-name
argument specifies what the VHD file
is to be called in Azure.
# Upload VHD az storage blob upload --container-name netroundscontainer --file netrounds-test-agent_<version number>.vhd --name test-agent.vhd --type page --account-name netroundsstorage --account-key AZURE_STORAGE_KEY
Creating a Virtual Machine
When creating a virtual machine for running the vTA, you need to use
the --admin-username
option to specify an admin user and the
--ssh-key-value
option to supply your public SSH key in a file (assumed
to be named id_rsa.pub
below).
# Create VM az vm create --resource-group netroundsstuff --name netroundsvta --os-type Linux -–image https://netroundsstorage.blob.core.windows.net/netroundscontainer/test-agent.vhd --use-unmanaged-disk --storage-account netroundsstorage --boot-diagnostics-storage netroundsstorage --custom-data user-data.yaml --admin-username <user-name> --ssh-key-value id_rsa.pub
The option --custom-data
is used to initialize the Test Agent with a
Paragon Active Assurance cloud-init config in a YAML file (userdata.yaml
).
Note that this cannot be done through the web GUI. The YAML file has the following format:
#cloud-config netrounds_test_agent: name: MyTAA email: myuser@email.com password: mypassword account: myaccount
An additional line server:
can be included in the YAML file to specify a
server different from the Paragon Active Assurance SaaS server (which is the default).
Provided that correct credentials are given here, the vTA will register automatically with the Paragon Active Assurance system and appear in the list of Test Agents in the Control Center GUI.