How to install Waypoint Server to Azure?

Since Waypoint supports deployments to Azure out of the box, I was hoping to host the Waypoint Server itself at Azure as well. Is this possible? If yes, what would be the preferred way to install it to Azure?

Hey Meglio,

For Kubernetes, this is super easy as you can either use the built in install command and target your Azure Kubernetes cluster or you can use the install command to generate the raw Kubernetes configuration which you could then modify.

waypoint server install --platform kubernetes --show-yaml --accept-tos

To deploy the server to say ACI, you could either create a Waypoint configuration using the ACI plugin to do this or you could use Terraform.

In either case, you are going to need to set the startup command for Waypoint which correctly sets the advertise-addr so that the Horizon server can connect to it correctly. You will also need to expose the ports 9701 gRPC API, and optionally 9702 Web interface.

        "waypoint",
        "server",
        "-vvv"
        "-db=/path_to_storage/data.db",
        "-listen-grpc=0.0.0.0:9701",
        "-listen-http=0.0.0.0:9702",
        "-advertise-addr=nic-ui.westeurope.azurecontainer.io:9701",
        "-advertise-tls=true",
        "-advertise-tls-skip-verify=true",

You can find an example of a Terraform configuration I have used to spin up Waypoint in Azure before below.

Note: You should always add persistent storage for the state DB, you, the ACI plugin supports mounting Azure File Shares as a Volume, if you are using Terraform you can setup the same thing.

provider "azurerm" {
  version = ">= 2.0.0"
  features {}
}

resource "azurerm_container_group" "waypoint" {
  name                = "waypoint"
  location            = "West Europe"
  resource_group_name = "mine"
  ip_address_type     = "public"
  dns_name_label      = "nic-ui"
  os_type             = "Linux"

  container {
    name   = "waypoint"
    image  = "hashicorp/waypoint:latest"
    cpu    = "0.5"
    memory = "1.5"

    ports {
      port     = 9701
      protocol = "TCP"
    }
    
    ports {
      port     = 9702
      protocol = "TCP"
    }

    commands = [
        "waypoint",
        "server",
        "-vvv",
        "-listen-grpc=0.0.0.0:9701",
        "-listen-http=0.0.0.0:9702",
        "-advertise-addr=nic-ui.westeurope.azurecontainer.io:9701",
        "-advertise-tls=true",
        "-advertise-tls-skip-verify=true",
    ]
  }

  tags = {
    environment = "testing"
  }
}
2 Likes