A set of command line tools is available for the Windows Azure platform which allows you to e.g. list images and create virtual machines. The installation of this set is a bit tricky on CentOS as it requires node.js and this package is not available with yum. So we start with the installation of node.js:
yum install make gcc-c++ wget -N http://nodejs.org/dist/node-latest.tar.gz tar zxvf node-latest.tar.gz cd node-v0.8.16 ./configure make install
Now that node.js is installed, we can continue with the installation of the Azure CLI:
npm install azure-cli -g
Now it is time to add the Azure account details to our setup. This is accomplished by pointing a webbrowser to http://go.microsoft.com/fwlink/?LinkId=254432. Save this file on the CentOS machine and run these commands:
azure account import *credentials.publishsettings rm -rf *credentials.publishsettings
Finally, we are ready to use the tool for real:
# azure vm image list info: Executing command vm image list + Fetching VM images data: Name Category OS data: ----------------------------------------------------------------------------------------- ------------------------ ------- data: 2cdc6229df6344129ee553dd3499f0d3__BizTalk-Server-2013-Beta Microsoft BizTalk Server Windows data: 5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS63DEC20121220 OpenLogic Linux data: a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-201212.01-en.us-30GB.vhd Microsoft Windows data: a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-Datacenter-201212.01-en.us-30GB.vhd Microsoft Windows data: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_04_1-LTS-amd64-server-20121218-en-us-30GB Canonical Linux data: b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-12_10-amd64-server-20121218-1-en-us-30GB Canonical Linux data: b4590d9e3ed742e4a1d46e5424aa335e__SUSE-Linux-Enterprise-Server-11-SP2-New SUSE Linux data: MSFT__Win2K8R2SP1-Datacenter-201210.01-en.us-30GB.vhd Microsoft Windows data: MSFT__Sql-Server-11EVAL-11.0.2215.0-08022012-en-us-30GB.vhd Microsoft Windows data: MSFT__Windows-Server-2012-Datacenter-201210.01-en.us-30GB.vhd Microsoft Windows info: vm image list command OK
Installing Azure command line tools on CentOS