Month: March 2015

Just set up a HA linux cluster… like a BOSS! (JBoss, that is…)

Followed the incredibly easy startup guide from Keith Mayer, superstar –

The Powerpoint deck is about 20 slides or so, incredibly easy to follow. But here’s a Cliff notes version for us Linux newbies out there:

  1. Log onto the Azure management portal. – the new one is fine.
  2. Create an Affinity Group (Settings -> Affinity Group). Call it something like LinuxForDemoDH or the like.
  3. Create a Storage Account. Click + (New), Create a Storage Account, then Data Services -> Storage -> Quick Create. Select your Affinity Group.
  4. Create a Virtual Network. (Network Services -> Virtual Network, Quick Create).
  5. Create a Cloud Service. (Compute, Cloud Service, Quick Create). Select your affinity group! I called this “linuxwebapp” in my example.
  6. Add a new VM from the Gallery.
    1. In this case I chose Ubuntu, Ubuntu Server 14.04 LTS.
    2. Called it “linuxwebapp01” but it really doesn’t matter since the frontend is set in #5 above.
    3. Uncheck the SSH key, and check Provide a password.
    4. Select your Cloud Service and your Virtual Network / Storage Account.
    5. Select the option to Create an Availability Set (call it Linuxwebapp or the like)
  7. Follow the above steps to add a second VM. Call it lxwebapp02 or the like. Only you won’t need 6e, just point to what you created then.
  8. Select your App01 VM and browse to the dashboard, then point to Endpoints and select + Add.
    1. Add a standalone Endpoint
    2. Call it HTTP – and select TCP | 80 |80.
    3. Select the option to create a load balanced set. Call it LB_HTTP.
  9. Follow the steps above for WebApp02, only hook up to an existing LB set.
  10. Look at the dashboard and note the name/port of the environment under the SSH DETAILS portion. Connect to it using a SSH client like bitvise, and use the azureuser account you specified last time. A Linux shell prompt will open. Enter the following: run sudo apt-get install apache2
  11. Follow the same steps on the second webserver.
  12. Now to test. Open up the App01 web server in Azure management portal and select the Dashboard, then look at the DNS name. Try to open it in a new browser window. If you can view the following, you’re golden!

That’s it for now. I’m going to try more automatic provisioning of my new highly available and scalable Linux webservers later today.

<news flash>Well I just got brought in on another firefighting task so my IAC (Infrastructure As Code) efforts will have to wait. See this post for the script I was going to follow: