Exploring AI, Kubernetes, and Multicloud Cost Management: My Latest Pluralsight Articles

As cloud-native infrastructure, Kubernetes, AI, and multicloud strategies continue to evolve, I recently had the opportunity to publish several new articles on the Pluralsight Blog focused on some of the biggest operational and architectural trends happening right now.

These articles explore the growing role of AI in Kubernetes operations, the realities of multicloud cost management, and the rise of agentic tooling for cloud platforms.

New Blog Posts on Pluralsight.com

Agentic CLI for AKS: FAQs and how to use it

In this article, I break down Microsoftโ€™s emerging Agentic CLI for AKS experience and explain what it actually is, how it works, and where it fits into Kubernetes operations. The post explores how the tool uses AI to assist with troubleshooting and diagnostics for Azure Kubernetes Service environments while still keeping humans in control of operational decisions.

You can read it here:

Agentic CLI for AKS: FAQs and how to use it

Best multicloud cost management tools and methods

Multicloud environments can create massive flexibility, but they also create significant operational and financial complexity. In this article, I explore practical multicloud cost management strategies, tooling approaches, and methods organizations can use to improve visibility and optimize spend across AWS, Azure, and GCP.

Read the article here:

Best multicloud cost management tools and methods

Understanding AI agents for Kubernetes

AI agents are quickly becoming one of the most interesting emerging areas in cloud-native operations. This article explores what AI agents for Kubernetes actually are, the problems they aim to solve, and some of the current tools and approaches appearing in the ecosystem. I also discuss where these systems may realistically help platform teams and where caution is still needed.

Check it out here:

Understanding AI agents for Kubernetes: Tools, use cases, and more

These topics sit at the intersection of AI, cloud engineering, Kubernetes operations, platform engineering, and FinOps, and they represent some of the biggest conversations happening across the industry right now. If youโ€™re working in cloud-native infrastructure, platform engineering, DevOps, or AI-enabled operations, I hope these articles provide useful insight and practical perspective.

Be sure to follow my profile on Pluralsight so you will be notified as I release new courses!ย 

Here is the link to my Pluralsight profile to follow me:

https://www.pluralsight.com/authors/steve-buchanan

Read more

Course 31 “Applying Terraform in Google Cloud Environments” Published!

Ready to Level Up Your GCP Skills? My New Terraform Course Is Live. Iโ€™m excited to share that my latest Pluralsight course, Google Cloud Environments: Applying Terraform, is now live!

Infrastructure as Code (IaC) has become a foundational skill for modern cloud engineering teams, and Terraform continues to be one of the most widely adopted tools for managing cloud infrastructure consistently and at scale. In this course, I focus on how to apply Terraform effectively within Google Cloud environments to help engineers move beyond basic concepts and into practical, real-world implementation patterns.

Whether you’re a cloud engineer, DevOps engineer, platform engineer, or someone expanding into Google Cloud, this course is designed to help you build confidence working with Terraform in GCP environments.

What Youโ€™ll Learn

In this course, we walk through how Terraform can be used to deploy and manage infrastructure in Google Cloud using Infrastructure as Code principles. Topics include:

  • Understanding Terraform workflows in Google Cloud
  • Configuring providers and authentication
  • Managing infrastructure declaratively
  • Working with state management
  • Deploying and updating cloud resources
  • Using reusable Terraform configurations and modules
  • Applying Terraform concepts to real Google Cloud scenarios

The course is designed to help bridge the gap between learning Terraform syntax and actually applying it in cloud engineering environments.

Why Terraform Matters

Terraform enables teams to define infrastructure in code, making deployments more repeatable, scalable, and reliable. Instead of manually configuring cloud resources through portals and scripts, teams can standardize infrastructure deployments and treat infrastructure similarly to application code.

As organizations continue adopting cloud-native and multi-cloud strategies, Infrastructure as Code skills are becoming increasingly valuable across engineering and operations teams.

Hands-On Cloud Engineering Skills

One thing I always try to emphasize in technical training is practical application. The goal is not just to understand Terraform conceptually, but to understand how engineers actually use it in day-to-day cloud operations and platform engineering work.

Google Cloud and Terraform together create a powerful combination for:

  • Automated infrastructure deployments
  • Consistent environment management
  • Scalable cloud operations
  • DevOps and platform engineering workflows
  • Repeatable infrastructure provisioning

Pluralsight also provides broader Terraform and cloud engineering learning paths that complement these skills with additional hands-on labs and cloud-focused training.

Who This Course Is For

This course is a great fit for:

  • Cloud engineers
  • DevOps engineers
  • Platform engineers
  • SREs
  • IT professionals transitioning into cloud engineering
  • Anyone looking to strengthen their Terraform and Google Cloud skills

If you already have some familiarity with cloud concepts and want to deepen your Infrastructure as Code knowledge in GCP, this course should provide a solid next step.

Check It Out

You can view the course here: Google Cloud Environments: Applying Terraform on Pluralsight

I hope this course serves as a valuable resource in your IaC journey. Thank you for your continued support, andย Be sure to follow my profile on Pluralsight so you will be notified as I release new courses!ย 

Here is the link to my Pluralsight profile to follow me:

https://www.pluralsight.com/authors/steve-buchanan

Read more

Bridging the Clouds: Back on RunAs Radio

Itโ€™s hard to believe, but itโ€™s been a couple of years since I last sat down with Richard Campbell on RunAs Radio. Technology moves fast, but the cloud landscape has matured in ways that were only just beginning during my last visit.

I recently joined Richard for my third appearance on the show (Episode #1025) to talk about a challenge that is becoming the “new normal” for major SaaS providers: Expanding a Cloud-Native stack across multiple clouds.

From Single-Cloud Roots to Multi-Cloud Reality

At Jamf, weโ€™ve built a powerful reputation for managing Apple devices at scale. Historically, our SaaS product was rooted in AWS. However, as our customer base grows, now serving over 70k+ customers worldwide the demand for flexibility grows with it.

In this episode, we discuss the journey of bringing those SaaS workloads to Azure and AKS. It isnโ€™t just about “moving” code; itโ€™s about architecting for consistency without losing the unique benefits of each cloud provider.

Kubernetes: The Common Ground (But Not the Whole Story)

One of the key takeaways from our chat is that while Kubernetes (AKS, EKS, GKE) provides the common operating system for the modern cloud, it isn’t a “magic wand” for multi-cloud.

To achieve true consistency, you have to look past the orchestrator and focus on the surrounding ecosystem. We dove into the complexities of:

  • IaC & Deployment: Why tools like OpenTofu are becoming essential for maintaining cloud-agnostic deployments.
  • Observability: Using Prometheus and Grafana to ensure that your SRE teams see the same data regardless of whether the backend is Azure or AWS.
  • Identity: Navigating the friction between different identity providers to ensure a seamless experience for the end user and how platforms like Okta support this.

The Docker & AI Connection

We couldn’t have a conversation in 2026 without touching on the elephant in the room: AI. As a Microsoft MVP focused on AKS and a Docker Captain, Iโ€™ve been watching closely how the Kubernetes and container ecosystem is evolving to support AI/ML workloads. Richard and I spent some time discussing how Docker, Inc. is positioning itself in this space and how developers can leverage these tools to build AI-ready applications without getting locked into a single vendor’s proprietary stack.

Reflections on a Maturing Landscape

Coming back to RunAs Radio for a third time allowed me to reflect on just how much our industry has shifted. Weโ€™ve moved past the “is the cloud safe?” phase and into the “how do we optimize for a multi-cloud world?” phase.

Whether you are a platform engineer, a developer, or a technical leader, the lessons Iโ€™ve learned at Accenture, Microsoft, helping startups, and now at Jamf while scaling across multple clouds are applicable to almost any modern enterprise.

You can listen to the full episode here: RunAs Radio #1025: SaaS on Multiple Clouds with Steve Buchanan

Iโ€™d love to hear your thoughts. Is your organization looking at multi-cloud for SaaS, or are you doubling down on a single provider?

Read more

Azure Hub-and-Spoke Architecture Explained and Automated with OpenTofu

This is my first blog of the new year (2026)! Since being re-awarded as a Microsoft MVP, Microsoft provided me with a fresh set of Azure credits. One of the first things I wanted to do was rebuild my Azure lab environment. This time, I wanted to do it the right way. I wanted it to mirror how I would design and deploy a real enterprise environment, including running fully on private endpoints and following a proper hub-and-spoke network model.

Just as importantly, I wanted everything defined in Infrastructure as Code (IaC) so I could spin environments up and down whenever I needed. That also aligns perfectly with what my team at Jamf is working on right now. We are making some changes to our underlying Azure architecture, including deeper network isolation, security controls, intergration with Jamf security cloud security products, and a shift from Bicep to OpenTofu. We will also be using AI agents to do a lot of the heavy lifting in that refactor. I will be sharing more about that in future blogs and talks as much as I am able to publicly.

Because OpenTofu is at the center of that work, I decided to build my entire Azure lab using OpenTofu and a full hub-and-spoke architecture. This gives my team a real, working reference base implementation that we can build on for production designs. I also want to share this with the larger tech community.

If you are note familiar with OpenTofu it is an open source infrastructure-as-code engine based on Terraform that lets you define, deploy, and manage cloud infrastructure using declarative configuration files, and you can learn more at https://opentofu.org.

You can access the GitHub Repository of my “OpenTofu Azure Hub and Spoke” solution here: https://github.com/Buchatech/OpenTofu-Azure-HubSpoke-public

Lets break down whats in the solution I built.


Solution Architecture

The solution deploys a production-style Azure network and platform foundation that includes:

  • Hub VNet with Azure Firewall, VPN Gateway, and DNS Private Resolver
  • Spoke VNet with peering and default routes through the firewall
  • Key Vault and Azure Container Registry using private endpoints
  • Optional Jumpbox VM for secure management access
  • GitHub Actions CI/CD pipeline using OIDC authentication

How the Automation Works

This is a multi-part solution built around a bootstrap Bash script (bootstrap.sh) and a fully generated OpenTofu repository.

The bootstrap script creates everything you need to get started:

  1. It creates an Azure Storage Account to store your OpenTofu remote state.
  2. It generates a complete OpenTofu project, including modules, variables, and environment structure.
  3. It configures the backend so OpenTofu uses Azure Storage for state.
  4. It creates a ready-to-use GitHub Actions pipeline for CI/CD.

Once the repository is generated, you can deploy your Azure environment by running OpenTofu locally or by pushing the repo to GitHub and letting the pipeline handle deployments for you. Within minutes, you can have a fully functional Azure hub-and-spoke environment up and running, and you can customize the generated modules to fit your own requirements.


Deployment Modes

The bootstrap bash script supports two deployment modes depending on how advanced and locked-down you want the environment to be.

FULL Mode (Default)
This is the enterprise-grade option.

  • Hub VNet with Azure Firewall, VPN Gateway, and DNS Private Resolver
  • Spoke VNet with peering and default route through the firewall
  • Private endpoints for Key Vault and Azure Container Registry
  • Optional Jumpbox VM for secure management
  • GitHub Actions CI/CD pipeline with OIDC authentication

BASIC Mode
This is a simpler version for learning or labs.

  • Hub VNet with Azure Firewall only
  • Spoke VNet with peering and default route through the firewall
  • Public access for Key Vault and Azure Container Registry
  • No Jumpbox, VPN Gateway, or DNS Private Resolver
  • GitHub Actions CI/CD pipeline with OIDC authentication

What the bootstrap.sh Script Does

When you run the bootstrap script, it will:

  1. Prompt you to select FULL or BASIC deployment mode
  2. Create an Azure Storage Account for OpenTofu remote state in rg-tfstate
  3. Generate the full OpenTofu repository structure based on your choice
  4. Configure the OpenTofu backend to use the storage account
  5. Create GitHub Actions workflow files for CI/CD
  6. Output the storage account details and the GitHub secrets you need to configure

From there, you are ready to deploy and customize the script and OpenTofu based on your Azure hub-and-spoke environment entirely through code.

Here is the Readme from the repo. It goes even more in depth into my “OpenTofu Azure Hub and Spoke” solution. I hope you find it useful!

********************************************************************************

Azure Hub-Spoke with OpenTofu

Azure base network architecture solution

This repository contains a production-ready, modular OpenTofu configuration that deploys Azure hub-spoke network topology with two deployment modes (private or public) to match your requirements and budget.


Architecture Overview

This solution deploys a hub-and-spoke network architecture (visual shows full-private deployment):

Enterprise-grade Azure network architecture lab environment with Site-to-Site VPN, Azure Firewall, DNS Private Resolver, and core services

This repository contains a production-ready, modular OpenTofu (Terraform) configuration that deploys a complete Azure hub-spoke network topology designed for hybrid cloud scenarios, connecting your on-premises network (e.g., UniFi network) to Azure.

Architecture Overview

This lab deploys a hub-and-spoke network architecture following Azure best practices (visual shows full private deployment):

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                            AZURE CLOUD                                โ”‚
โ”‚                                                                        โ”‚
โ”‚  โ”Œโ”€โ”€โ”€ HUB VNet (rg-lab-hub-network) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚ 10.10.0.0/16                                              โ”‚        โ”‚
โ”‚  โ”‚                                                            โ”‚        โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚        โ”‚
โ”‚  โ”‚  โ”‚  Azure   โ”‚  โ”‚    VPN    โ”‚  โ”‚    DNS     โ”‚  โ”‚Jumpboxโ”‚ โ”‚        โ”‚
โ”‚  โ”‚  โ”‚ Firewall โ”‚  โ”‚  Gateway  โ”‚  โ”‚  Private   โ”‚  โ”‚  VM   โ”‚ โ”‚        โ”‚
โ”‚  โ”‚  โ”‚(10.10.1.0โ”‚  โ”‚(10.10.2.0)โ”‚  โ”‚  Resolver  โ”‚  โ”‚(Mgmt) โ”‚ โ”‚        โ”‚
โ”‚  โ”‚  โ”‚)+ DNAT   โ”‚  โ”‚           โ”‚  โ”‚(10.10.4-5.0โ”‚  โ”‚subnet โ”‚ โ”‚        โ”‚
โ”‚  โ”‚  โ”‚SSH:2222  โ”‚  โ”‚           โ”‚  โ”‚)           โ”‚  โ”‚       โ”‚ โ”‚        โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚        โ”‚
โ”‚  โ”‚        โ”‚             โ”‚                                     โ”‚        โ”‚
โ”‚  โ”‚        โ”‚             โ”‚  Site-to-Site VPN                  โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚           โ”‚             โ”‚                                               โ”‚
โ”‚           โ”‚  VNet Peering + Gateway Transit                            โ”‚
โ”‚           โ”‚             โ”‚                                               โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€ SPOKE VNet (rg-lab-spoke1-network) โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚
โ”‚  โ”‚ 10.20.0.0/16                                        โ”‚               โ”‚
โ”‚  โ”‚                                                      โ”‚               โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚               โ”‚
โ”‚  โ”‚  โ”‚   Apps   โ”‚  โ”‚   APIs   โ”‚  โ”‚   Data/Services  โ”‚ โ”‚               โ”‚
โ”‚  โ”‚  โ”‚ Subnet   โ”‚  โ”‚ Subnet   โ”‚  โ”‚     Subnet       โ”‚ โ”‚               โ”‚
โ”‚  โ”‚  โ”‚          โ”‚  โ”‚          โ”‚  โ”‚  - ACR (Private) โ”‚ โ”‚               โ”‚
โ”‚  โ”‚  โ”‚          โ”‚  โ”‚          โ”‚  โ”‚  - Key Vault     โ”‚ โ”‚               โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚               โ”‚
โ”‚  โ”‚                                                      โ”‚               โ”‚
โ”‚  โ”‚  Traffic routed through Azure Firewall โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€               โ”‚
โ”‚                                                                         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€ Management RG (rg-lab-management) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                 โ”‚
โ”‚  โ”‚  - Azure Container Registry (ACR)                 โ”‚                 โ”‚
โ”‚  โ”‚  - Azure Key Vault                                 โ”‚                 โ”‚
โ”‚  โ”‚  - Private Endpoints in Spoke Data subnet         โ”‚                 โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚
โ”‚                                                                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                              โ”‚
                      S2S VPN Tunnel (IPsec)
                              โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   ON-PREMISES NETWORK        โ”‚
              โ”‚   (e.g., UniFi Router)       โ”‚
              โ”‚   192.168.1.0/24             โ”‚
              โ”‚                              โ”‚
              โ”‚   SSH โ†’ Azure Firewall:2222  โ”‚
              โ”‚   โ†’ DNAT โ†’ Jumpbox:22        โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Read more

24th and 25th Pluralsight Courses Published

I have been so busy in 2024 that I didnt have a chance to post about my 24th and 25th Pluralsight courses. So I am a little late posting this but I am excited that my 24th course “JavaScript Performance Playbook” and my 25th course “Create Google Cloud Deployment Manager Templates Using Generative AI” have both published on the Pluralsight platform!

You can find both courses here:

JavaScript Performance Playbook

This course will teach you how to optimize your JavaScript app, or API overall, so that they will be lightning-fast and perform well.

https://app.pluralsight.com/library/courses/javascript-performance-playbook

&

Create Google Cloud Deployment Manager Templates Using Generative AI

This course will teach you how artificial intelligence (AI) can help you administer and deploy cloud resources faster and more accurately than ever before.

https://app.pluralsight.com/library/courses/create-google-cloud-deployment-manager-templates-generative-ai

I hope you find value in these new courses.ย Be sure to follow my profile on Pluralsight so you will be notified as I release new courses!ย 

Here is the link to my Pluralsight profile to follow me:

https://www.pluralsight.com/authors/steve-buchanan

Read more

Presenting on AKS at Tech Summit Nigeria 2022

I will be speaking at Tech Summit Nigeria 2022. This event is to be held in Lagos, Nigeria at the Microsoft ADC center. It is an event for Cloud & Mixed- Reality professionals & enthusiasts. The website for the is https://www.techsummitnigeria.com.

My session title is: “K8s is complex! Simplify its Deployment & Configuration“.

The abstract is: Understanding Kubernetes is complex. Designing its architecture is complex. Deploying it is complex. And Configuring it is complex. K8s in general are complex. Spend less time on getting your Kubernetes up and running and more time running your containerized apps!

In this session, Steve Buchanan will take you on a journey utilizing a tool named the AKS Construction Helper that can simplify your AKS Deployment & Configurations.

***Update***

It was a fun session with an engaged audience! Here are some pictures from the session.

If you missed my session you can watch the replay here:

Read more

Featured on RunAsRadio Podcast – Terraform vs Bicep/ARM

Recently I was a guest on another podcast! This one is RunAsRadio.com.

Had a great time chatting with Richard Campbell about Infrastructure As Code and comparing Terraform with Azure ARM Templates & the new Bicep language. Check it out here:

http://runasradio.com/Shows/Show/740

Read more

Setup CI/CD pipeline with VSTS & Azure Stack

We all know that DevOps brings together people, processes, and technology. In the Microsoft DevOps world A large part of the technology piece is utilizing Visual Studio Team Services (VSTS) for continuous deployment of workloads to Azure.

Microsoft launched their Hybrid Cloud on July 10th 2017. Azure Stack is the secret sauce of Microsoft’s the Hybrid Cloud. Microsoft’s offering is the only one true Hybrid Cloud in the market bringing Azure to on-premises data centers.

As Microsoft continues to move their Hybrid Cloud forward the DevOps integration and capabilities we have for Azure extend to Azure Stack. Again I was fortunate to participate in a preview of the VSTS integration with Azure Stack. I was happy to see Microsoft putting a priority on this functionality because DevOps on Azure Stack is a HUGE need. Cloud is often the catalyst to helping organizations adopt a DevOps culture fostering digital transformation. Some organizations not being able to put all workloads in public cloud Azure Stack is a good way for them to get the same cloud capabilities on-premises DevOps integration being one of them. The setup and integration between VSTS and Azure Stack is working nicely. The team at Microsoft has given me permission to share about this topic via my blog.

In this blog post I am going to cover setting up VSTS to work with Azure and setting up a continuous-integration and-continuous deployment (CI/CD) pipeline to Azure Stack. With Microsoft DevOps you can utilize the pieces of VSTS that make sense for you to use leaving the control up to you. Through VSTS you can use many other DevOps tools such as Jenkins, Octopus deploy, GitHub, Bitbucket etc into your pipeline making Azure Stack just as flexible as Azure is. Let’s Jump in!

Steps to prep Azure Stack for Visual Studio Team Services (VSTS)

#1 Ensure you have installed the Azure Stack PowerShell and Azure PowerShell modules.

Details can be found here:

https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-powershell-install

#2 Add the Azure Stack environment using the following syntax

# Navigate to the downloaded folder and import the **Connect** PowerShell module

Set-ExecutionPolicy RemoteSigned

Import-Module PATH\AzureStack.Connect.psm1

# Register an AzureRM environment that targets your Azure Stack instance

Add-AzureRMEnvironment `

-Name “AzureStackAdmin” `

-ArmEndpoint “https://adminmanagement.local.azurestack.external

# Set the GraphEndpointResourceId value

Set-AzureRmEnvironment `

-Name “AzureStackAdmin” `

-GraphAudience “https://graph.windows.net/

# Get the Active Directory tenantId that is used to deploy Azure Stack

$TenantID = Get-AzsDirectoryTenantId `

-AADTenantName “YOURDOMAIN.onmicrosoft.com” `

-EnvironmentName “AzureStackAdmin”

# Sign in to your environment

Login-AzureRmAccount `

-EnvironmentName “AzureStackAdmin” `

-TenantId $TenantID

NOTE: You will need the environment name and the tenant ID for the next script.

#3 Create SPN

Original SPN creation script can be found here:

https://github.com/Microsoft/vsts-rm-documentation/blob/master/Azure/SPNCreation.ps1

Documentation on creating an SPN can be found here:

https://www.visualstudio.com/en-us/docs/build/concepts/library/service-endpoints#sep-azure-rm

Below I will display the script I used. Note that you will need the following parameters for the script:

$subscriptionName

“Enter Azure Stack Subscription name. You need to be Subscription Admin to execute the script”)]

$password

“Provide a password for SPN application that you would create”

$environmentName

“Provide Azure Stack environment name for your subscription”

$AzureStackTenantID

“Provide tenant ID from when Azure Stack enviroment was added”

EXAMPLE:

.\CreateSPN.ps1 -subscriptionName “Default Provider Subscription” -password PASSWORDHERE -environmentName AzureStackAdmin -AzureStackTenantID ID HERE

Here is the script I used that you can run:

param

(

[Parameter(Mandatory=$true, HelpMessage=”Enter Azure Stack Subscription name. You need to be Subscription Admin to execute the script”)]

[string] $subscriptionName,

[Parameter(Mandatory=$true, HelpMessage=”Provide a password for SPN application that you would create”)]

[string] $password,

[Parameter(Mandatory=$false, HelpMessage=”Provide a SPN role assignment”)]

[string] $spnRole = “owner”,

[Parameter(Mandatory=$false, HelpMessage=”Provide Azure Stack environment name for your subscription”)]

[string] $environmentName,

[Parameter(Mandatory=$false, HelpMessage=”Provide tenant ID from when Azure Stack enviroment was added”)]

[string] $AzureStackTenantID

)

#Initialize

$ErrorActionPreference = “Stop”

$VerbosePreference = “SilentlyContinue”

$userName = $env:USERNAME

$newguid = [guid]::NewGuid()

$displayName = [String]::Format(“VSO.{0}.{1}”, $userName, $newguid)

$homePage = “http://” + $displayName

$identifierUri = $homePage

#Initialize subscription

$isAzureModulePresent = Get-Module -Name AzureRM* -ListAvailable

if ([String]::IsNullOrEmpty($isAzureModulePresent) -eq $true)

{

Write-Output “Script requires AzureRM modules to be present. Obtain AzureRM from https://github.com/Azure/azure-powershell/releases. Please refer https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/DeployAzureResourceGroup/README.md for recommended AzureRM versions.” -Verbose

return

}

Import-Module -Name AzureRM.Profile

Write-Output “Provide your credentials to access Azure subscription $subscriptionName” -Verbose

Login-AzureRmAccount -SubscriptionName $subscriptionName -EnvironmentName $environmentName -TenantId $AzureStackTenantID

$azureSubscription = Get-AzureRmSubscription -SubscriptionName $subscriptionName

$connectionName = $azureSubscription.SubscriptionName

$tenantId = $azureSubscription.TenantId

$id = $azureSubscription.SubscriptionId

#Create a new AD Application

Write-Output “Creating a new Application in AAD (App URI – $identifierUri)” -Verbose

