<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Owendavies.net</title><link>https://owendavies.net/</link><description>Recent content on Owendavies.net</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 20 Feb 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://owendavies.net/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to Standardize Dev Environments with DevContainers</title><link>https://owendavies.net/articles/how-to-standardize-dev-environments-with-devcontainers/</link><pubDate>Thu, 20 Feb 2025 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/how-to-standardize-dev-environments-with-devcontainers/</guid><description>&lt;p>Learn how to standardize dev environments using DevContainers in GitHub Codespaces. Improve team workflows, reduce onboarding time, and boost productivity!&lt;/p>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Every developer has faced the &lt;strong>&amp;ldquo;works on my machine&amp;rdquo;&lt;/strong> issue at some point—whether due to &lt;strong>missing dependencies&lt;/strong>, &lt;strong>conflicting versions&lt;/strong>, or &lt;strong>onboarding delays&lt;/strong>. &lt;strong>DevContainers&lt;/strong> solve this problem by providing a &lt;strong>pre-configured, reproducible, and standardized environment&lt;/strong> that works seamlessly with &lt;strong>GitHub Codespaces&lt;/strong> and &lt;strong>VS Code&lt;/strong>.&lt;/p>
&lt;p>In this guide, we’ll explore how you can:&lt;/p></description></item><item><title>How to Create an Azure Virtual Machine with PowerShell</title><link>https://owendavies.net/articles/how-to-create-an-azure-virtual-machine-with-powershell/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/how-to-create-an-azure-virtual-machine-with-powershell/</guid><description>&lt;p>Creating Azure virtual machines through the portal is straightforward, but automation with PowerShell gives you repeatability, consistency, and the ability to integrate VM creation into your broader infrastructure workflows. In this guide, I&amp;rsquo;ll walk you through creating a Windows VM using PowerShell, explaining each step so you can adapt the script for your own needs.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;p>Before starting, ensure you have:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://learn.microsoft.com/en-us/powershell/azure/install-az-ps">Azure PowerShell module installed&lt;/a>&lt;/li>
&lt;li>An active Azure subscription&lt;/li>
&lt;li>Sufficient permissions to create resources in your subscription&lt;/li>
&lt;/ul>
&lt;h2 id="getting-started">Getting Started&lt;/h2>
&lt;p>First, fire up a PowerShell console and login to your subscription:&lt;/p></description></item><item><title>How to Create an Azure NAT Gateway (Portal, CLI &amp; Terraform)</title><link>https://owendavies.net/articles/how-to-create-an-azure-nat-gateway-portal-cli-terraform/</link><pubDate>Mon, 17 Apr 2023 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/how-to-create-an-azure-nat-gateway-portal-cli-terraform/</guid><description>&lt;p>Network Address Translation (NAT) Gateway in Azure is a fully managed service that provides outbound connectivity for virtual networks. It simplifies outbound-only internet connectivity for virtual networks while ensuring high availability and scalability.&lt;/p>
&lt;h2 id="what-is-azure-nat-gateway">What is Azure NAT Gateway?&lt;/h2>
&lt;p>Azure NAT Gateway is a fully managed Network Address Translation (NAT) service that allows virtual machines and other resources within a virtual network to connect to the internet without requiring public IP addresses directly assigned to them. NAT Gateway manages outbound connections by translating the private IP addresses of resources in a virtual network to the public IP address(es) of the NAT Gateway itself.&lt;/p></description></item><item><title>Create an Azure Virtual Machine with the Azure CLI</title><link>https://owendavies.net/articles/create-an-azure-virtual-machine-with-the-azure-cli/</link><pubDate>Mon, 10 Apr 2023 12:38:55 +0000</pubDate><guid>https://owendavies.net/articles/create-an-azure-virtual-machine-with-the-azure-cli/</guid><description>&lt;p>To round off things nicely, I thought I would follow on from two previous posts about creating Azure Virtual Machines. First we went through how to create an Azure Virtual Machine using PowerShell, then we went through with ARM templates. Now we&amp;rsquo;re going to use the Azure CLI for the third try.&lt;/p>
&lt;p>&lt;a href="https://owendavies.net/articles/how-to-create-an-azure-virtual-machine-with-powershell/">Create an Azure Virtual Machine with PowerShell&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://owendavies.net/articles/how-to-create-an-azure-virtual-machine-with-ARM-template/">Create an Azure Virtual Machine with an ARM template&lt;/a>&lt;/p>
&lt;p>&lt;a href="https://owendavies.net/articles/how-to-create-an-azure-virtual-machine-with-terraform/">Create an Azure Virtual Machine with Terraform&lt;/a>&lt;/p></description></item><item><title>Create an Azure VM with Bicep: A Step-by-Step Guide</title><link>https://owendavies.net/articles/create-an-azure-vm-with-bicep-a-step-by-step-guide/</link><pubDate>Wed, 01 Feb 2023 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/create-an-azure-vm-with-bicep-a-step-by-step-guide/</guid><description>&lt;h2 id="introduction">&lt;strong>Introduction&lt;/strong>&lt;/h2>
&lt;p>In this guide, we’ll walk through deploying an &lt;strong>Azure Virtual Machine (VM) using Bicep&lt;/strong>, Microsoft’s domain-specific language (DSL) for Azure Resource Manager (ARM) templates.&lt;/p>
&lt;p>Bicep provides &lt;strong>a more readable and concise syntax&lt;/strong> compared to raw ARM JSON templates while retaining the same functionality. If you’re working with &lt;strong>Infrastructure as Code (IaC) in Azure&lt;/strong>, Bicep is the &lt;strong>recommended&lt;/strong> alternative to ARM.&lt;/p>
&lt;p>We’ll cover &lt;strong>how to create a fully functional Azure VM&lt;/strong>, including:&lt;br>
✔ &lt;strong>Resource Group creation&lt;/strong>&lt;br>
✔ &lt;strong>Virtual Network (VNet) and Subnet setup&lt;/strong>&lt;br>
✔ &lt;strong>Network Security Group (NSG) for security&lt;/strong>&lt;br>
✔ &lt;strong>Public and Private IP configuration&lt;/strong>&lt;br>
✔ &lt;strong>Network Interface (NIC) association&lt;/strong>&lt;br>
✔ &lt;strong>Deploying a Windows Server VM&lt;/strong>&lt;/p></description></item><item><title>Migrate Terraform State with AzCopy in Azure Containers</title><link>https://owendavies.net/articles/migrate-terraform-state-with-azcopy-in-azure-containers/</link><pubDate>Thu, 05 Jan 2023 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/migrate-terraform-state-with-azcopy-in-azure-containers/</guid><description>&lt;p>Migrating Terraform State between Azure Containers with AzCopy&lt;/p>
&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>Have you ever needed to migrate your &lt;strong>Terraform state files&lt;/strong> from one Azure storage container to another? Perhaps you&amp;rsquo;re consolidating storage accounts, upgrading to a more secure configuration, or simply reorganizing your infrastructure. Moving Terraform state safely is critical to avoid disrupting your infrastructure management.&lt;/p>
&lt;p>In this comprehensive guide, I&amp;rsquo;ll walk you through the exact process of reliably transferring &lt;strong>Terraform state files between Azure Blob Storage containers&lt;/strong> using Microsoft&amp;rsquo;s AzCopy tool and PowerShell. Follow these steps to ensure your state migration goes smoothly without risking your infrastructure integrity.&lt;/p></description></item><item><title>Specify a Different SSH Key per Git Repository</title><link>https://owendavies.net/articles/specify-a-different-ssh-key-per-git-repository/</link><pubDate>Tue, 15 Feb 2022 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/specify-a-different-ssh-key-per-git-repository/</guid><description>&lt;p>If you have more than one GitHub account, you&amp;rsquo;ll want different repositories to authenticate with different SSH keys — even though they&amp;rsquo;re all on the same host (&lt;code>github.com&lt;/code>). You can do that with a &lt;code>Host&lt;/code> alias in your SSH config.&lt;/p></description></item><item><title>Nant error: [exec] svn: Error resolving case of '>'</title><link>https://owendavies.net/articles/nant-error-exec-svn-error-resolving-case-of/</link><pubDate>Tue, 01 Feb 2022 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/nant-error-exec-svn-error-resolving-case-of/</guid><description>&lt;p>Receiving this following error when doing an exec statement in nant, had me scratching my head for a while and took an age to track down.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">[exec] svn: Error resolving case of &amp;#39;&amp;gt;&amp;#39;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Resolved it by using the &lt;strong>output&lt;/strong> parameter within the exec element, you can’t use the &amp;gt; character for output from within Nant annoyingly.&lt;/p>
&lt;p>So changed this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&amp;lt;exec basedir=&amp;#34;.&amp;#34; program=&amp;#34;c:myprogram.exe&amp;#34; commandline=&amp;#34; -L -x &amp;gt; c:xmloutput.xml&amp;#34; /&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>To this:&lt;/p></description></item><item><title>Resize Tmux and Vim Panes with Keyboard Shortcuts</title><link>https://owendavies.net/articles/resize-tmux-and-vim-panes-with-keyboard-shortcuts/</link><pubDate>Mon, 24 Jan 2022 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/resize-tmux-and-vim-panes-with-keyboard-shortcuts/</guid><description>&lt;p>Resizing split panes in Tmux and Vim with the default key bindings is slow and fiddly. Here are the defaults, and the custom shortcuts I add to make it quick.&lt;/p></description></item><item><title>How to Change the GPG Key for pass (Password Store)</title><link>https://owendavies.net/articles/how-to-change-the-gpg-key-for-pass-password-store/</link><pubDate>Thu, 07 Oct 2021 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/how-to-change-the-gpg-key-for-pass-password-store/</guid><description>&lt;p>How to change the GPG key used by &lt;a href="https://www.passwordstore.org/">&lt;code>pass&lt;/code>&lt;/a>. This re-encrypts your whole password store to the new GPG key.&lt;/p></description></item><item><title>Change tmux command prefix</title><link>https://owendavies.net/articles/change-tmux-command-prefix/</link><pubDate>Mon, 01 Feb 2021 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/change-tmux-command-prefix/</guid><description>&lt;p>The default tmux command prefix is &lt;em>Ctrl-b&lt;/em>, which is fairly awkward. I NEVER use my right Ctrl key (maybe I should?), so Ctrl-b is quite a big movement for the fingers on my left hand. To truely live the keyboard/terminal/vim/tmux life you want to minimise the times your fingers have to move from the home row.&lt;/p></description></item><item><title>Storing DevOps documentation in git</title><link>https://owendavies.net/articles/storing-devops-documentation-in-git/</link><pubDate>Mon, 23 Nov 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/storing-devops-documentation-in-git/</guid><description>&lt;p>Often in a large enterprise you will need to submit changes to a CAB (Change Advisory Board) before getting approval to make any changes to your infrastructure. But managing versions of your diagrams and documents / infrastructure code / what has actually been deployed can be difficult.&lt;/p>
&lt;p>Documentation is often stored in a seperate document store (like Sharepoint).&lt;/p>
&lt;p>I&amp;rsquo;m using Azure DevOps to manage work items here, but you can insert your own (Jira, Github Issues).&lt;/p></description></item><item><title>How to install Jupyter Notebook on Ubuntu Linux</title><link>https://owendavies.net/articles/how-to-install-jupyter-notebook-on-ubuntu-linux/</link><pubDate>Mon, 07 Sep 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/how-to-install-jupyter-notebook-on-ubuntu-linux/</guid><description>&lt;h2 id="our-plan-today">Our plan today&lt;/h2>
&lt;p>We&amp;rsquo;re going to go through the steps to get Jupyter Notebook installed and running from scratch Ubuntu or Debian.&lt;/p>
&lt;h3 id="what-well-cover">What we&amp;rsquo;ll cover&lt;/h3>
&lt;ol>
&lt;li>Install Python&lt;/li>
&lt;li>Create Python Virtual Environment&lt;/li>
&lt;li>Install Jupyter&lt;/li>
&lt;li>Run Jupyter Notebook&lt;/li>
&lt;li>Create Jupyter in application menu in XFCE&lt;/li>
&lt;/ol>
&lt;p>I&amp;rsquo;m using Ubuntu 20.04, but this will be the same steps for Ubuntu 21.10, 20.04, 18.04 and 16.04. Also should work entirely for recent versions of Debian too.&lt;/p></description></item><item><title>Install a desktop environment GUI on Ubuntu Server in Azure</title><link>https://owendavies.net/articles/install-a-desktop-environment-gui-on-ubuntu-server-in-azure/</link><pubDate>Mon, 27 Jul 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/install-a-desktop-environment-gui-on-ubuntu-server-in-azure/</guid><description>&lt;p>All the Linux server Virtual Machine images on Azure don&amp;rsquo;t come with a desktop environment, which is obviously usually the right thing to do with a server. There&amp;rsquo;s usually no need for a desktop environment as all operations can be done from the CLI via ssh. However, maybe you need a desktop environment for another reason. For example, setting up Azure Lab Services for class rooms, maybe those Virtual Machines need a desktop enviroment for lessons in your lab.&lt;/p></description></item><item><title>Disable Entity Framework Core Migrations</title><link>https://owendavies.net/articles/disable-entity-framework-core-migrations/</link><pubDate>Tue, 19 May 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/disable-entity-framework-core-migrations/</guid><description>&lt;p>I have a project that I started development with Code First Migrations. Which is great for development and getting things up and running quickly. But I don&amp;rsquo;t like it as a solution for deploying to production etc. I&amp;rsquo;ve done it in the past, and it&amp;rsquo;s not a terrible solution. But not my preferences anymore.&lt;/p></description></item><item><title>Super lightweight bookmarks manager - dmenu bookmarks with bm</title><link>https://owendavies.net/articles/super-lightweight-bookmarks-manager-dmenu-bookmarks-with-bm/</link><pubDate>Tue, 12 May 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/super-lightweight-bookmarks-manager-dmenu-bookmarks-with-bm/</guid><description>&lt;p>Storing my internet bookmarks to disk in a non-proprietry way and making them easily accessible was my main goal in the research for this blog post.&lt;/p></description></item><item><title>Create, attach and mount a managed disk to an Azure Linux Virtual Machine</title><link>https://owendavies.net/articles/create-attach-and-mount-a-managed-disk-to-an-azure-linux-virtual-machine/</link><pubDate>Mon, 23 Mar 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/create-attach-and-mount-a-managed-disk-to-an-azure-linux-virtual-machine/</guid><description>&lt;p>We&amp;rsquo;re going to add a new data disk to an existing Azure Linux Virtual Machine and then mount it. We will be using CentOS 7.7 and will go through creating the Virtual Machine without the data disk, modify the ARM template to add the data disk. Then we will SSH into the VM and mount the new disk.&lt;/p></description></item><item><title>Chocolatey - Package Management for Windows</title><link>https://owendavies.net/articles/chocolatey-package-management-for-windows/</link><pubDate>Mon, 16 Mar 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/chocolatey-package-management-for-windows/</guid><description>&lt;p>Between 6 months to a year, I start to feel that my Windows installation is running sluggish. Is there some malware running somewhere? Is Windows just getting slow? Either way, I like a fresh installation.&lt;/p>
&lt;p>Chocolatey to the rescue of clicking next a thousand times.&lt;/p></description></item><item><title>Fixing ARM Template Deployment Validation Errors</title><link>https://owendavies.net/articles/fixing-arm-template-deployment-validation-errors/</link><pubDate>Tue, 03 Mar 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/fixing-arm-template-deployment-validation-errors/</guid><description>&lt;p>Today I was trying to deploy an ARM template with &lt;strong>Test-AzureRmResourceGroupDeployment&lt;/strong> and &lt;strong>New-AzureRmResourceGroupDeployment&lt;/strong> and received the following error:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-PowerShell" data-lang="PowerShell">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">The&lt;/span> &lt;span class="n">template&lt;/span> &lt;span class="n">deployment&lt;/span> &lt;span class="n">GUID&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">not&lt;/span> &lt;span class="n">valid&lt;/span> &lt;span class="n">according&lt;/span> &lt;span class="n">to&lt;/span> &lt;span class="n">the&lt;/span> &lt;span class="n">validation&lt;/span> &lt;span class="n">procedure&lt;/span>&lt;span class="p">.&lt;/span> &lt;span class="n">The&lt;/span> &lt;span class="n">tracking&lt;/span> &lt;span class="n">id&lt;/span> &lt;span class="n">is&lt;/span> &lt;span class="n">GUID&lt;/span>&lt;span class="p">.&lt;/span> &lt;span class="n">See&lt;/span> &lt;span class="n">inner&lt;/span> &lt;span class="n">errors&lt;/span> &lt;span class="k">for&lt;/span> &lt;span class="n">details&lt;/span>&lt;span class="p">.&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Getting the error details&lt;/p></description></item><item><title>Create an Azure VM with Terraform: A Step-by-Step Guide</title><link>https://owendavies.net/articles/create-an-azure-vm-with-terraform-a-step-by-step-guide/</link><pubDate>Mon, 24 Feb 2020 00:00:00 +0000</pubDate><guid>https://owendavies.net/articles/create-an-azure-vm-with-terraform-a-step-by-step-guide/</guid><description>&lt;h2 id="introduction">&lt;strong>Introduction&lt;/strong>&lt;/h2>
&lt;p>Infrastructure as Code (IaC) is essential for managing cloud infrastructure efficiently. &lt;strong>Terraform&lt;/strong>, an open-source IaC tool, allows you to define, deploy, and manage Azure resources in a repeatable and automated way.&lt;/p>
&lt;p>In this guide, we’ll walk through &lt;strong>deploying an Azure Virtual Machine (VM) using Terraform&lt;/strong>, covering:&lt;/p>
&lt;p>✔ &lt;strong>Defining a resource group&lt;/strong>&lt;br>
✔ &lt;strong>Creating a virtual network and subnet&lt;/strong>&lt;br>
✔ &lt;strong>Configuring a public IP and network interface&lt;/strong>&lt;br>
✔ &lt;strong>Deploying a Windows Virtual Machine&lt;/strong>&lt;br>
✔ &lt;strong>Running Terraform commands to provision infrastructure&lt;/strong>&lt;/p></description></item></channel></rss>