![Install azure cli on linux vm](https://door.faraton.info/21.jpg)
![install azure cli on linux vm install azure cli on linux vm](http://codefoster.com/files/azurecli_06.png)
|- create_az_instance.sh -> Launch a vm ( requires a vnet) |- check_az_vmsize.sh -> Displays available vmsize per chosen vcpu number |- check_az_image.sh -> Displays most recent image details per OS type Below are the files you will find after cloning the directory (with embedded hyperlinks).Pick an area on your file system and issue the following command.Note: The default region used in this lab will depend on your resource group or the configured region parameter.| output | /home/brokedba/.azure/config | table | $ az config set defaults.output= table +-+-+ Your public key has been saved in /home/brokedba/id_rsa_az.pub. Your identification has been saved in /home/brokedba/id_rsa_az.
![install azure cli on linux vm install azure cli on linux vm](https://www.thomasmaurer.ch/wp-content/uploads/2019/06/Create-Azure-Linux-VM-Azure-CLI-SSH-Keys-DNS-Name.jpg)
$ ssh-keygen -P "" -t rsa -b 2048 -m pem -f ~/id_rsa_az below is the PEM based key pair I generated for this lab
#INSTALL AZURE CLI ON LINUX VM CODE#
The code also ensures that required network components like subnet or security group are created if missing during the launch.
#INSTALL AZURE CLI ON LINUX VM WINDOWS#
In total, 6 interactive BASH scripts & userdata files were used with Windows turning out to be the nastiest to deploy (I’ll explain why). With a little patience and few days debugging bash errors, my interactive scripts can now automate the provisioning of a webserver on 6 different OS ( RHEL, Centos, Oracle Linux, Ubuntu, SUSE, Windows server 2016) Here’s also a gif demo to see things in motion: I. Here’s a direct link to my Github repo with all the scripts: What comes along when you test your third cli tool in a row though, is how easy it is to spot differences with other cloud platforms (expect to see some in this post). Thus, az-cli became my third victim after oci-cli and aws-cli.Īs in my previous cli tutorials, the aim is to demonstrate how the CLI tool can enrich your IaC experience when combined with powerful shell scripts. Azure cli was another tool I had to try right after passing Az-900 azure certification, because what are certifications for if it’s not to give a little itching to get your hands a little dirty.
![Install azure cli on linux vm](https://door.faraton.info/21.jpg)