When I used to think about Linux from my bias as a Windows developer I used to think about posts like this (courtesy PennyArcade):
Yes, all the way back in the dusts of time – say 2002. Well, things have changed a lot since then. We have all kinds of great Linux integration points. And I must say – from my experiments and fumbling around with Linux – I remain very impressed with it as an ecosystem. I can’t think of a better central point when it comes to running lean, mean DevOps – Chef and Puppet run natively on it and setup couldn’t be easier. And I love the control. All that CLI goodness just takes me back to my first days writing programs on my old C64.
My good friends Jeremy Rule and Rich Maines wrote recently on Microsoft embracing Linux: “Did you know that 20% of virtual machines on Azure are Linux today? Azure also provides first-class support for Java, Node.js, Python, Ruby, and PHP and our recently announced Azure cloud security tools will work both on premise and in Amazon’s cloud.”
I know personally I’ve had to step up my game in terms of embracing Linux as an OS – including the LAMP stack (Linux-Apache-MySQL-PhP) – and Java. We can’t afford to be insular and think that MSFT provides the best in class tool for every given scenario. And on the Linux side of things, combining your development with the VS IDE means you’ll have enterprise-level debugging and repeatability that your team has been craving. Wow!
Anyway as I’ve left behind my prejudices and misconceptions about what Linux and OS programming is like, I’ve become a better programmer and a much better architect. I’m glad the old adversarial ways have passed behind; cooperation and integration is the new game and it frees up a lot of limitations that used to hurt our customers. Nicely done guys!
- A great article on 31 points successful people have used to form positive life habits. Three that popped out – get enough sleep (no screen time 1 hr before bed), waking up early and working out is nonnegotiable, and eating the frog (putting the most important things first).
- A great comic on the long road to confronting climate change, highly recommended.
I saw this great post recently by Donovan Brown. Thought I would take a waltz thru it really quick and share.
Creating a Linux Based Development Box on Azure
It might be a good idea to first create an availability group – add a Storage and a Cloud Service with a good naming convention you like. This way it won’t arbitrarily assign some wacked out names for you and you can delete them later.
Open up the Azure Management Portal – the Plus sign on the lower left (Add) -> select Compute -> Virtual Machine -> From Gallery.
Look at all these Ubuntu images we can pick from. Select Ubuntu, open up port 3389 for RDP.
Select A2 for the sizing. I unselected the SSH option and picked out a good strong admin password.
- Pick a good region and your (previously selected) storage accounts. Very important here – open up a port for RDP for 3389. (If you forget, you can also do this later in the Endpoints section of the Azure dashboard.)
- This next portion will take a while. Open up your SSH client of choice – some people like Putty, I like Bitvise. Then enter in the following into command line:
- sudo apt-get update
- sudo apt-get install xrdp
- sudo apt-get install xfce4
- sudo service xrdp start
- sudo apt-get install eclipse
- sudo apt-get install libwebkitgtk-1.0-0
- sudo apt-get install firefox
OK, that’s done. It takes, well, about forever. Once that’s done though you’re about there.
- Use remote desktop to dial onto ____.cloudapp.azure.com.
- R-click on the Panel – Add New Items, select Launcher. R-click, Properties, and add Eclipse. This will drop an icon onto the bottom part of your window.
- Click on the Earth to open up fireFox.
Start up Eclipse and select the Help menu. select Install New Software…
- Click Add… enter “TFS Plugin for Eclipse” for the name, and location of http://dl.microsoft.com/eclipse/tfs
- Select Team Explorer Everywhere. Click Next > , and then Next>
Accept the Microsoft Software License Terms
- Click Finish
- Restart Eclipse when prompted
- Close the Welcome page
- Select Window / Open Perspective / Other…
- Select Team Foundation Server Exploring
- Click OK
- Click Connect to Team Foundation Server and follow the instructions to connect.
And that’s it. You’ve got a fully running developer VM running Ubuntu, Eclipse and plugged into TFS – all on Linux.
Some DevOps Links for Today
Followed the incredibly easy startup guide from Keith Mayer, superstar – http://blogs.technet.com/b/keithmayer/archive/2014/10/03/quick-start-guide-building-highly-available-linux-servers-in-the-cloud-on-microsoft-azure.aspx
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:
- Log onto the Azure management portal. https://manage.windowsazure.com/ – the new one is fine.
- Create an Affinity Group (Settings -> Affinity Group). Call it something like LinuxForDemoDH or the like.
- Create a Storage Account. Click + (New), Create a Storage Account, then Data Services -> Storage -> Quick Create. Select your Affinity Group.
- Create a Virtual Network. (Network Services -> Virtual Network, Quick Create).
- Create a Cloud Service. (Compute, Cloud Service, Quick Create). Select your affinity group! I called this “linuxwebapp” in my example.
Add a new VM from the Gallery.
- In this case I chose Ubuntu, Ubuntu Server 14.04 LTS.
- Called it “linuxwebapp01” but it really doesn’t matter since the frontend is set in #5 above.
- Uncheck the SSH key, and check Provide a password.
- Select your Cloud Service and your Virtual Network / Storage Account.
- Select the option to Create an Availability Set (call it Linuxwebapp or the like)
- 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.
Select your App01 VM and browse to the dashboard, then point to Endpoints and select + Add.
- Add a standalone Endpoint
- Call it HTTP – and select TCP | 80 |80.
- Select the option to create a load balanced set. Call it LB_HTTP.
- Follow the steps above for WebApp02, only hook up to an existing LB set.
- 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
- Follow the same steps on the second webserver.
- 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: http://blogs.technet.com/b/keithmayer/archive/2014/12/01/step-by-step-automated-provisioning-for-linux-in-the-cloud-with-microsoft-azure-xplat-cli-json-and-node-js-part-2.aspx