Creating virtual machines using cross platform command-line tools
You can create virtual machines using cross platform command-line tools, as Azure allows you to provision and manage virtual machines and many other Azure resources. The commands in these tools can be scripted to provide automated deployments. The cross-platform command-line tools are built using Node.js, and as the name implies will work across multiple platforms. The tools are supported on Windows, Mac, and Linux.
There are few ways to install the X-Plat CLI; using installer packages for Windows and OS X or combination of Node.js and NPM for Linux.
Node.js and npm via nave
Nave is a tool for handling node.js installations. Nave is to node.js just like RVM is to Ruby. It pulls directly from nodejs.org
Follow below instructions:
Note: # = explanation; $ command = execute on Linux VM
$ sudo su –#install node.js through nave
$ wget https://raw.github.com/isaacs/nave/master/nave.sh
$ chmod +x nave.sh
$ ./nave.sh install 0.10.15
$ ./nave.sh use 0.10.15
$ node –v
$ curl -s https://npmjs.org/install.sh > npm-install-$$.sh
$ sh npm-install-*.sh
Microsoft Azure X-Plat CLI
use npm command to install Azure X-Plat CLI
#install X-Plat CLI
$ npm install azure-cli -g
Using Microsoft Azure X-Plat CLI
Type $azure to test and show sub-commands
Microsoft Azure Publish Settings File
MIcrosoft Azure Publish Settings File needs to be downloaded and imported in order to create resources on related subscription.
$azure account download
$azure account import “path to the publishing file”
This article is a part of 70-533 Implementing Microsoft Azure Infrastructure Solutions Prep course.
More Articles included in this course are
Practice Tests in this course are