Tutorial: Installing and Configuring Windows Azure Command Line Tools for Linux on Ubuntu
Monday November 12, 2012 , 2 min Read
Windows Azure’s command line tools are traditionally available only on Microsoft Windows in the form of PowerShell Cmdlets. But with the June / Spring release of Windows Azure, Microsoft shipped the command line interface for Mac and Linux. This tutorial is a walk through of the steps of involved in setting up, configuring and using the Windows Azure command line tools on Ubuntu.
Windows Azure command line tools for Linux are built using Node.js. So, let’s start with the installation of Node.js.
Step 1 – Install Node.js
Run the following commands to install the latest build of Node.js
[crayon lang="shell"]
sudo add-apt-repository ppa:chris-lea/node.js
[/crayon]
[crayon lang="shell"]
sudo apt-get update
[/crayon]
[crayon lang="shell"]
sudo apt-get install nodejs npm
[/crayon]
Make sure that Node.js is installed and working by typing this command
[crayon lang="shell"]
node --version
[/crayon]
Step 2 – Install the Windows Azure package
We will now download the Azure specific packages for node.
[crayon lang="shell"]
sudo npm install azure –g
[/crayon]
Step 3 – Configuring the tools to use a specific Windows Azure account
This step will point the Windows Azure command line tools to a valid account of Windows Azure. You may have multiple active accounts but, the tools can only operate on one account at a time.
Running the following command will open the browser window with the sign in page which will redirect you to the publish settings file.
[crayon lang="shell"]
azure account download
[/crayon]
Once you have downloaded the publisher settings configuration file, point the tools to it with the following command
[crayon lang="shell"]
azure account import
[/crayon]
Let’s test the import by running the following command. If everything went fine, you should see the list
[crayon lang="shell"]
azure config list
[/crayon]
To switch to a different account, use the following command
[crayon lang="shell"]
azure config set subscription
[/crayon]
Step 4 – Trying out a few useful commands
To list all the storage accounts
[crayon lang="shell"]
azure account storage list
[/crayon]
To check the locations where the VM features are available
[crayon lang="shell"]
azure vm location list
[/crayon]
To check the locations where the web sites features are available
[crayon lang="shell"]
azure site location list
[/crayon]
Below is the screencast of this tutorial
- Janakiram MSV, Chief Editor, CloudStory.in