GigHive bee gighive

Azure Setup

GigHive includes an Azure deployment path for users who want to run the system in their own Azure subscription instead of setting it up locally.

This guide is written as a simple overview of the setup flow that already exists in this repository.

We’ve done some pre-work for you in regards to cost estimation of running Gighive in Azure. If interested, check out this information.

Before you start

The most important prerequisites are:

Without those two pieces, the Azure bootstrap flow will not work.

Choose the workflow that matches your goal

Option 1 — First-time setup: 1prereqsInstall.sh

Use 1prereqsInstall.sh first.

This script prepares your machine for the Azure deployment workflow.

It can install:

For Azure setup, the Azure, Ansible, and Terraform parts are the important ones.

What the script does:

Important note:

Option 2 — Required configuration: azure.env

Before running the bootstrap script, make sure azure.env is present and contains your Azure environment values.

The scripts in this repository expect azure.env to define:

The comments in the scripts show the expected format as exported environment variables.

This step is important because:

Option 3 — Build Azure infrastructure and run the app setup: 2bootstrap.sh

Use 2bootstrap.sh after your prerequisites are installed and azure.env is ready.

This is the main Azure setup script.

What it does:

  1. Loads azure.env if the file is present
  2. Checks whether your Azure CLI session is already authenticated
  3. Starts Azure device-code login if no valid session is found
  4. Sets the Azure subscription
  5. Ensures the Terraform backend resources exist in Azure
  6. Runs Terraform plan
  7. Optionally applies the Terraform plan
  8. Reads the VM public IP from Terraform output
  9. Optionally updates the Ansible inventory from the generated IP
  10. Optionally runs the Ansible build

This script supports partial or resumed runs.

Supported start stages are:

That means you can run the full flow or restart from a later stage if part of the work has already been completed.

Important notes from the script:

Option 4 — Remove Azure resources when you are done: 3deleteAll.sh

Use 3deleteAll.sh only when you want to tear down Azure resources.

This script is destructive.

What it does:

Important note:

If you are new to the Azure path, use this order:

  1. Run 1prereqsInstall.sh
  2. Make sure azure.env is present and correct
  3. Run 2bootstrap.sh
  4. If you later want to tear everything down, run 3deleteAll.sh

Which option should I choose?

Important note

Before using the Azure scripts: