Set up the bastion server
To create a bastion jump server for running the Azure command-line interface (CLI), complete the following steps.
Procedure
- Create a bastion server for your hardware
cluster:
- Centos 8 or Ubuntu
- 2 cores
- 4 GB RAM
For more information, see https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt&view=azure-cli-latest.
- Log in to the bastion server as the root user and then run this command to install the
required packages:
- On
CentOS:
dnf -y install python3 jq bind-utils wget podman podman-docker tar
- On Ubuntu:
sudo apt-get update sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg
- On
CentOS:
- Install the Azure CLI
- Download and install the Microsoft signing key:
- On
CentOS:
rpm --import https://packages.microsoft.com/keys/microsoft.asc
- On Ubuntu:
curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
- On
CentOS:
- Create the local
azure-cli
repository information by issuing these commands:- On CentOS:
sh -c 'echo -e "[azure-cli] name=Azure CLI baseurl=https://packages.microsoft.com/yumrepos/azure-cli enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
- On Ubuntu:
AZ_REPO=$(lsb_release -cs) echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
- On CentOS:
- Install
azure-cli
:- On CentOS:
yum install azure-cli
- On Ubuntu:
sudo apt-get update sudo apt-get install azure-cli
- On CentOS:
- Download and install the Microsoft signing key:
- Verify the Azure CLI version:
az --version
The output is similar to the following example:
username@servername ~ % az --version azure-cli 2.60.0 * core 2.60.0 * telemetry 1.1.0 Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.0b2 Python location '/opt/homebrew/Cellar/azure-cli/2.60.0/libexec/bin/python' Extensions directory '/Users/username/.azure/cliextensions' Python (Darwin) 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.1.0.2.5)] Legal docs and information: aka.ms/AzureCliLegal