網頁

2014年8月21日 星期四

Microsoft Azure --- Install & Configure the Azure Cross-Platform Command-Line on Ubuntu (Lubuntu)

I know we can set static IP on Azure VM IaaS by using the Azure PowerShell on windows platform, but I want to do the same action on my Linux workstation. Based on this reason, I refer to the Microsoft Azure Web Site and find out there is the Azure cross-platform command line as the PowerShell. So I study the related information and write down the related procedure as follows:

Install Node.js with NPM
At first, we will add the Launchpad PPA to Lubuntu 14.04 by executing the sudo add-apt-repository ppa:chris-lea/node.js command.ScreenHunter_380To downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies by using the sudo apt-get update command.ScreenHunter_381After adding the required PPA file and updating package lists, we will install Node.js with NPM package by running the sudo apt-get install nodejs command.ScreenHunter_383
Check Node.js and NPM version
To make sure that Node.js and NPM package are installed normally by typing the node --version commandScreenHunter_387and npm -v command
ScreenHunter_388
Install Azure Cross-Platform Command-Line Interface
Refer to the related document at this Microsoft URL http://azure.microsoft.com/en-us/documentation/articles/xplat-cli/ , we will install it by using the sudo npm install azure-cli -g command.ScreenHunter_389
Connect to the Azure subscription
To configure the xplat-cli to work with the Azure subscription, we have to firstly connect to the Azure subscription.
How to do it? The simple method is the organization account login to the Azure.
The login method only work with organizational account. If we are using a Microsoft account to login to the Azure subscription, we have to create a new user on Azure Active Directory so that this new user will be an organizational account.

Create an organizational account
If the default directory has already exist, we will directly create a new user by clicking ADD USER on Active Directory.ScreenHunter_390Due to we will create a new user belongs to the organization account, please select New user in your organization in TYPE OF USER and key in name in USER NAME.ScreenHunter_391In user profile dialog, we will key in some information as FIRST NAME, LAST NAME, DISPLAY NAME and select the User Role.ScreenHunter_392By clicking create button, the system will assign a temporary password for the organization user.ScreenHunter_393Please supply a legal email address for receiving this temporary password.ScreenHunter_394So does that the organizational account will be created now.ScreenHunter_395
Delegate Co-administrator role
In the management portal, select SETTINGS, Administrators and click Add button.ScreenHunter_397To key in the organization account with email address next to select one subscription.ScreenHunter_398So does that the organizational account can manage this Azure subscription now.ScreenHunter_399
Change password
At first, we have to change temporary password by clicking the hyperlink from mail or directly login to the Azure portal by using the organizational account.

So does that the system will redirect to another page for changing the password.ScreenHunter_402If the change process is successful, we can login to the Azure system now.
ScreenHunter_404
Execute the command line
After finishing the above method, we will login using an organizational account by using the azure login command.ScreenHunter_406
To log out the Azure, we can execute the azure logout command as follows:ScreenHunter_408
As to what functionality of this tool will be provided, we can refer to the Azure Official Web Site as this URL
http://azure.microsoft.com/en-us/documentation/articles/command-line-tools/

Although refer to this URL, I still don’t know how to set Static IP from Ubuntu. Maybe there is this function in the future, I guess.

Reference :
Due to npm now come with pre-packaged with Node.js ,we will get the error message if install it individually.
ScreenHunter_385
Since 2010 Design by Davidwa
©Copyright Davidwa Inc. All rights reserved.