I wanted a developer machine/server for doing some quick prototyping with Node and Meteor, and decided to setup one quickly in Azure. If you are wondering what is meteor, checkout this video from the meteor website.
1 – Setup the Linux Virtual Machine
To start with, Go to Windows Azure website http://windowsazure.com and sign up for the trial (There is a 90 day free trial for you to enjoy) if you don’t have an account. Head over to the management portal at https://manage.windowsazure.com, click New –> Virtual Machines –> From Gallery and choose OpenLogic CentOS 6.2.
Click next, and provide the details, including Virtual Machine name, user name and password so that Azure can setup the instance.
Also, configure the DNS name so that we’ve a URL to access the VM.
Click next and complete the VM creation process. Once your VM is provisioned, have a look at the End points, and you’ll find that there is a Secure Shell (SSH) end point for you to connect. Let us connect over SSH.
2 – Connecting over SSH using PuTTY
We’ll use PuTTY, a free implementation of SSH to connect to the VM. Go and download PuTTY from here – I prefer installing via the PuTTY Windows installer. Fire up your PuTTY executable, and connect to the Linux Virtual machine. Make sure to provide your host name instead.
Click Open, and in confirm the security alert and login via the Console by providing the username and password you provided while creating the Azure VM. In the PuTTY console, you can execute what ever Linux commands you need.
3 – Install Meteor
Now, installation of Meteor is dead simple. In the Putty Console, Just run
$ sudo curl https://install.meteor.com | /bin/sh
Once the installation is over, you can create a new project. I’m just creating a copy of the leaderboard example project. Cd to your leaderboard directory, and start the meteor server.
$ meteor create --example leaderboard $ cd leaderboard $ meteor
Now, we need to configure Azure end point rules to allow HTTP connections over port 3000. Just head over to Virtual Machines –> Meteor –> Endpoints section in the Azure management portal, and add a TCP end point for port 3000.
You are ready. Browse to your VM’s address http://meteor.cloudapp.net:3000 in my case, to see the leaderboard.
Explore the codebase for Leaderboard, and get amazed!!. Happy coding.
Note: There is a Windows Installer for trying out Meteor in your Windows machine, how ever it don’t support meteor update etc.