$azureAdApplication = New-AzureRmADApplication -DisplayName $displayName -HomePage $homePage -IdentifierUris $identifierUri -Password $password -Verbose

$appId = $azureAdApplication.ApplicationId

Write-Output “Azure AAD Application creation completed successfully (Application Id: $appId)” -Verbose

#Create new SPN

Write-Output “Creating a new SPN” -Verbose

$spn = New-AzureRmADServicePrincipal -ApplicationId $appId

$spnName = $spn.ServicePrincipalName

Write-Output “SPN creation completed successfully (SPN Name: $spnName)” -Verbose

#Assign role to SPN

Write-Output “Waiting for SPN creation to reflect in Directory before Role assignment”

Start-Sleep 20

Write-Output “Assigning role ($spnRole) to SPN App ($appId)” -Verbose

New-AzureRmRoleAssignment -RoleDefinitionName $spnRole -ServicePrincipalName $appId

Write-Output “SPN role assignment completed successfully” -Verbose

#Print the values

Write-Output “`nCopy and Paste below values for Service Connection” -Verbose

Write-Output “***************************************************************************”

Write-Output “Connection Name: $connectionName(SPN)”

Write-Output “Subscription Id: $id”

Write-Output “Subscription Name: $connectionName”

Write-Output “Service Principal Id: $appId”

Write-Output “Service Principal key: <Password that you typed in>”

Write-Output “Tenant Id: $tenantId”

Write-Output “***************************************************************************”

Output should be similar to this:

You will use information from the Service Connection output in the next step.

Steps to configure Azure Stack as a Service Endpoint in VSTS

Log into your VSTS account at visalstudio.com

Navigate to one of your projects.

Go into Settings.

Click on Services.

Click on New Service Endpoint

A window will pop up. Click on “use full version of the endpoint dialog.”

Next input the needed data. This data comes from the Service Connection info that you copied.

You can put whatever you want in the Connection name and the Subscription Name. Note do not verify the connection. It will not succeed as VSTS cannot access your private Azure Stack yet. Click OK when done.

Setup build agent on Azure Stack host

Next you need to setup the build agent on the Azure Stack host. (Note: In this post I am using the ASDK.) From within VSTS download the Windows agent. Extract the download to a local folder.

Go to Security under your profile in VSTS.

Next add a Personal access token (PAT) for Azure Stack.

Copy the token. Note it will not be shown again ever after you leave this screen.

In the folder with the extracted build agent you will see the following. We need to run the run.cmd file from an elevated command prompt.

Here is a screenshot of running the run.cmd. I recommend deploying the build agent as a service. You will use your personal access token (PAT) here and the azure stack admin account.

After the run.cmd finished the folder with the extracted contents should look like the following:

You can now see the agent in VSTS.

That’s it for the setup for connecting VSTS to Azure Stack. Next let’s look at setting up a continuous-integration and-continuous deployment (CI/CD) pipeline for VM-deployment to Azure Stack.

 

THE BUILD

What I cover here is focused on infrastructure as code (IaC) using ARM templates. If you need to set up CI/CD to Azure Stack for Web Apps, Mobile Apps, Containers, etc the process is the same as it is on Azure with the only difference being that you point to Azure Stack. Also note that in this post I am using the ASDK not multi-node.

Within VSTS create a new repository and place your ARM template in it.

Next click on Build and Release. Create a new Build Definition.

In the build definition. Point the Get sources to the repository you just created. Add 2 tasks under Phase 1. The first task will copy the ARM template to the build staging directory. The second task will publish the ARM template so that a release definition can pick it up. Both tasks are shown in the following screenshots.

Copy Files to task

Publish Artifact task

OPTIONAL: To setup continuous integration click on Triggers. Here you can set a schedule to run the builds or you can click on the repository as shown in the screenshot and then check Enable continuous integration. By checking the box next to Enable continuous integration it tells VSTS that anytime content in the repo is changed to run a build.

Click on Save & queue. This will start the build.

The build will start. As long as everything is setup properly within your build it will succeed as shown in the following Screenshot.

That’s all for our build. Next up we need to create a release definition (RD) pipeline. The RD will take the build artifacts and deploy to an environment/s you specify.

Read more