Nullsession.com

Sometimes IT works!

SWE: Lär dig Azure – prenumerationer och priser

Hej!

Nu sparkar jag igång en serie där du får lära dig mer om Microsoft Azure. Tanken är att du ska hinna läsa och eventuellt göra någon labb under lunchen. Målgruppen är sådana som inte jobbat med Azure tidigare, så nivån är därefter.

PRENUMERATIONER

Man kan registrera sig för en månads gratis testversion i Azure: http://azure.microsoft.com/en-us/pricing/free-trial/

• Vi kräver att du registrerar ett kreditkort men vi kommer inte debitera dig för några tjänster utan du får 1350:- av oss att spendera som du vill. Under din provperiod ser du hur mycket du har kvar längst upp i portalen och när pengarna är slut avaktiverar vi dina resurser i Azure.
• Vill du fortsätta använda dom konverterar vi din testversion till en fullvärdig prenumeration och det är först då du börjar betala. Detta förutsätter att du inte ändrar inställningen för utgiftstaket under din prövoperiod.
• Du behöver ett telefonnummer, ett kreditkort och ett Microsoft-konto (fd Windows Live ID) för att registrera dig.

Vill man passera gå på direkten och teckna sig för en så kallad Pay-As-You-Go-prenumeration där man betalar via kreditkort månadsvis så registrerar man sig på https://account.windowsazure.com/signup?offer=ms-azr-0003p.

Om ditt företag är medlem i Microsoft Partner Network ger vi er 700:- per månad att förbruka i Azure. Läs mer på http://azure.microsoft.com/en-us/offers/ms-azr-0035p/

BizSpark-medlemmar får 1350:- att spendera i Azure, det erbjudandet hittar du på http://azure.microsoft.com/en-us/offers/ms-azr-0064p/.

Via en MSDN-prenumeration får enskilda utvecklare tillgång till bland annat Azure. Beroende på vilken nivå man prenumererar på så är värdet $50 – $150 per månad. Mer information om de olika nivåerna hittar du på http://www.visualstudio.com/en-us/products/msdn-subscriptions-vs.

Om ni är ett större företag har ni med största sannolikhet ett Enterprise Agreement med Microsoft. Information om det hittar du på http://www.microsoft.com/licensing/licensing-options/enterprise.aspx#tab=2. Det ger er möjlighet att via portalen skapa subscriptions till Azure som är knutet till erat avtal. Mer information om vilka fördelar du får om du använder Azure tillsammans med ett Enterprise Agreement hittar du på http://azure.microsoft.com/sv-se/pricing/enterprise-agreement/.

Har du Open Volume (http://www.microsoft.com/licensing/licensing-options/open-license.aspx ) kan du fortsätta arbeta med samma återförsäljare som du redan använder dig av. Aktivera en ny prenumeration eller lägg till mer kredit på http://azure.microsoft.com/sv-se/offers/ms-azr-0111p/.

PRISER

Vill man räkna ut vad ett utnyttjande av vissa resurser i Azure kostar per månad finns en priskalkylator: http://azure.microsoft.com/sv-se/pricing/calculator/?scenario=full I länken är den fulla kalkylatorn aktiverad, vill man bara veta till exempel vad en webbplats kostar kan man aktivera endast den delen av kalkylatorn i menyraden. Man väljer den typ av resurs man är intresserad av, till exempel en virtuell maskin följt av antal och storlek. Sedan kan man lägga till ytterligare lagringsutrymme, SQL-databaser osv och få fram en uppskattning på månadskostnaden eller pris / timme.

De priser man ser i portalen är listpriser. Beroende på om man åtagit sig att konsumera för ett visst monetärt belopp eller andra orsaker kan man erhålla rabatt på priserna.

INFORMATION

Vad är Azure: http://azure.microsoft.com/sv-se/overview/what-is-azure/
Enterprise Agreement: http://www.microsoft.com/licensing/licensing-options/enterprise.aspx
Azure Blog: http://azure.microsoft.com/blog/

Om du upplever att jag missat något eller har ytterligare frågor så ställ dom i kommentarsfältet!

Creating and uploading your Azure RemoteApp template image

Creating and uploading the image for RemoteApp turned out to be a challenge for some odd reasons. For the script Upload-AzureRemoteAppTemplateImage.ps1 to work you need to make sure you fulfill the prereqs it needs. Which can be found if you read the script ;)

