Azure from Debian
Around a week ago, I started to play with programmatically controlling Azure. I
needed to create and destroy a bunch of VMs over and over again, and this
seemed like something I would want to automate once instead of doing manually
and repeatedly. I started to look into the
and mentioned that I wanted to look into this in
ardumont from Software
Heritage noticed me, and was planning to
We joined forces and started a packaging team for Azure-related
I spoke with the upstream developer of the azure-sdk-for-python and he pointed me towards azure-cli. It looked to me that this fit my use case better than the SDK alone, as it had the high level commands I was looking for.
Between me and ardumont, in the space of just under a week, we have now packaged: python-msrest (#838121), python-msrestazure (#838122), python-azure (#838101), python-azure-storage (#838135), python-adal (#838716), python-applicationinsights (#838717) and finally azure-cli (#838708). Some of these packages are still in the NEW queue at the time I’m writing this, but I don’t foresee any issues with these packages entering unstable.
azure-cli, as we have packaged, is the new Python-based CLI for Azure. The Microsoft developers gave it the tagline of “our next generation multi-platform command line experience for Azure”. In the short time I’ve been using it I’ve been very impressed with it.
In order to set it up initially, you have to configure a couple of of defaults
az configure. After that, you need to
az login which again is an
entirely painless process as long as you have a web browser handy in order to
perform the login.
After those two steps, you’re only two commands away from deploying a Debian virtual machine:
az resource group create -n testgroup -l "West US" az vm create -n testvm -g testgroup --image credativ:Debian:8:latest --authentication-type ssh
This will create a resource group, and then create a VM within that resource group with a user automatically created with your current username and with your SSH public key (~/.ssh/id_rsa.pub) automatically installed. Once it returns you the IP address, you can SSH in straight away.
Looking forward to some next steps for Debian on Azure, I’d like to get
images built for Azure using
vmdebootstrap and I’ll be exploring this in the
lead up to, and at, the upcoming vmdebootstrap
sprint in Cambridge, UK
later in the year (still being organised).
This post was syndicated on: