Migrating to Windows Azure Virtual Machine

Tonight my team in DyCode migrate our Jepret server to use Azure VM, as we tweeted here:

FYI, Jepret is a photo-sharing app specifically developed for Nokia S40 feature phones. Although the photos taken by S40 phones only have file size of 50 – 100KB, multiply that by hundred thousands of photos, it’s still big. Strong and stable backend is clearly needed.

Jepret API service is built using Node.js and MongoDB. To my knowledge, it’s the first implementation of the open-source and non-Microsoft technologies on top of Azure in Indonesia. In fact, according to Microsoft Indonesia, we’re the first adopter of Azure in Indonesia. Just so you know 🙂

Initially, Jepret API service was hosted on top of Cloud Services. As we found a lot of challenges in term of maintainability and updating the API, and due to very fast growing of Jepret usage, we need to migrate the service to a more manageable solution. Hence, Azure VM is our choice.

Preparing a VM is not a trivial task though. Sure, creating it is as easy as 1 2 3 4, but turned out there are few gotchas.

For the sake of learning and latest technology, we select Windows Server 2012 Datacenter as the VM OS. Then, on VM configuration. we select Small (1 core, 1.75 GB memory) as the VM Size. And next, next, finish, and the VM creation begins.

For less than 5 minutes, the VM is created and ready to start. You have to manually start it, I think it’s related to the fee charging. After 2 – 3 minutes, VM is started and we’re ready to log in to it via Remote Desktop in order to install everything.

Honestly, that’s my first encounter with Windows Server 2012. Apart from the Metro UI, been using Microsoft technologies for 10 years, there’s nothing surprises me. We continue to install the most important service to deploy Node.js, Microsoft IIS. It’s no brainer, just open Server Manager, Add Roles and Features, select IIS and needed features, and the installation process begins as it should be. Although, it is not. I mean, after waiting more than 1/2 hour, the IIS installation is still not finished yet. The progress bar stays at about 64%.

I suspect that’s due to our selection of Windows Server 2012 Datacenter for the OS. Maybe, just maybe, it’s overweight. Then, we create a new VM with Windows Server 2012, October 2012. The result is quite the same, we can’t finish the IIS installation. Almost desperate, we create another VM, now with Windows Server 2008 R2 SP1 as the OS. Surprisingly, we still can not have IIS installed. The progress bar just die.

Desperately, as our last attempt, we create a new VM with Windows Server 2012 Datacenter as the OS. But, now with the VM size of Medium (2 cores, 3.5 GB memory), twice Small size. You know what, everything goes as silky smooth. We can have IIS installed for less than 5 minutes. Then we go ahead installing iisnode and Node.js via Web Platform installer, all is done in less than 10 minutes. So, if in the beginning we choose Medium as the VM size, we can have all installed and configured within less than 30 minutes, and we don’t have to create, recreate, and delete VMs all over again.

Obviously, VM size of Small and Extra Small should not be offered for installing WIndows Server as the VM OS. They may be still usable if we choose CentOS. In fact, we create another VM with CentOS for deploying MongoDB service, all goes smooth.

I share this so you don’t have to experience similar headache. You are welcome 🙂

One thought on “Migrating to Windows Azure Virtual Machine”

Comments are closed.