Quantcast
Channel: Geekswithblogs.net | azur Posts
Viewing all articles
Browse latest Browse all 93

Windows Azure IT Roadshow Lab I

$
0
0

This lab was created for the Windows Azure IT Roadshow in Florida (first session). It covers the basics of creating a Windows Server 2012 virtual machine, a SQL Server 2012 virtual machine and a SQL Database. Some of the steps will help you configure the firewalls properly and show you how to stripe two blobs for increased performance.

Sign-up for 90-day trial

If you haven’t done so, open a 90-trial account now. The rest of this lab requires you to have an Azure subscription.

Note: You will need a Live ID to sign-up for the 90-day trial and a credit card. The credit card will not be charged until you upgrade your trial to an ongoing Azure plan.

To sign up for the 90-trial, visit http://aka.ms/try-azure

Create Windows Server 2012 Virtual Machine

Create a new Network

- Go to https://manage.windowsazure.com/

- Login using your Live ID
clip_image002

- You will see a screen similar to this
clip_image004

- Click on Networks

- Click on NEW (at the bottom) and select Custom Create
clip_image006

- Enter the details of this new Network service and specify an affinity group, then click the right arrow (>) to go to the next step
  Name: EastUSNet
  Affinity Group: <create new affinity group>
  Region: East US
  Affinity Group Name: EastUSAffinity

clip_image008

- In the Address Space and Subnets screen, leave the default values to setup a 10. network address space and a subnet. Click the right arrow (>).
clip_image010

- In the DNS Server and Local Networks, leave the settings empty to use the Microsoft internal DNS servers. Click on the completion button at the bottom to create the network.
clip_image012

- You now have a network created under your subscription.
clip_image014

Create a Windows Server 2012 Virtual Machine

- Click on Virtual Machines on the left bar

- Click on Create a Virtual Machine

- Select From Gallery

- Select Windows Server 2012 Datacenter

clip_image016

- Click Next ->

- Enter a name for the machine (mywindows2012vm), a password for the Administrator account and click next
MAKE SURE THE PASSWORD IS STRONG ENOUGH.

clip_image018

- Click Next ->

- Enter a DNS Name (this name must be unique). Make sure the EastUSNet network is selected. Leave the default for the storage account (create automatically). Leave the standalone VM setting default.
clip_image020

- Click Next ->

- Create an Availability Set (call it PROD-AVAIL)
clip_image022

- Click OK

At this time you are creating a new virtual machine. You will see its status as “Provisioning…”. This may take a few minutes. So far, you have created the following:

· A VM running Windows Server 2012 called mywindows2012vm

· A network called EastUSNet

· An Availability Set called PROD-AVAIL

· A storage account for your VM (name starts with portalvhd…)

· An Affinity Group called EastUSAffinity (part of the network definition)

Reminder:

· The availability set allows Azure to spread servers across fault and upgrade domains

· An affinity group helps Azure keep services running nearby for improved performance

Reminder:

· A storage account has specific performance targets

· A VM’s C:\ contains the binaries, and are stored in a blob, within a blob container, within a storage account

· Other blobs will be created as attached drives to the VMs and stored in this storage account

Additional Tasks:

- Explore the Windows Azure portal and look at your storage account; click on the storage account and click on Containers

- Explore the content of the vhds container. You will see a 30GB blob (note the name of the blob)

- Explore the Virtual Machine; click on Disks and see the name of the disk; it is the name of the blob

Create SQL Server 2012 IaaS

- Click on Virtual Machines on the left bar

- Click on NEW (bottom left)

- Select From Gallery

- Select Windows SQL Server 2012 SP1 Evaluation

- Enter a name for the machine (mysql2012vm), a password for the Administrator account and click next
MAKE SURE THE PASSWORD IS STRONG.

clip_image024

- Click Next ->

- Enter a unique DNS name, select the previously created storage account, and select the EastUSNet network
clip_image026

- Click Next ->

- Click OK (do not create an availability set)

