Launching And Using Ubuntu Instance On Windows Azure Platform
Posted By : Varun Sharma | 09-Nov-2012
Windows Azure is an open and flexible cloud platform that enables you to quickly build, deploy and manage applications across a global network of Microsoft-managed datacenters. You can build applications using any language, tool or framework. And you can integrate your public cloud applications with your existing IT environment.
Task 1: Create Ubuntu Instance in Windows Azure
1. Open Windows Azure portal. Then, log in with your credentials.
2. In the menu located at the bottom, select New | Virtual Machine | Quick Create to start creating a new virtual machine.
3. Enter the DNS Name, Virtual Machine Name, set the New User Name to Administrator, the Password and the Size for the VM. Click the right arrow to continue.
4. You can automatically generate a new Storage Account or select one you already own. Then, select the Region/Affinity group/Virtual Network value (by default, West US) and select the subscription. Click the right arrow to continue.
5. In the Virtual Machines section, you will see the VM you created with a provisioning status. Wait until it changes to Running in order to continue with the following step.
6. Now, you will create the endpoints required to manage the VM. To do this, select the VM to go to the Dashboard page and then click Endpoints.
7. Click Add Endpoint, select Add Endpoint option and then click the right arrow to continue.
8. In the Specify endpoint details page, set the Name to HTTP, the Protocol to TCP and the Public Port and Private Port to 8080.
Task 2 - Generate SSH Key
Please follow below steps to generate & use the SSH keys in Windows Azure Platform.
1. Use the openssl to generate a X509 Certificate with 2048-bit RSA keypair
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout
my_PrivateKey.key -out myCert.pem
Answer some questions that openssl prompts/asks for (you may leave them blank as well).
2. Change permissions on private key for securing it.
chmod 600 my_PrivateKey.key.
3. Convert myCert.pem to the myCert.cer format.
openssl x509 -outform der -in myCert.pem -out myCert.cer.
4. Upload your myCert.cer, provisioning process will install the public key(automatically) to this certificate into the authorized-keys file for the specified users in the machine.
Note:- Go to Dashboard -> Settings -> Upload -> Select your myCert.cer & OK.
5. Connect with Linux virtual machine(LVM) using SSH.
ssh –i my_PrivateKey.key –p port [email protected].
A prompt box will appear to accept the fingerprints of the host’s Public Key, first time you logged in.
Task 3 - Verification: Connecting to the Ubuntu Instance
1. Now that you have provisioned and configured a Linux Virtual Machine, you will connect by using an SSH client.
2. In the Windows Azure Portal, select the Linux VM from the list to enter the Dashboard. Take note of the SSH Details field at the "quick glance" section, which is the public address you will use to access and connect to the virtual machine using the SSH client.
3. Type command ---> ssh username@DNS press enter & type your password.
4. You are successfully logged in to the linux machine on windows azure.
>Hope it helps !