Cloud, Code and Automation

Documenting my learning journey.

Deploy an Azure Automation Runbook With PowerShell

The following will walk through the steps to deploy a PowerShell 5.1 and 7.1 runtime, Azure Automation Runbook, using PowerShell. This may be necessary if you are using a deployment script in a pipeline. There are two different methods to this depending on if you are deploying a runtime type of PowerShell 5.1 or PowerShell 7.1. If you want to use the ForEach-Object -Parrallel feature for example, then you will have to use PowerShell 7....

April 2, 2023 · 3 min · Mark kerry

Deploy an ASP.NET Core Web App to an AKS Cluster

In this post I will demonstrate containerising a simple ASP.NET Core web app, pushing it to an Azure Container Registry (ACR), and then running it in a two-node Azure Kubernetes Service (AKS) cluster. It’s not too CLI heavy, and has a lot of manual steps. But it’s a good insight into the end-to-end process of how you can develop and test an app in AKS. The prerequisites you will need installed on your machine:...

November 20, 2022 · 5 min · Mark kerry

Terraform in Azure DevOps Pipelines

The following will walkthrough deploying Azure resources using Terraform in Azure DevOps Pipelines. Although its a detailed guide, there is an expectation that the person following already has a good understanding of Git, Azure and Terraform. It’s setup with the master or main branch created in DevOps and then cloned locally. A new branch is created and then committed to DevOps (Branch policies will restrict committing directly into master/main). A Pull Request is then created and the first pipeline is run which initialites a terraform plan and terraform validate....

August 14, 2022 · 11 min · Mark kerry

Azure Functions University Python Lesson

The following will run through the Python exercise from the Azure Functions University repo and YouTube channel. Azure Functions University is a great resource for learning all about Azure Functions, including all the various triggers, languages, deployment, and Durable Functions. Also it’s worth reviewing the Azure Functions Python developer guide on Microsoft Docs. Create the Azure Function The following applications are a prerequisite to get started: Azure Functions Core Tools - To build, test and deploy the Azure Function Azure CLI - To create the Azure resources Python 3....

July 17, 2022 · 5 min · Mark kerry

CS50P Introduction to Programming with Python Final Project

I recently completed CS50’s Introduction to Programming with Python course. It’s a really enjoyable, challenging course filled with online lectures and hands-on problem sets to solve. I learned a lot from this course and would highly recommend it to anybody wanting to learn Python. If you are fairly new to Python you will complete the course with a great foundation to further your learning of coding with Python. Certificate Course Overview It’s a ten part online course covering the following:...

July 3, 2022 · 4 min · Mark kerry

Terraform Azure Provider

In the following post I will demonstrate getting started with the Terraform Azure Provider. I’ll build the configuration for: Resource Group Virtual Network Subnet Network Security Group (Allow SSH) NSG Association 2 x Linux Virtual Machines 2 x Network Interface Cards 2 x Public IPs These will all be deployed them from Azure Cloud Shell. Remote vs Local State A quick note on the Terraform state file… I have decided to create a remote state file, stored in an Azure Storage Account in order to demonstrate the “backend” configuration....

June 5, 2022 · 6 min · Mark kerry

Terraform VirtualBox Provider

In this post I will demonstrate how to deploy 2x Ubuntu Virtual Machines using the Terraform VirtualBox provider, terra-farm You can install VirtualBox on Ubuntu using this guide. The main.tf file is configured to use a network adapter called vnetbox1, so you need to ensure it is created and set DHCP Server to Enable. Install Terraform Let’s start by installing Terraform. The following is from the official Terraform documentation: Add the Terraform gpg key....

May 1, 2022 · 4 min · Mark kerry

Configure Windows Server 2022 with Ansible

In a Windows Server environment which is not domain joined and where group policies are available to configure hosts, it is important to harden the server infrastructure against security vulnerabilities via other methods. In this post I will demonstrate applying the CIS security policies for Windows Server with Ansible. You can find all the configurations for this post on GitHub - ubuntu-config/ansible-win. Since Ansible cannot be installed on Windows, I am using the same adminbox Ubuntu host which has Ansible installed already from the following posts:...

April 10, 2022 · 3 min · Mark kerry

Ansible Part 1: Setup and Configure on Ubuntu and VirtualBox

This is part one in a three part Ansible series, which will demonstrate how you can get started learning Ansible. The complete list of posts in this series are: Ansible Part 1: Setup and Configure on Ubuntu and VirtualBox (This post) Ansible Part 2: Playbooks Ansible Part 3: Variables, Vault and Roles All code in these posts can be found on GitHub - ubuntu-config/ansible Getting Started I used the adminbox VM connected to the KubeNatNetwork (10....

April 3, 2022 · 4 min · Mark kerry

Ansible Part 2: Playbooks

In this post I’ll be going over Ansible Playbooks. The complete list of posts in this series are: Ansible Part 1: Setup and Configure on Ubuntu and VirtualBox Ansible Part 2: Playbooks (This post) Ansible Part 3: Variables, Vault and Roles All code in these posts can be found on GitHub - ubuntu-config/ansible Playbooks Playbooks allow us to write ordered process and manage configurations in the form of yaml syntax. These can then be used to build out remote systems....

April 3, 2022 · 6 min · Mark kerry