Notes

At this point a second machine has been created, running SQL Server. The two servers are linked through the same network, and thus they both share the same affinity group.

Add 2 Drives to SQL Server VM

- Select the SQL Server VM from the list and select Attach Empty Disk from the menu (bottom)
clip_image028

- Enter a 1 for the size of the disk (this operation will add a 1GB disk to the VM for our demo)
MAKE SURE TO LEAVE THE CACHING SETTING TO NONE. THIS IS THE PREFERRED OPTION FOR DATA DISKS.
clip_image030

- Click OK

- Wait for the operation to complete

- Repeat the operation to add another 1GB drive

We now have added two disks to our SQL Server virtual machine. Let’s connect to the machine and finish the configuration.

Create Stripe in O/S

In this section we will create the stripes in the O/S directly. Striping the disks is not required to make SQL Server work in IaaS; however it is a way to improve I/O performance for your database when using RAID 1 (mirror). Because mirroring requires two or more disks, you must use a Small VM instance at a minimum to stripe your disks.

- Remote Desktop into your Virtual Machine (click on clip_image032 from the portal). Ignore the security warnings.
clip_image034

- Log in to your machine

- Start disk manager

- Right-click on one of the disks and choose New Striped Volume
clip_image036

- Create a Log and a Data directory on the newly created F drive

Configure O/S Firewall (TCP:1433)

The database virtual machine is almost ready; you will need to configure TCP 1433 in order to allow other virtual machines to connect to this database.

- Open the Windows Firewall (advanced settings)

- Add a rule allowing TCP, port 1433 to connect

  o Right-click on Inbound Rules and select New Rule

  o Select Port then click Next

  o Select TCP and enter 1433 in the Port and click Next.
clip_image038

  o Select Allow the Connection. Click Next. Click Next again.
clip_image040

  o Enter a name for the rule, like “SQL Server Connection” and click Finish

Enable ICMP (firewall) for PING

Last but not least, allow the ICMP protocol so that you can PING this server.

- Inside the Windows Firewall (advanced settings) add a new rule

- Select Custom to create a custom rule

- Select All Programs and click Next

- Under Protocols and Ports select ICMP v4
clip_image042

- Select Customize, choose “specific ICMP Types” and check echo request
clip_image044

- Click OK and Next

- Leave the defaults and click Next, Next, Next

- Enter a name for the rule, like PING Connection and click Finish

Create SQL Database Instance

In this Lab you will create a SQL Database instance and connect to it from the SQL Server VM. This will allow you to manage your SQL Database instance from SQL Server.

- Go to the Windows Azure Management Portal

- Select SQL Database on the left

- Click on NEW and choose Custom
Make sure you select “New SQL Database server”. Enter a name for your database.
Select a 1GB database. Click Next ->.

clip_image046

- Enter the server level admin user name and password. Make sure to select East US for this example. Leave the “Allow Windows Azure Services To Access The Server” checked.
Click OK.
clip_image048

- Click on your newly created database and explore the dashboard

Create a local database

In this step we will create a database on the stripped drive.

- Login to your SQL Server VM

- Open SQL Server Management Studio

- Open a Query Window (master will be selected by default)

- Right-click on the database server on the left and create a new database

  o Make sure to specify the F:\ drive as the storage drive for your database files (in the Log and Data directories you created earlier)
clip_image050

Connect to SQL Database from SQL Server

In this step we will login to the SQL Server VM and create a SQL Database instance.

- Login to your SQL Server VM

- Open SQL Server Management Studio

- Open a Query Window

- Change the connection to the SQL Database server on the master database

  o Right-click in the command window and select Change Connection…

  o Enter the full server name of SQL Database and the uid/pwd you created earlier

- Switch context to the database created previously (sqldb001)

  o You cannot run the USE command; use the dropdown containing the list of databases instead

- Run a command to verify your connection to the cloud database

SELECT GETDATE()


Viewing all articles
Browse latest Browse all 93

Trending Articles