8 Cloud-based automation

 

This chapter covers

  • Setting up Azure Automation
  • Creating PowerShell runbooks in Azure Automation
  • Executing runbooks from Azure to On-Premises environments

With most companies embracing, at the very least, a hybrid approach to cloud-based computing, a lot of IT professionals have had to quickly adapt to keep up. However, at the same time, it has opened up an entirely new set of tools that you can use to perform your automations.

When you hear the words cloud-based automation, that can refer to two different things. One is the automation of cloud-based assets such as virtual machines or PaaS services. The other, and the one we will be focusing on, is using a cloud-based tool to perform automations. And as you will learn in this chapter, those automations are not limited to just cloud-based resources.

You may remember way back in chapter 2, we created a script to clean up log files by adding them to a ZIP archive. I mentioned that you could use then copy those archives to a cloud-based storage container. You also saw in chapter 3 how you can use tools like Task Scheduler and Jenkins to schedule jobs like this. In this chapter, we will take it a step further and use Azure Automation to copy those archive files from your on-premises server to Azure Blob storage.

8.1 Chapter resources

8.2 Setting up Azure Automation

8.2.1 Azure Automation

8.2.2 Log Analytics

8.2.3 Creating Azure resources

8.2.4 Authentication from automation runbooks

8.2.5 Resource keys

8.3 Creating a hybrid runbook worker

8.3.1 PowerShell modules on hybrid runbook workers

8.4 Creating a PowerShell runbook

8.4.1 Automation assets

8.4.2 Runbook editor

8.4.3 Runbook output

8.4.4 Interactive Cmdlets

8.5 Security considerations

8.6 Summary