A Microsoft Guy Does Linux and Drupal – Part 1

 

A Microsoft Guy Does Linux and Drupal – Part 1

  • Comments 3
High Level Goals For This Post
Purpose To defy conventional belief that MS doesn’t do Linux.

To demonstrate standing up Linux  VMs running Drupal

** Important Note **
Druipal Installation is the next post

Part 2 http://blogs.msdn.com/b/brunoterkaly/archive/2012/06/20/a-microsoft-guy-does-linux-and-drupal-part-2.aspx?CommentPosted=true#commentmessage
Key Lessons
  1. Working with the Windows Azure Portal to manage virtual instances 
  2. Understanding your Linux options 
  3. Downloading and Installing Putty
  4. Interacting with the Linux VM using a terminal session

Table of Contents


Exercise 1: Getting Started
Exercise 2: Selecting a flavor of Linux
Exercise 3: Configuration Details for your Linux VM
Exercise 4: Opening Ports, Connecting with Putty
Exercise 5: Putty – Working with your Linux VM at the command line


lahxjo2d[3]


Exercise 1: Getting Started
Part 1: Using the Portal
Part 2: Creating the Virtual Machine
Part 3: Working with the Gallery


Introduction
001
  1. This post is about install Linux in Windows Azure
  2. You can choose from various Linux installations
    1. Be sure to choose openSUSE for these posts
  3. Download, install, and run Putty to help you administer Linux

Creating a virtual machine 

002
  1. Open Internet Explorer and browse https://manage.windowsazure.com to enter the Windows Azure portal. Then, log in with your credentials.
  2. In the menu located at the bottom, select New | Virtual Machine | From Gallery to start creating a new virtual machine.

Working with the gallery 

003
  1. Select "From Gallery" to start creating a new virtual machine.
  2. Gallery will provide a list of available operating systems.

Exercise 2: Selecting a flavor of Linux
Part 1: The available flavors of Linux
Part 2: Naming the Linux VM
Part 3: Specifying VM Details


Selecting a flavor of Linux 

image
  1. Not including your own, you can choose your VM to run the following Systems:
    • Microsoft SQL Server 2012
      • This image contains the full version of SQL Server, including all components except Distributed Replay, Always On, and Clustering capabilities.
    • Windows Server 2008 R2 SP1
      • Windows Server 2008 R2 is a multi-purpose server designed to increase the reliability and flexibility of your server or private cloud infrastructure.
    • Windows Server 2012 RC
      • Windows Server 2012 incorporates Microsoft's experience building and operating public clouds, resulting in a dynamic, highly available server platform. It offers a scalable, dynamic and multi-tenant-aware infrastructure that helps securely connect across premises.
    • CentOS 6.2
      • This distribution of CentOS version 6.2 is provided by OpenLogic and contains an installation of the Basic Server packages
    • OpenSUSE64-12.1-Beta
      • OpenSUSE Linux 64 Bits (IAAS M1 Preview)
      • This is the distribution with Yast2
    • Suse Linux Enterprise Server
      • SUSE Linux Enterprise Server is a highly reliable, scalable, and secure server operating system, built to power mission-critical workloads in both physical and virtual environments. It is an affordable, interoperable, and manageable open source foundation
    • Ubuntu Server 12.04
      • Ubuntu Server 12.04 amd64 20120528.1
      • Ubuntu Server 12.04 (Precise Pangolin) amd64 20120528.1 Cloud Image

Naming the Virtual Machine (Linux) 

005
  1. You will need to provide:
    • Virtual Machine Name
    • User Name
    • Password
    • Size (larger VMs allow up to 14GB of memory)
  2. Some guidelines regarding Administrator account
    1. Rename the Default Administrator Account
    2. When you rename the default Administrator account, it removes the obvious indication that this account has elevated privileges.
    3. Although an attacker still needs the password to use the default Administrator account, a renamed default Administrator account adds an additional layer of protection against elevation of privilege attacks.
    4. Note: Renaming the default administrator account hinders only certain types of attack.
    5. Additionally, tools are available that enumerate group members, and these always list the original administrator account first.
    6. For the best protection against attacks on your built-in administrator account, create a new administration account and then disable the built-in account.

Specifying Linux VM Details 

image
  1. The DNS name is the name of your Linux OS in the cloud
  2. Specify a storage account or automatically generate one
    • This is so you can store tables, blobs, and queues
  3. Specify region or affinity
    • Affinity is a useful concept.
      • It allows you to group dependant Windows Azure services, and deploy those in one place if possible
        • If your services are dependant on each other it is good if those are co-located, so that transactions between them are executed faster.
          • The best option is if the network hops between your hosted services are minimized as much as possible
        • Lowering your bill - For the most part bandwidth within the data center is free of charge

Exercise 3: Configuration Details for your Linux VM
Part 1: Understanding Availability Set
Part 2: Fault tolerance for the Virtual Machine
Part 3: Dashboard, Endpoints, and Configuration


Understanding Availability Set 

007
  1. Availability sets means that your VMs will be distributed across different fault domains in the data center.
  2. This means if an entire rack goes down, you will have a running instance available

Your Virtual Machine Running (Portal) 

008
  1. The Linux OS is up and running after just a few minutes.
  2. We now need to test connectivity
  3. We will use the Putty tool(s)

Understanding the Dashboard, Endpoints, and Configuration 

009
  1. You have a few choices here:
    • Dashboard
      • Usage Overview
      • Status
      • URL
      • HostName
      • Public Virtual IP Address
      • SSH Details
      • Size
      • Disks
      • Location
      • Deployment ID
      • Subscription Name
      • Subscription ID
    • Endpoints
      • Name
      • Protocol (UDP or TCP)
      • Public Port
      • Private Port
      • Load Balanced
    • Configure
      • Virtual Machine Size
      • Availability Set

Exercise 4: Opening Ports, Connecting with Putty
Part 1: How to open endpoints to your Linux VM
Part 2: Opening a TCP port
Part 3: Working With Putty


How to open endpoints to your Linux VM 

010
  1. Each VM can have attached a number of disks for storing data, and communicates with other VMs through endpoints
  2. Endpoints are simply TCP or UDP ports that can be configured individually

Opening a TCP port 

011
  1. Note the:
    • Name
    • Protocol
      • TCP or UDP
    • Public Port (access from outside the data center)
    • Private Port (from within the data center)

Working with Putty 

012
  1. Now that you have provisioned and configured a Linux Virtual Machine, you will connect by using an SSH client.
  2. Note: You can download Putty, a free SSH client for Windows, here:
  3. Putty offers the following:
    • PuTTY (the Telnet and SSH client itself)
    • PSCP (an SCP client, i.e. command-line secure file copy)
    • PSFTP (an SFTP client, i.e. general file transfer sessions much like FTP)
    • PuTTYtel (a Telnet-only client)
    • Plink (a command-line interface to the PuTTY back ends)
    • Pageant (an SSH authentication agent for PuTTY, PSCP, PSFTP, and Plink)
    • PuTTYgen (an RSA and DSA key generation utility).

Exercise 5: Putty – Working with your Linux VM at the command line
Part 1: Starting Putty
Part 2: Working in a Linux Terminal Session


Starting Putty 

013
  1. Login with your credentials
    • User Name and Password (you provided this previously)
  2. You can get the SSH details from the portal

Your terminal screen to your Linux VM – Your are In! 

014
  1. You will need to login with your previous password.
  2. Once you do that, you are in!

Conclusion - Final Thoughts


Using the portal to configure a Linux distribution is remarkably simple. What isn’t addressed is adding additional software, like Apache, MySQL, etc. But the wizard like approach makes working with Linux and Azure simple and straightforward. Future posts will take the Linux VM one step further.


lahxjo2d[3][4]


 

  • I would rather not name my account Administrator...

  • Thanks, Gert. I added some best practices around account naming. Your point is well taken.

  • Can you connect to your open port from another VM on same virtual network? Say if both have port 80 open in endpoints. I couldn't for 3306.

    telnet localhost 80

Page 1 of 1 (3 items)
Leave a Comment
  • Please add 2 and 4 and type the answer here:
  • Post