AZURE - Stairway To Heaven

Posted by Waclaw Chrabaszcz on Geeks with Blogs See other posts from Geeks with Blogs or by Waclaw Chrabaszcz
Published on Sat, 02 Aug 2014 07:18:32 GMT Indexed on 2014/08/18 16:27 UTC
Read the original article Hit count: 396

Filed under:
|

Originally posted on: http://geekswithblogs.net/Wchrabaszcz/archive/2014/08/02/azure---stairway-to-heaven.aspx

 

Before you’ll start reading please start to play this song.

 

OK boys and girls, time get familiar with clouds. Time to become a meteorologist. To be honest I don’t know how to start. Is cloud better or worse than on campus resources … hmm … it is just different. I think for successful adoption in cloud world IT Dinosaurs need to forget some “Private Cloud” virtualization bad habits, and learn new way of thinking.

Take a look:

- I don’t need any  tapes or  CDs  (Physical Kingdom of Windows XP and 2000)

- I don’t need any locally stored MP3s (CD virtualization :-)

- I can just stream music to your computer no matter whether my on-site infrastructure is powered on.

Why not to do exactly the same with WebServer, SQL, or just rented for a while Windows server ? Let’s go, to the other side of the mirror. 1st  - register yourself for free one month trial, as happy MSDN subscriber you’ve got monthly budget to spent. In addition in default setting your limit protects you against loosing real money, if your toys will consume too much traffic and space.

http://azure.microsoft.com/en-us/pricing/free-trial/

Once your account is ready forget WebPortal, we are PowerShell knights.

http://go.microsoft.com/?linkid=9811175&clcid=0x409

#Authenticate yourself in Azure
Add-AzureAccount

#download once your settings file
Get-AzurePublishSettingsFile

#Import it to your PowerShell Module
Import-AzurePublishSettingsFile "C:\Azure\[filename].publishsettings"

#validation
Get-AzureAccount
Get-AzureSubscription

#where are Azure datacenters
Get-AzureLocation

#You will need it Smile
Update-Help

#storage account is related to physical location, there are two datacenters on each continent, try nearest to you
# all your VMs will store VHD files on your storage account
#your storage account must be unique globally, so I assume that words account or server are already used
New-AzureStorageAccount -StorageAccountName "[YOUR_STORAGE_ACCOUNT]" -Label "AzureTwo" -Location "West Europe"
Get-AzureStorageAccount

#it looks like you are ready to deploy first VM, what templates we can use
Get-AzureVMImage | Select ImageName

#what a mess, let’s choose Server 2012
$ImageName = (Get-AzureVMImage)[74].ImageName

$cloudSvcName = '[YOUR_STORAGE_ACCOUNT]'
$AdminUsername = "[YOUR-ADMIN]"
$adminPassword = '[YOUR_PA$$W0RD]'
$MediaLocation = "West Europe"

$vmnameDC = 'DC01'


#burn baby burn !!!
$vmDC01 = New-AzureVMConfig -Name $vmnameDC -InstanceSize "Small" -ImageName $ImageName   `
    | Add-AzureProvisioningConfig -Windows -Password $adminPassword -AdminUsername $AdminUsername   `
    | New-AzureVM -ServiceName $cloudSvcName

#ice, ice baby …
Get-AzureVM
Get-AzureRemoteDesktopFile -ServiceName "[YOUR_STORAGE_ACCOUNT]" -Name "DC01" -LocalPath "c:\AZURE\DC01.rdp"

As you can see it is not just a new-VM, you need to associate your VM with AzureVMConfig (it sets your template), AzureProvisioningConfig (it sets your customizations), and Storage account. In next releases you’ll need to put this machine in specific subnet, attach a HDD and many more. After second reading I found that I am using the same name for STORAGE and SERVICE account, please be aware of it if you need to split these values.

Conclusions:
- pipe rules !
- at the beginning it is hard to change your mind and agree with fact that it is easier to remove and recreate a VM than move it to different subnet Smile
- by default everything is firewalled, limited access to DNS, but NATed outside on custom ports. It is good to check these translations sometimes on the webportal.
- if you remove your VMs your harddrives remains on storage and MS will charge you Smile. Remove-AzureVM -DeleteVHD

For me AZURE it is a lot of fun, once again I can be newbie and learn every page. For me Azure offers real freedom in deployment of VMs without arguing with NetAdmins, WinAdmins, DBAs, PMs and other Change Managers. Unfortunately soon or later they will come to my haven and change it into …

 

© Geeks with Blogs or respective owner

Related posts about Azure

Related posts about powershell