Hi there. I’ve got consul and nomad booted with acl’s. My goal is simple, I think - to publish applications and have them served to users via a simple dns name.
I’m overwhelmed by the amount of information presented in the consul docs and am struggling to make this simple connection. I’m unclear as to whether I need to set up a reverse proxy such as nginx, envoy, etc - and run as a service on each node, accepting requests by name and proxying to a node/port, or if there’s other more intelligent ways of doing this leveraging consul services.
So really, I want
user => web.example.com:80 => mycontainer.nomad-cluster:someport
as simply as I can.
Here’s what I think I’m supposed to be doing:
job "webby" {
type = "service"
datacenters = ["us-west-2a"]
group "webby" {
volume "webby" {
type = "csi"
source = "webby"
}
network {
mode = "bridge"
port "http" {
to = 80
}
}
service {
name = "webby"
tags = ["webby"]
port = "http"
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "webby"
}
}
}
}
}
task "webby" {
driver = "docker"
resources {
cpu = 100
memory = 128
}
config {
image = "docker.io/nginx"
}
constraint {
distinct_hosts = false
}
volume_mount {
volume = "webby"
destination = "/var/www/webby"
}
}
}
}
I’d really appreciate the opportunity for an interactive discussion with someone who has experience with this.
Many thanks in advance.