Get in touch with us!

Azure Automation DSC in 60

Yeah it’s 60 seconds, 60 minutes or perhaps 60 days depending on how good you are. To get started you’ll need this.

A VM in azure Classic or ARM (I use Classic because it’s hardcore and old)
An Azure automation account
A workstation running PowerShell, (I don’t recommend using anything older than WMF 5.0 because you will miss a lot of cool new features. Not that you’ll need them in this demo, but anyway.)

You can add the DSC extension when deploying your VM, but I’m not going to. Because in this scenario we pretend that the VM’s are already deployed.

While you are setting up your VM(‘s) you can save some time by creating an Azure Automation Account. Give it a name, Group, subscription and location and press play.

When the Automation Account is deployed we’ll need to grab some values from it. Navigate to your automation account -> Keys. Here we grab one of the keys and the service URL.

Next step, add the Azure Automation DSC extension. Before we continue I want to apologize for the naming of my VM’s and the way I mix up the screenshots.

Navigate to your VM, Settings -> Extensions. Press Add and choose to create an Azure Automation DSC extension.

Fill in the information from your Azure Automation Account.

I don’t understand the “Request Id”, I tried using a random GUID but that didn’t work so I just typed something.

Note that the configuration of the Azure Automation DSC extension is done by DSC and sometimes it’s a bit slow. So in my demo this might take 58min or something.

By looking in your Azure Automation Account you can see that you have or haven’t any Nodes registered.

So while the extension is being installed you can log into your VM and check which windows features are installed.

Okay, so this is a webserver without IIS and that’s what I want to configure. So the next step is to create a simple DSC file (locally on my administration computer). This post is not about writing DSC so I’m not going to describe how it works. But here is a simple DSC configuration that’s going to ensure that IIS feature is installed on the target VM.

Configuration IIS {
Node "webserver" {
WindowsFeature IIS {
Ensure = "Present"
Name = "Web-Server"
}
}
}

I save the PS1 file to c:testdscUntitled2.ps1, I think a proper naming of your configuration files is crucial. Then I go to my Azure Automation Account and click on the “DSC Configurations” tile, click Add a configuration, select the file, write a description and press OK.

Now when you have your configuration in Azure you’ll need to compile it, like you do if you have a local DSC pull server.

Navigate to your configuration and press “compile”.

You can check the compilation from the portal or by running this command.

Get-AzureRmAutomationDscCompilationJob -ResourceGroupName DSCPull -AutomationAccountName DSCdemo

 

And once again if you don’t have WMF 5.0 and haven’t installed the newest Azure resource manager cmdlets this won’t work.

And by now you probably have your extension installed.

To show you that it’s working you can run the following commands on your VM.

If the configuration of the extension is successful, you will see your azure automation URL listed in the configuration.

Before we add the configuration to the node let’s run a DSC update manually.

update-dscconfiguration -wait -verbose

No configuration, that’s expected.

Now navigate to your node and click on it.

Inside the properties of the node press the “Assign node configuration”-button, select the configuration and press OK.

Wait a sec or two and then run the update command one more time.

This step is so beautiful it made me cry. IIS gets installed and your VM is now managed by Azure Automation DSC!

To find out more check this article and look at the video by Mark Gray and Joe Levy.

https://azure.microsoft.com/sv-se/documentation/articles/automation-dsc-overview/

Submit a Comment

Your email address will not be published. Required fields are marked *

Starkare tillsammans

Bolag inom både publik och offentlig sektor efterfrågar en alltmer kostnadseffektiv, platsoberoende och säker digital arbetsplats. Därför går nu Altitude 365 och Uclarity samman och bildar ett gemensamt specialistbolag.
Fortsätt på Altitude 365Kolla in Exobe

Altitude 365 + Uclarity – Årets Modern Work Partner!

Vinnaren är ett bra exempel på hur en “Born in the Cloud” ständigt förbättrar sitt erbjudande, arbetar nära och proaktivt med Microsoft för att hjälpa kunderna på deras digitaliseringsresa. Plus att vi på Microsoft verkligen ser fram mot den nya bolags-konstellationen (Altitude 365 + Uclarity) för ett “Starkare Tillsammans”.

Uclarity och Altitude 365 - Starkare tillsammans

Uclarity är specialister på digitala möten, telefoni, kontaktcenter och digitalt arbetssätt. Altitude 365 är specialister på säkerhet, mobilitet och hur bolag kan optimera resan till Microsoft365. Nu gör vi gemensam sak och bildar bolag tillsammans.

– Pandemin har tydliggjort behoven av en modern digital arbetsplats och vi har diskuterat ett samgående med Altitude 365 under en längre tid. Våra kunder har behov av specialistkompetens och tillsammans blir vi en ledande specialist inom Digital Workplace-området, säger Niklas Olsson Hellström, VD Uclarity AB.

Tommy Clark, Partner, Altitude 365, kommenterar:
– Inget bolag köper det andra utan båda bolagen får lika stora delar i det nya bolaget. Vår ledstjärna är att vi blir starkare tillsammans och att vi kan hjälpa våra kunder under hela deras resa.
Målet med sammanslagningen är att kunna hjälpa kunder med både teknik och effektiva arbetssätt.

– Det är då våra kunder får önskad effekt av sin investering i den digitala arbetsplatsen, säger Niklas Olsson Hellström.

Båda bolagen har svenska och internationella kunder från både privat och offentlig sektor. Sammanslagningen resulterar i en organisation på 50+ anställda baserade i Stockholm, Örebro och Göteborg.

För frågor, vänligen kontakta;
Tommy Clarke, Partner, Altitude 365 AB, 0703-593854, tommy.clarke@altitude365.com
Niklas Olsson Hellström, VD, Uclarity AB, 0734-198016, niklas.olsson@uclarity.com

Fortsätt på Altitude 365Kolla in Exobe