If Upload-AzureRemoteAppTemplateImage.ps1 fails for “odd” reasons you need to make sure that you’re running PowerShell as Admin and that you’re starting “Windows Azure PowerShell” or have the Azure module loaded.

Here’s my short list of what you need to do:

  • Create a new Hyper-V VM with a 40 GB FIXED dynamic (now supported) size disk.
  • Install Windows Server 2012 R2 (only OS supported)
  • Install RDSH role and Desktop Experience feature (both needed)
  • Reboot (needed to make sure application installations are aware of RDS)
  • Login
  • Install the applications you want to publish to your users
  • From an elevated CMD, run “fsutil behavior set disableencryption 1″ (disables EFS encryption of file system)
  • Reboot (makes sure EFS disable is written to registry)
  • Login
  • Run “sysprep /oobe /generalize /shutdown”

Once your machine is turned off you need to start PowerShell as administrator with the Azure cmdlets.

Run the script provided by the portal, find your VHD-file and you should be on your way!

Uploading the file

upload4

 

 

The portal states the template status as “uploading”

upload3

Connecting an Azure RemoteApp virtual network to a virtual network

So you finally got your trial approved for RemoteApp and thought you’d connect your RemoteApp virtual network to the rest of your infrastructure in Azure? Well, I stepped in that pile too. But solved it in the usual way, with PowerShell and the new multi-vnet Configuration ability.

You need at least one existing virtual network, and you need to configure a virtual network in the RemoteApp part of the portal.

Click RemoteApp -> Virtual Networks -> Create

Enter a name for your network and select region.

01

Enter the address space you want for your RemoteApp server(s) and the address space for your local networks. With local networks I mean either your on-premises network or the other networks you have defined in Azure. In my case I’ll be connecting my RemoteApp network to my other networks in Azure.

02

Enter the DNS-servers you want your RemoteApp server to receive from DHCP. This is so your applications can resolve your local hostnames, for SQL connectivity or any other type of traffic. You also need to specify the address of the VPN device. I’ve entered the address to my gateway in Azure. If you’re connecting multiple virtual networks you MUST select “Dynamic” for VPN gateway type. Static routing only works between two networks in Azure.

03

Network created, now waiting for VPN Configuration.

04

Now we’ll click on “Manage key” and copy the address for the gateway. You might as well copy the key to a notepad file while you’re at it.

05

Add your RemoteApp network as a local network in the “Networks” part of the portal. Specify the gateway address you just copied.

08

When it’s saved, export the network configuration from the portal. Open the XML-file and edit the corresponding Virtual network, adding a connecction to your newly created “local” network. Mine is named RemoteAppVnet as you can see below.

09

Import your configuration to Azure. Networks -> New -> Network Services -> Import configuration

import

Once your information is imported you’ll see your new network as “Not connected” in the overview in the virtual network.

Open PowerShell (with the Azure cmdlets) and run the following two commands. Substituting the vnetname and local network name and key for your values of course.

07

Once those are run your networks should be connected and all green!

06

How to configure multiple virtual network connections in Azure

When using infrastructure as a service in Microsoft Azure you could earlier only have one virtual network, which would be like it’s own little isolated island. A while back Microsoft enabled for its customers to connect multiple virtual networks together, both in the same datacenter, same region, cross region and cross subscription. This enables a whole lot of new scenarios, for example building your own global datacenter on top of Azure infrastructure.

So how do you go about doing it? Well, you need to start with planning. I know it’s boring but if you don’t you could end up having to tear everything down just to rebuild it, doesn’t sound too much fun either.

What you need before starting:

An ip-plan
A VPN device with a public IPv4 address (not necessary, but will let you enable a hybrid cloud scenario)
PowerShell cmdlets for Azure installed and configured

My ip-plan looks like this:

Local network name Subnet
HomeNet 10.0.0.0/24
AzureNet-Local 10.0.1.0/24
USNet-Local 10.0.2.0/24
JNNet-Local 10.0.3.0/24

Of the networks above HomeNet is my physical network location. The other three networks exists only in Azure. What you must make sure when you plan is that no range overlap anywhere, no matter if it’s in Azure or at any physical locations.

 

Once you’ve planned that I have a separate table for my topology so I know which networks to connect. When starting off you won’t know your gateway ip, so don’t worry.

Virtual Network Subnet Gateway Local network
AzureNet 10.0.1.0/24 137.117.227.xxx HomeNet 10.0.0.0/24
USNet 10.0.2.0/24 168.61.160.xxx JNNet 10.0.3.0/24
JNNet 10.0.3.0/24 23.97.77.xxx USNet 10.0.2.0/24

 

Getting started

Starting off I already have one network called AzureNet (10.0.1.0/24) which is connected to my physical network Homenet (10.0.0.0/24). You can follow this guide even if you don’t have that, just repeat the process.

vlcsnap-2014-06-13-09h38m57s199

 

 

Let’s create a new virtual network first

In the portal, click New -> Network Services -> Virtual Network -> Custom Create

Name your network and select a location. South Central is in Brazil so I’ve named my network BRnet.

 

newnet01

 

 

Select (or enter) your DNS servers ip and name for local name resolution.

newnet02

 

 

Enter your address space. Make sure there’s no overlapping subnets anywhere. Very important!

newnet03

 

 

Repeat this process for all the virtual networks you need.

When all your virtual networks are created it’ll look like this. Note the different locations in my setup, placing my networks in Japan, USA and Amsterdam.

vlcsnap-2014-06-13-09h38m43s56

 

 

Local networks

When the virtual networks are done we’ll create local networks of the virtual networks. This is because to be able to connect the networks they need to be defined as “local” in Azure.

 

vlcsnap-2014-06-13-09h40m17s223

 

 

Name your network, and specify 1.2.3.4 as VPN device address.

vlcsnap-2014-06-13-09h40m28s87

 

 

Specify the address space that you’ve planned beforehand.

vlcsnap-2014-06-13-09h40m51s54

 

 

Repeat this for each virtual network, re-defining it as local.

When you’re done it’ll look like this

vlcsnap-2014-06-13-09h41m17s60

 

 

Switch back to your virtual networks in the portal and go into the configure tab. Check the “connect to the local network”-box and select the corresponding “local network” that you planned before. Click save at the bottom. Repeat this process for each virtual network connecting it to the designated “local” network.

vlcsnap-2014-06-13-09h42m01s246

 

 

Next step is to create the dynamic gateway. You get the message “The gateway was not created” in the portal. At the bottom click “Create gateway” and select “Dynamic”. Do this for all your virtual networks. It’ll take 10-25 minutes to finish for each gateway. Coffee time!

vlcsnap-2014-06-13-09h42m39s112

 

 

When they’re all done, note the gateway ip address in your table for all your networks/gateways.

vlcsnap-2014-06-13-09h39m08s45

 

 

Edit your local networks and add the gateway ip address for each network.Click on the network, click Edit and enter your gateway ip.

vlcsnap-2014-06-13-09h44m40s40

 

 

When all virtual networks and their corresponding local networks are created it’s XML-time. Get some more coffee!

Click the Export-button and save the file.

Open it in Notepad / Notepad++ (if you haven’t tried it you must)

In the XML you’ll find the section <LocalNetworkSites> which contains all the networks defined as local.

<LocalNetworkSites>
<LocalNetworkSite name="AzureNet-Local">
<AddressSpace>
<AddressPrefix>10.0.1.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>137.117.227.238</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="HomeNet">
<AddressSpace>
<AddressPrefix>10.0.0.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>178.78.193.167</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="JNNet-Local">
<AddressSpace>
<AddressPrefix>10.0.3.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>23.97.65.15</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="USNet-Local">
<AddressSpace>
<AddressPrefix>10.0.2.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>168.61.160.90</VPNGatewayAddress>
</LocalNetworkSite>
</LocalNetworkSites>

If you look further down in the XML you’ll find the section <VirtualNetworkSites>. This contains subsections for each virtual network site <VirtualNetworkSite>, and in that section in turn you’ll see where to define the connections to each network.

 

<ConnectionsToLocalNetwork>
<LocalNetworkSiteRef name="HomeNet">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="JNNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="USNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
</ConnectionsToLocalNetwork>

So for each virtual network you’ll need to copy and paste each local network as above.

If you look at my complete XML I’ve marked those sections in red.

<NetworkConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/ServiceHosting/2011/07/NetworkConfiguration">
<VirtualNetworkConfiguration>
<Dns>
<DnsServers>
<DnsServer name="cmdc01" IPAddress="192.168.1.4" />
<DnsServer name="cmdemodc01" IPAddress="192.168.1.10" />
<DnsServer name="DC01" IPAddress="10.0.0.10" />
<DnsServer name="DC02" IPAddress="10.0.1.4" />
</DnsServers>
</Dns>
<LocalNetworkSites>
<LocalNetworkSite name="AzureNet-Local">
<AddressSpace>
<AddressPrefix>10.0.1.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>137.117.227.238</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="HomeNet">
<AddressSpace>
<AddressPrefix>10.0.0.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>178.78.193.167</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="JNNet-Local">
<AddressSpace>
<AddressPrefix>10.0.3.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>23.97.65.15</VPNGatewayAddress>
</LocalNetworkSite>
<LocalNetworkSite name="USNet-Local">
<AddressSpace>
<AddressPrefix>10.0.2.0/24</AddressPrefix>
</AddressSpace>
<VPNGatewayAddress>168.61.160.90</VPNGatewayAddress>
</LocalNetworkSite>
</LocalNetworkSites>
<VirtualNetworkSites>
<VirtualNetworkSite name="AzureNet" AffinityGroup="AzureNet">
<AddressSpace>
<AddressPrefix>10.0.1.0/24</AddressPrefix>
</AddressSpace>
<Subnets>
<Subnet name="Subnet-1">
<AddressPrefix>10.0.1.0/27</AddressPrefix>
</Subnet>
<Subnet name="Contoso-Subnet">
<AddressPrefix>10.0.1.200/27</AddressPrefix>
</Subnet>
<Subnet name="GatewaySubnet">
<AddressPrefix>10.0.1.32/29</AddressPrefix>
</Subnet>
</Subnets>
<DnsServersRef>
<DnsServerRef name="DC01" />
<DnsServerRef name="DC02" />
</DnsServersRef>
<Gateway>
<ConnectionsToLocalNetwork>
<LocalNetworkSiteRef name="HomeNet">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="JNNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="USNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
</ConnectionsToLocalNetwork>
</Gateway>
</VirtualNetworkSite>
<VirtualNetworkSite name="CMDemo" AffinityGroup="CMDemo-AFG">
<AddressSpace>
<AddressPrefix>192.168.1.0/24</AddressPrefix>
</AddressSpace>
<Subnets>
<Subnet name="Infra">
<AddressPrefix>192.168.1.0/26</AddressPrefix>
</Subnet>
<Subnet name="Mgmt">
<AddressPrefix>192.168.1.64/26</AddressPrefix>
</Subnet>
<Subnet name="Clients">
<AddressPrefix>192.168.1.128/27</AddressPrefix>
</Subnet>
</Subnets>
<DnsServersRef>
<DnsServerRef name="cmdc01" />
</DnsServersRef>
</VirtualNetworkSite>
<VirtualNetworkSite name="JnNet" AffinityGroup="JnNet-AFG">
<AddressSpace>
<AddressPrefix>10.0.3.0/24</AddressPrefix>
</AddressSpace>
<Subnets>
<Subnet name="Subnet-1">
<AddressPrefix>10.0.3.0/28</AddressPrefix>
</Subnet>
<Subnet name="Subnet-2">
<AddressPrefix>10.0.3.24/29</AddressPrefix>
</Subnet>
<Subnet name="Subnet-3">
<AddressPrefix>10.0.3.32/27</AddressPrefix>
</Subnet>
<Subnet name="GatewaySubnet">
<AddressPrefix>10.0.3.16/29</AddressPrefix>
</Subnet>
</Subnets>
<DnsServersRef>
<DnsServerRef name="DC01" />
</DnsServersRef>
<Gateway>
<ConnectionsToLocalNetwork>
<LocalNetworkSiteRef name="USNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="AzureNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
</ConnectionsToLocalNetwork>
</Gateway>
</VirtualNetworkSite>
<VirtualNetworkSite name="UsNet" AffinityGroup="CentralUS-AG">
<AddressSpace>
<AddressPrefix>10.0.2.0/24</AddressPrefix>
</AddressSpace>
<Subnets>
<Subnet name="Subnet-1">
<AddressPrefix>10.0.2.0/28</AddressPrefix>
</Subnet>
<Subnet name="Subnet-2">
<AddressPrefix>10.0.2.24/29</AddressPrefix>
</Subnet>
<Subnet name="GatewaySubnet">
<AddressPrefix>10.0.2.16/29</AddressPrefix>
</Subnet>
</Subnets>
<DnsServersRef>
<DnsServerRef name="DC02" />
</DnsServersRef>
<Gateway>
<ConnectionsToLocalNetwork>
<LocalNetworkSiteRef name="JNNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
<LocalNetworkSiteRef name="AzureNet-Local">
<Connection type="IPsec" />
</LocalNetworkSiteRef>
</ConnectionsToLocalNetwork>
</Gateway>
</VirtualNetworkSite>
</VirtualNetworkSites>
</VirtualNetworkConfiguration>
</NetworkConfiguration>

Note that for each network there is a corresponding section of <ConnectionsToLocalNetwork>.

When you’re done save the file and then it’s time to import it!

import

 

 

Wait for your networks to configure. Then it’s PowerShell-time!

Fire up PowerShell with the Azure cmdlets.

Run the cmdlet “Set-AzureVNetGatewayKey -VNetName AzureNet -LocalNetworkSiteName JNNet-Local -SharedKey a1b2c3d4″ for each virtual network setting the key for each local network.

So I’d run:

Set-AzureVNetGatewayKey -VNetName AzureNet -LocalNetworkSiteName JNNet-Local -SharedKey a1b2c3d4
Set-AzureVNetGatewayKey -VNetName AzureNet -LocalNetworkSiteName USNet-Local -SharedKey a1b2c3d4
Set-AzureVNetGatewayKey -VNetName AzureNet -LocalNetworkSiteName HomeNet -SharedKey a1b2c3d4
Set-AzureVNetGatewayKey -VNetName JNNet -LocalNetworkSiteName USNet-Local -SharedKey a1b2c3d4
Set-AzureVNetGatewayKey -VNetName JNNet -LocalNetworkSiteName AzureNet-Local -SharedKey a1b2c3d4

And so on, switching the virtual network and the local network according to your topology.

When you’re done with that it’s time to connect your networks:

Set-AzureVNetGateway -VNetName AzureNet -LocalNetworkSiteName JNNet -Connect

And as before, substitute the vnetnames and local network names.

Once done it’ll (hopefully) look like this:

vlcsnap-2014-06-13-09h46m22s38

 

 

How did you do? Let me know in the comments!

Why Microsoft Azure should be on top of your learning list

Today was the opening keynote of TechEd in Houston. Regardless of what’s earlier been said about Houston there wasn’t any problems detected today. Instead Microsoft launched a number of new features in and around Azure.

So what’s been said today? And what does it mean for the IT-pro?

Bigger VM’s

A8 and A9. More CPU, more ram, faster interconnects. This allows those companies running HPC workloads or data mining to finish faster.

Azure Files

Your own SMB share in Azure. Accessible from multiple Virtual Machines simultaneously.

Microsoft SCEP and Symantec/Trend Micro partnership

Protecting your VM’s and cloud services. And not only with our products but with Symantec or Trends products. You can choose.

Network improvements

Internal Load balancing - load balancing with private IP’s

Multiple site-to-site VPN, and VNET-to-VNet connectivity.

Reserved IP’s and public IP’s for VM’s

Azure Site Recovery

Replicate your virtual machines to Azure and failover if you need to. A secondary site for EVERYONE…

Azure RemoteApp

Remote applications from Azure to your devices and computers.

And that’s not even the complete list. You can sign up for the preview features here!

So what does this mean for the IT-pro?

The landscape for the IT-pros is rapidly changing. A few years ago virtualization in-house was the frontline of IT, but those days are quickly vanishing. To stay relevant now, and in the future, a knowledge of hybrid cloud, PowerShell and people centric IT (as it’s called) will be needed. The business side of many companies are buying cloud services today, it might be projektplace or salesforce but the step to getting their own VM isn’t that big. If you can’t deliver services from IT as cheap and rapidly as cloud services can do it it’s time to start thinking about how to solve that problem.

If someone had told me 10 years ago, or 20 years ago when I started in this industry that I’d deploy servers on the internet through a web page I would’ve laughed.

Today I can deploy 50 servers in less than 15 minutes with 5 lines of PowerShell.

How are you going to stay ahead of the game?

Azure Automation – Using the assets

After yesterdays post about getting started I’ve gotten some questions about the assets library. Thought I’d explain how to use some of the assets (or at least how I’ve figured it out I’d say, might be totally off but at least it works)…

Looking at the assets library we have a “Connection”-object containing our subscription ID. This could be an ID to another subscription, might be useful for IT to deploy services to a developers subscription or something like that.

We also have a “Certificate”-object where we also uploaded the corresponding certificate to our collection of management certificates in Azure, this needs to be done on the right subscription then if you’re managing multiple ones, keep that in mind…

Automation assets

 

 

 

 

 


<# .DESCRIPTION .NOTES Author: Joachim Nässlander, TSP Datacenter, Microsoft #>

workflow Start_Azure_Demo_VM
{
param()

$MyConnection = “Internal Subscription Connection” # <— The name of your Connection object in assets
$MyCert = “InternalSubscriptionCertificate” # <— The name of your Certificate object in assets

# Get the Azure Automation Connection
$Con = Get-AutomationConnection -Name $MyConnection # <— Connect to your subscription
$SubscriptionID = $Con.SubscriptionID
$ManagementCertificate = $Con.AutomationCertificateName
$Cert = Get-AutomationCertificate -Name $Con.AutomationCertificateName # <— Get the certificate from assets

write-output “Subscription ID: $SubscriptionID”

write-output “Certificate Name: $Con.AutomationCertificateName”

}

 

And since this is the internet. How are you using Azure Automation and the assets library, feel free to comment!

Have a nice weekend, and don’t miss The Fratellis to keep you company over a beer!

Getting started with Azure Automation

Azure automation is currently in preview so you might not see it in your portal if you haven’t enrolled already. You can enroll for Azure Automation at http://azure.microsoft.com/en-us/services/preview/and also find all other services currently in preview. It’s a good place to frequently check out, fun things emerge here!

So what is Azure Automation? Well, it’s the ability to run PowerShell workflow scripts from Azure, targeted at your Azure resources.

Once you’re enrolled into the preview program you can create your first automation account. An account can be seen as a container that you can fill with runbooks and assets needed by the runbooks. An asset can be for example a certificate allowing you to connect to your (or another) Azure subscription.

 

Automation dashboardThe overview over your runbooks looks like this. It’ll show you the number of runbooks, number of activites,  number of minutes you’ve ran your scripts and a whole lot more.

 

 

 

 

 

 

 

Now that you’re enrolled you might want to quickly just test it out, personally I love just getting a feel for things before diving into documenation. You can find example scripts and a how-to at http://azure.microsoft.com/en-us/documentation/articles/automation-create-runbook-from-samples/. One thing to note when creating your runbook is that your scripts name in the portal need to correspond to your workflow name. Ie if your workflow is named “Join-Servers-Domain” your runbook must be named the same.

 

Automation runbooks overviewLooking more at the portal, if you click “runbooks” up top, you can see your runbooks listed with their latest run time and status. This gives you a quick overview without having to look at each runbook individually.

 

 

 

Detailed view of runbook

Selecting one specific runbook gives you a chart over how it has ran over the some periods of time. Here you can also drill down into each script run and view script output and any input parameters.

 

 

 

 

 

Published runbookClicking on “author” while in detailed view takes you to the published version of the script. Here you can view your script and start it manually if you want to.

 

 

 

 

 

Runbook draftIf you opt for “draft” instead you’ll be able to edit your script and insert things from your assets library or other runbooks, allowing for runbooks to interact with each other. Here you can also test your runbook before publishing it.

 

 

 

 

 

Automation assetsThe assets library contains building blocks needed for your scripts to function properly. And it’ll make it easier for you to develop scripts for multiple subscriptions too.

In my example we have:

  • Connection to a subscription
  • A certificate which allows us to connect to this subscription (find a guide for that here)
  • PowerShell credentials so we don’t have to enter username/password each time
  • A module containing PowerShell cmdlets

 

 

You can read more about getting started with PowerShell workflows at http://technet.microsoft.com/en-us/library/jj134242.aspx.

Downgrading you ClearDB MySql database in Azure

Are you running a website or application in Windows Azure with data stored in MySql? I upgraded my database from the free database with a maximum of 20 Mb to the 1 GB option, costing me $9.90 a month. Well, I cleared it out and was going to do a downgrade from payed to free again. Well, it seems ClearDB doesn’t really like downgrading since the Revenue stream goes sour… So you’re on your own and need to create a new database and manually (woop!) migrate data. Feels like we’re back to 1886.

Steps:
Login to ClearDB site
Create a new database in the free plan
Copy server name, user name and password to a textfile, or just remember it all
Download MySql Workbench from Oracle (http://dev.mysql.com/downloads/tools/workbench/)
Install Workbench (next, next, finish)
Get the server name, user name and password to your existing database, wp-config.php has it or check the connection strings for your Azure website.

ClearDB01
 

 

 

Configure MySql Workbench to connect to old server
 Dump database

ClearDB02

 

 

 

 

 

 

 

 

Edit dump file to reflect new server and database name. Or make corresponding changes in Workbench, but this is easier to explain.

ClearDB04

 

 

 

 

 

 

 

Import/restore to new database in Workbench

ClearDB03

 

 

 

 

 

 

 

 

Edit wp-config.php to reflect new server name

ClearDB05

 

 

 

 

 

 

 

Verify it all works by reloading your website in your browser. (important!)

Delete old database on ClearDB site. This will also clear your payment plan. Login to Amazon and verify your payment authorizations to make sure.

TechX, visst ses vi där?

[jwplayer player="1" mediaid="3452"]

Can I restore my Active Directory in Windows Azure?

It seems like I get loads of questions about Windows Azure and the IAAS offering we’re running these days. The last one is about how to get into DSRM (Directory Services Restore Mode), if you’ve been running your AD for a while you remember the old F8 trick during boot but in Windows Azure there’s only RDP access, so no pressing F8 then… Well, there’s a solution for everything and our engineers thought of this too, long before Windows Azure.

One big prereq for this to work out. You must have set your DSRM password to something you remember ;)

Two ways of doing this:

1) Sync with the domain administrator password: http://technet.microsoft.com/en-us/library/jj713556.aspx

2) Set it manually: http://technet.microsoft.com/en-us/library/cc754363.aspx#BKMK_examples

Once that’s done you just use bcdedit to boot into DSRM the next boot, open up CMD and type:

1) bcdedit /set safeboot dsrepair
2) shutdown –r –t 0

Once it has rebooted you can logon to your server by using “hostname\administrator” with your DSRM password.

When you’re done restoring your AD you’ll need to make sure it boots back to normal. Open up CMD and type:

bcdedit /deletevalue {current} safeboot

On the next boot it’ll boot into Windows normally and you’re hopefully all back to normal operations!