chore(media-centre): onboard plex onto consul service mesh
- allows for plex to upgrade connections away from http1.1
This commit is contained in:
parent
20963a1f4a
commit
ad5c61e749
1 changed files with 63 additions and 11 deletions
|
@ -11,8 +11,6 @@ job "media-centre" {
|
||||||
config {
|
config {
|
||||||
image = "plexinc/pms-docker:latest"
|
image = "plexinc/pms-docker:latest"
|
||||||
runtime = "nvidia"
|
runtime = "nvidia"
|
||||||
ports = ["plex"]
|
|
||||||
network_mode = "host"
|
|
||||||
|
|
||||||
mount {
|
mount {
|
||||||
type = "volume"
|
type = "volume"
|
||||||
|
@ -78,17 +76,36 @@ job "media-centre" {
|
||||||
|
|
||||||
service {
|
service {
|
||||||
provider = "consul"
|
provider = "consul"
|
||||||
port = "plex"
|
port = "32400"
|
||||||
tags = [
|
|
||||||
"traefik.enable=true",
|
meta {
|
||||||
"traefik.http.routers.plex.entrypoints=websecure",
|
envoy_metrics_port = "${NOMAD_HOST_PORT_envoy_metrics}"
|
||||||
"traefik.http.routers.plex.rule=Host(`plex.brmartin.co.uk`)"
|
}
|
||||||
]
|
|
||||||
|
connect {
|
||||||
|
sidecar_service {
|
||||||
|
proxy {
|
||||||
|
expose {
|
||||||
|
path {
|
||||||
|
path = "/metrics"
|
||||||
|
protocol = "http"
|
||||||
|
local_path_port = 9102
|
||||||
|
listener_port = "envoy_metrics"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
transparent_proxy {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
mode = "bridge"
|
||||||
port "plex" {
|
port "plex" {
|
||||||
static = 32400
|
to = 32400
|
||||||
|
}
|
||||||
|
port "envoy_metrics" {
|
||||||
|
to = 9102
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,4 +152,39 @@ job "media-centre" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group "plex-ingress-group" {
|
||||||
|
|
||||||
|
network {
|
||||||
|
mode = "bridge"
|
||||||
|
port "inbound" {
|
||||||
|
to = 8080
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
service {
|
||||||
|
port = "inbound"
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
|
||||||
|
"traefik.http.routers.plex.entrypoints=websecure",
|
||||||
|
"traefik.http.routers.plex.rule=Host(`plex.brmartin.co.uk`)"
|
||||||
|
]
|
||||||
|
|
||||||
|
connect {
|
||||||
|
gateway {
|
||||||
|
ingress {
|
||||||
|
listener {
|
||||||
|
port = 8080
|
||||||
|
protocol = "http"
|
||||||
|
service {
|
||||||
|
name = "media-centre-plex"
|
||||||
|
hosts = ["*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue