Installing Azure command line tools on CentOS

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
tar zxvf node-latest.tar.gz
cd node-v0.8.16
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 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:          Microsoft                 Windows
data:  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:                                      Microsoft                 Windows
data:    MSFT__Sql-Server-11EVAL-11.0.2215.0-08022012-en-us-30GB.vhd                                Microsoft                 Windows
data:                              Microsoft                 Windows
info:    vm image list command OK

Leave a Reply

Your email will not be published. Name and Email fields are required.