Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
- hosts: linux
  vars:
    linux_agent: linux-breeze-agent.tgz

Installation via Azure VM extension (Run command)

Check Navigation to get the agent installer file. Right click the file to select 'Save Link As'. Save the link*.

*The saved link should be of the following format: breeze-agent.XXXXXXXXXXXXXXXXXXXXXXX.cloudaware.20200922.0.x86_64.linux.tgz (for Linux) or breeze-agent.XXXXXXXXXXXXXXXXXXXXXXX.cloudaware.20210707.0.windows.signed.exe (for Windows).Please note that the copied installer link is valid for one hour only.

Save the installer file in secure location. Ensure the VM can route to that endpoint via HTTP protocol (for example, Azure Storage or an internal file server).

Linux:

1. Create URL for accessing the agent (in case of Azure Storage, the URL has the following format: https://breezedeploy.blob.core.windows.net/agent/breeze-agent.XXXXXXXXXXXXXXXXXXXXXXX.cloudaware.20200922.0.x86_64.linux.tgz)

2. Replace AGENT_DISTRO_URL placeholder in AGENT_URL= in the script below with the resulting URL:

Code Block
#!/bin/bash
AGENT_URL="AGENT_DISTRO_URL"
function echo_error {
  echo $@
  exit 1
}
BIN_CURL=$(which curl 2>/dev/null | grep -v 'not found')
BIN_WGET=$(which wget 2>/dev/null | grep -v 'not found')
if [ -n "${BIN_CURL}" ]; then
  CMD_DL="$BIN_CURL -o agent.tgz $AGENT_URL 2>/dev/null || echo_error \"download failed (curl)\""
elif [ -n "${BIN_WGET}" ]; then
  CMD_DL="$BIN_WGET -O agent.tgz $AGENT_URL 2>/dev/null || echo_error \"download failed (wget)\""
else
  echo_error "neither curl nor wget was found"
fi
echo "Downloading..."
DIR_TMP=`mktemp -d`
cd $DIR_TMP
eval "$CMD_DL"
echo "Installing..."
tar xf agent.tgz
cd breeze-agent
sudo ./install.sh > /dev/null
rm -fR $DIR_TMP
echo "Done"

3. Log in to Microsoft Azure Portal and select the VM in question. Select Operations → 'Run command' on the left.

4. Select RunShellScript, paste the resulting script from p.2 in the pop-up window on the right. Click Run.

5. Ensure the response has the following format:

Code Block
Enable succeeded: 
[stdout]
Downloading...
Installing...
Done

[stderr]

Windows:

1. Create URL for accessing the agent (in case of Azure Storage, the URL has the following format: https://breezedeploy.blob.core.windows.net/agent/breeze-agent.XXXXXXXXXXXXXXXXXXXXXXX.cloudaware.20210707.0.windows.signed.exe)

2. Replace AGENT_DISTRO_URL placeholder in $url = in the script below with the resulting URL:

Code Block
$url = "AGENT_DISTRO_URL"
[Net.ServicePointManager]::SecurityProtocol += [System.Net.SecurityProtocolType]::Tls12
function Exit-WithError($e, $c) { Write-Host "Error:" $(If ($e.Exception.InnerException) {$e.Exception.InnerException.Message} Else {$e.Exception.Message}); Exit $c }
Write-Host "Downloading..."
$dir_tmp = New-Item -ItemType Directory -Path ([IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.Guid]::NewGuid()))
$agent_distro = "$dir_tmp\agent.exe"
try { (New-Object System.Net.WebClient).DownloadFile($url, $agent_distro) } catch [System.Net.WebException] { Exit-WithError $_ 1 }
Write-Host "Installing..."
try { Start-Process $agent_distro -ArgumentList '-gm2' -NoNewWindow -Wait } catch { Exit-WithError $_ 2 }
Remove-Item $dir_tmp -Recurse -Force
Write-Host "Done"

More about running scripts on Azure VM: https://docs.microsoft.com/en-us/azure/virtual-machines/run-command-overview

Installation on VM managed by vCenter

Check Navigation to get the agent installer file.

...