open-nomad/command/assets/connect-short.nomad
Seth Hoenig 456868c166 command: bump connect examples to v3
Nomad v1.0+ combined with Consul 1.9+ support launching Envoy v1.16+
which is the first version of envoy to support arm64 platforms out
of the box.

By rebuilding our example docker containers for connect to be multiplatform
between amd64 and arm64, Nomad can provide a nicer user experience for
those trying out Connect on arm64 machines (e.g. AWS Graviton instances
or Raspberry Pi 4's).

This has been done for the countdash examples at v3.

https://hub.docker.com/layers/hashicorpnomad/counter-dashboard/v3/images/sha256-94e323587bc372ba1b6ca5c58dc23e291e9d26787b50e71025f1c8967dfbcd07?context=repo
https://hub.docker.com/layers/hashicorpnomad/counter-api/v3/images/sha256-16a9e9e08082985a635c9edd0f258b084153c6c7831a9b41d34bde78c308b65c?context=repo

The connect-native examples are now also multiplatform at v5, but we
don't have them built into `job init`.
2021-01-10 16:54:31 -06:00

66 lines
997 B
HCL

job "countdash" {
datacenters = ["dc1"]
group "api" {
network {
mode = "bridge"
}
service {
name = "count-api"
port = "9001"
connect {
sidecar_service {}
}
}
task "web" {
driver = "docker"
config {
image = "hashicorpnomad/counter-api:v3"
}
}
}
group "dashboard" {
network {
mode = "bridge"
port "http" {
static = 9002
to = 9002
}
}
service {
name = "count-dashboard"
port = "9002"
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "count-api"
local_bind_port = 8080
}
}
}
}
}
task "dashboard" {
driver = "docker"
env {
COUNTING_SERVICE_URL = "http://${NOMAD_UPSTREAM_ADDR_count_api}"
}
config {
image = "hashicorpnomad/counter-dashboard:v3"
}
}
}
}