TutorialsDeployment › Manual

Deployment · Path 1 of 3

Building This Project by Hand, with Azure CLI

Every Azure resource this project needs can be created by running az commands directly — one at a time, in a fixed order, typed by a person (or scripted, but still imperative, step-by-step commands rather than a declared end state). That logic lives in the utility_scripts/ folder at the root of this project. This page walks through what each script does, and why the project later added Terraform and GitHub Actions for day-to-day use.

Codey the Sr Developer, standing with a pointer, ready to walk through the guide
Folder → utility_scripts/ Tool → Azure CLI (az) Scripts → 4, each in PowerShell and Bash Deploys → 3 container images Automated alternative → Terraform tutorial

Manual vs. automated why both exist

Both approaches create the exact same Azure environment — a resource group, a PostgreSQL server and database, a container registry, an App Service plan hosting three container web apps (API, UI, and the tutorial site), and (for CI/CD) a passwordless GitHub identity. They just get there differently.

Codey holding up a sticky note
same destination, two different roads
The manual approach (this page)imperative

Each script is a fixed list of az commands, run top to bottom, in order. There's no memory of what already exists beyond whatever's actually sitting in Azure — run a script twice and it tries to create everything twice (some commands then fail because the resource already exists). Nothing previews what would happen before it happens. This is exactly how most people first learn a cloud platform: one command, one resource, cause and effect you can see immediately.

The automated approach (Terraform)declarative

Terraform describes the end state you want, keeps a record (state) of what it already built, and previews every change before making it. It's more setup up front, but it scales to a team, catches drift, and tears down cleanly — the trade-offs covered in detail on the Terraform tutorial's “what problem does Terraform solve?” section.

Worth knowing: this project no longer runs these scripts in its actual CI/CD pipeline — the GitHub Actions workflow uses Terraform. They're kept, and covered here, because reading them is one of the clearest ways to see exactly which Azure API calls Terraform is making on your behalf under the hood.

The scripts, script by script structure

Every script below lives inside utility_scripts/, as a matching pair — a .ps1 file for PowerShell and a .sh file for Bash, doing the same job. Both take a -UserName / --user-name parameter (default dzierzon) used to build resource names, the same pattern as Terraform's user_name variable.

ScriptWhat it's for, in plain terms
az_create_resourcesCreates the resource group, the PostgreSQL server and database, the container registry, and all three container web apps, then loads the starting database tables. (dig deeper)
az_deployBuilds all three container images in the registry, points the web apps at them, restarts them, and waits for each to report healthy. (dig deeper)
az_setup_github_oidcCreates a passwordless identity so GitHub Actions can deploy code, the manual equivalent of Terraform's github_oidc.tf. (dig deeper)
az_delete_resourcesDeletes the entire resource group and everything inside it, cleanly and safely. (dig deeper)

No local Docker required. The deploy script doesn't build images on your machine — it uploads the source to Azure and has the container registry build them, so the only tool you need installed is the Azure CLI. The images themselves are covered in the Docker tutorial.

A sensible order where to start

Unlike Terraform, these scripts don't check dependencies for you — running one out of order just fails with an Azure error about a resource that doesn't exist yet. This is the order they're meant to run in.

Codey typing on a laptop
four scripts, one order
  1. az_create_resources — provisions everything: resource group, database, registry, all three web apps.
  2. az_deploy — builds all three images and deploys them onto the web apps that now exist.
  3. az_setup_github_oidc — optional, only needed once, to let GitHub Actions deploy automatically afterward.
  4. az_delete_resources — whenever you're done, tears everything back down.

Pick a script to learn go deeper

Codey giving a thumbs up

Pick a script above, or head to the Terraform tutorial to see the automated version of the same steps.