Showing all posts tagged: 'Automation'

A 16-post collection

Run SSH with PowerShell

I'm currently working on a somewhat restricted environment where we have to run SSH commands on a Windows Server. The commands are needed to configure certain settings on a Linux machine running [Puppet](" target="_blank) (the orchestration tool). This is the first time I had to use this setup so, as with everything else, I had to work out how to do it - and then blog about it! For the purpose of this post, I provisioned a small Ubuntu VM on Azure in order to be able to SSH into it …[read more]

Automate login for Azure Powershell scripts with Service Principals

Automation is great. It's the bedrock of any successful IT department and the default solution for any task that has to be repeated more than once. I'm a big proponent of automation and, since I spend most of my time in Azure, I try to automate as many tasks as I can. Today, I'll explain how to automate your Azure login in order to allow your scripts to run without any supervision. Disclaimer: many of these tasks should be running using the [Azure Automation service](" target="_blank) because of better integration …[read more]

Copying blob data between storage accounts on Azure. Did you say scale? (part 1)

A couple of weeks ago I [published a post](GHOST_URL/copy-azure-blob-data-between-storage-accounts-using-functions/" target="_blank) for copying data between storage accounts using Azure Functions. The code for the function is quite basic and responds only to upload events. Every time someone uploads blobs to a container monitored by the Function, the blob gets automatically copied across to the destination storage account. That’s great for small workloads. But, what about copying 100k blobs from one storage account to another? And how about making that task super scalable? Challenge accepted! In this post I will explain how to solve this …[read more]

Configure a RunOnce task on Windows

Today was one of these days. Faced with a new problem I've never come across before. I was trying to configure a task to run once and only once on the server was provisioned for the first time. Something like a bootstrap script. In my quest to solve that problem, I came across a thing called Run and RunOnce registry keys! What are Run(Once) registry keys? Who knew that these things even existed, but here we are. So what do these keys really do? Let's grab the definition from the official documentation on [MSDN]( …[read more]

Copy Azure blob data between storage accounts using Functions

Microsoft's Azure Functions are pretty amazing for automating workloads using the power of the Cloud. Unlike their predecessor, WebJobs, Functions are an extremely simple yet powerful tool at your disposal. In addition, unlike WebJobs, they don't share the workload with anything else, so you can push them to the limit. They are also extremely scalable and run concurrently, making them ideal for all your back-end processing. I recently used Azure Functions to copy blob storage data from one subscription to another. If you intend to copy data within the same subscription, then your task is even simpler and you can …[read more]

Options for Migrating Azure VMs from ASM (v1) to ARM (v2)

Today, the Azure portal allows you to create 2 types of VMs. These types refer mainly to the platform atop which your VMs run. Before I continue with this post, it may be handy establishing what the terminology means: Classic/ASM Classic or v1 VMs run on top of the older Azure Service Management (ASM) technology. ASM infrastructures can be managed through both the old and the new portals and Azure PowerShell/CLI. However, some of the v1 features are not yet, and may never be, available on the new Azure Portal. New/ARM Resource Manager or v2 VMs run …[read more]

How can I migrate my Azure VMs to Azure Resource Management (ARM) stack?

That's a perfectly good question and one that many teams are facing lately. There is a valid reason to want to upgrade. The Azure Resource Manager (ARM) has a lot of advantages over it's predecessor. The biggest one is automation. ARM templates allow you to easily capture, configure and deploy resources and resource groups on Azure using PoSH (PowerShell) and simple Json files. This is great for DevOps! If you're starting with Azure now, then ARM makes absolute sense and is the default option. However, there are many companies that are stuck in v1 i.e the Azure Service Management …[read more]

Learn how to harness the power of Azure Virtual Machine Extensions

Do you use Microsoft Azure? Do you have an Azure account? Did you know that you can get one for free here? If you are already an Azure account and you are using the Virtual Machine (VM) services, then I you are at the right place, because in this post I will show you how to take your VMs to the next level with help of VM Extensions. VM Extensions are relatively new to Azure. They were announce at the //Build2014 conference and since then there has been a steady growth. Extensions rely on Puppet and Chef. Puppet is a …[read more]