From 7370b307207149be00ce8c6c55e97eea1c439679 Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 23 May 2022 21:44:34 +0200 Subject: [PATCH] add homer cnfig --- alertmanager.nomad | 11 ++++++++++- chainetv.nomad | 7 +++++++ dashboard.nomad | 6 +++++- deconz.nomad | 8 ++++++++ drone.nomad | 7 +++++++ gitea.nomad | 8 +++++++- grafana.nomad | 7 +++++++ homeassistant.nomad | 12 ++++++++---- pihole.nomad | 11 ++++++++++- prometheus.nomad | 12 +++++++++++- radicale.nomad | 8 ++++++++ supysonic.nomad | 7 +++++++ syncthing.nomad | 10 ++++++++++ traefik-ingress.nomad | 9 +++++++++ traefik-local.nomad | 9 +++++++++ tt-rss.nomad | 7 +++++++ vaultwarden.nomad | 7 +++++++ wikijs.nomad | 8 ++++++++ www.nomad | 7 +++++++ 19 files changed, 152 insertions(+), 9 deletions(-) diff --git a/alertmanager.nomad b/alertmanager.nomad index 16d734a..e311d13 100644 --- a/alertmanager.nomad +++ b/alertmanager.nomad @@ -18,7 +18,16 @@ job "alertmanager" { service { name = "alertmanager" port = "http" - tags = ["urlprefix-/alertmanager strip=/alertmanager"] + tags = [ + "urlprefix-/alertmanager strip=/alertmanager", + "homer.enable=true", + "homer.name=AlertManager", + "homer.service=Monitoring", + "homer.logo=https://camo.githubusercontent.com/13ff7fc7ea6d8a6d98d856da8e3220501b9e6a89620f017d1db039007138e062/687474703a2f2f6465766f70792e696f2f77702d636f6e74656e742f75706c6f6164732f323031392f30322f7a616c2d3230302e706e67", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_http}", + + ] check { name = "alertmanager_ui port alive" type = "http" diff --git a/chainetv.nomad b/chainetv.nomad index 9dc52d1..e9aead5 100644 --- a/chainetv.nomad +++ b/chainetv.nomad @@ -19,6 +19,13 @@ job "chainetv" { name = "chainetv" port = "http" tags = [ + "homer.enable=true", + "homer.name=ChaineTV", + "homer.service=Application", + "homer.icon=fas fa-tv", + "homer.target=_blank", + "homer.url=https://www.ducamps.win/${NOMAD_JOB_NAME}", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/chainetv`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win", diff --git a/dashboard.nomad b/dashboard.nomad index 0a05909..6922881 100644 --- a/dashboard.nomad +++ b/dashboard.nomad @@ -109,11 +109,15 @@ links: url: "https://www.ducamps.win/notebook/" services: - name: Application - icon: "fas fa-heartbeat" + icon: "fas fa-heartbeet" items: [] - name: Platform icon: "fas fa-code-branch" items: [] + - name: Monitoring + icon: "fab fa-watchman-monitoring" + items: [] + EOH destination = "local/base.yml" diff --git a/deconz.nomad b/deconz.nomad index 2ad094a..384ed53 100644 --- a/deconz.nomad +++ b/deconz.nomad @@ -26,6 +26,14 @@ job "deconz" { name = "deconz" port = "http" tags = [ + "homer.enable=true", + "homer.name=Deconz", + "homer.service=Application", + "homer.logo=https://tutoriels.domotique-store.fr/images/JeeBox/plugin-zigbee/icone-plugin-zigbee-officiel-jeedom.png?1632754975124", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_http}", + + ] } config { diff --git a/drone.nomad b/drone.nomad index 4e53ad5..8b1deb4 100644 --- a/drone.nomad +++ b/drone.nomad @@ -23,6 +23,13 @@ job "drone" { name = "drone" port = "http" tags = [ + "homer.enable=true", + "homer.name=DroneCI", + "homer.service=Platform", + "homer.logo=https://drone.ducamps.win/static/media/logo.76c744d4.svg", + "homer.target=_blank", + "homer.url=https://${NOMAD_JOB_NAME}.ducamps.win", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", diff --git a/gitea.nomad b/gitea.nomad index e5b09df..1ba20c0 100644 --- a/gitea.nomad +++ b/gitea.nomad @@ -20,7 +20,13 @@ job "git" { service { name = "gitea" port = "http" - tags = [ + tags = [ + "homer.enable=true", + "homer.name=Gitea", + "homer.service=Platform", + "homer.target=_blank", + "homer.logo=https://git.ducamps.win/assets/img/logo.svg", + "homer.url=https://${NOMAD_JOB_NAME}.ducamps.win", "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", diff --git a/grafana.nomad b/grafana.nomad index 3a4675d..19ce0d8 100644 --- a/grafana.nomad +++ b/grafana.nomad @@ -15,6 +15,13 @@ job "grafana" { name = "grafana" port = "http" tags= [ + "homer.enable=true", + "homer.name=Grafana", + "homer.service=Monitoring", + "homer.logo=https://grafana.ducamps.win/public/img/grafana_icon.svg", + "homer.target=_blank", + "homer.url=https://${NOMAD_JOB_NAME}.ducamps.win", + "traefik.enable=true", "traefik.http.routers.grafana.entryPoints=websecure", "traefik.http.routers.grafana.rule=Host(`grafana.ducamps.win`)", diff --git a/homeassistant.nomad b/homeassistant.nomad index 87335fd..85be4e6 100644 --- a/homeassistant.nomad +++ b/homeassistant.nomad @@ -3,7 +3,7 @@ job "homeassistant" { datacenters = ["homelab"] type = "service" meta { - forcedeploy = "1" + forcedeploy = "0" } constraint { attribute = "${attr.unique.hostname}" @@ -35,10 +35,14 @@ job "homeassistant" { name = "${NOMAD_TASK_NAME}" port = "http" tags = [ + "homer.enable=true", + "homer.name=Hass", + "homer.service=Application", + "homer.subtitle=Home Assistant", + "homer.logo=https://raw.githubusercontent.com/home-assistant/assets/master/logo/logo-small.svg", + "homer.target=_blank", + "homer.url=https://${NOMAD_TASK_NAME}.ducamps.win", "traefik.enable=true", - "traefik.http.middlewares.httpsRedirect.redirectscheme.scheme=https", - "traefik.http.routers.${NOMAD_TASK_NAME}_insecure.middlewares=httpsRedirect", - "traefik.http.routers.${NOMAD_TASK_NAME}_insecure.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_TASK_NAME}.rule=Host(`${NOMAD_TASK_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_TASK_NAME}.tls.domains[0].sans=${NOMAD_TASK_NAME}.ducamps.win", "traefik.http.routers.${NOMAD_TASK_NAME}.tls.certresolver=myresolver", diff --git a/pihole.nomad b/pihole.nomad index 0fb4164..18a6a91 100644 --- a/pihole.nomad +++ b/pihole.nomad @@ -19,7 +19,16 @@ job "pihole" { } service { name = "pihole-gui" - tags = ["pihole", "admin"] + tags = ["pihole", "admin", + "homer.enable=true", + "homer.name=Pi-hole", + "homer.service=Application", + "homer.type=PiHole", + "homer.logo=http://${NOMAD_ADDR_http}/admin/img/logo.svg", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_http}/admin", + + ] port = "http" } task "server" { diff --git a/prometheus.nomad b/prometheus.nomad index 6676d8a..97077f8 100644 --- a/prometheus.nomad +++ b/prometheus.nomad @@ -125,7 +125,17 @@ EOH service { name = "prometheus" - tags = ["urlprefix-/"] + tags = ["urlprefix-/", + "homer.enable=true", + "homer.name=Prometheus", + "homer.service=Monitoring", + "homer.type=Prometheus", + "homer.logo=https://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Prometheus_software_logo.svg/173px-Prometheus_software_logo.svg.png", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_prometheus_ui}", + + + ] port = "prometheus_ui" check { diff --git a/radicale.nomad b/radicale.nomad index c280c7d..1707dab 100644 --- a/radicale.nomad +++ b/radicale.nomad @@ -22,6 +22,14 @@ job "radicale" { name = "radicale" port = "http" tags = [ + "homer.enable=true", + "homer.name=Radicale", + "homer.service=Application", + "homer.logo=https://radicale.org/assets/logo.svg", + "homer.target=_blank", + "homer.url=https://www.ducamps.win/${NOMAD_JOB_NAME}", + + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/radicale`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win", diff --git a/supysonic.nomad b/supysonic.nomad index 3c2a39e..7d4dcb4 100644 --- a/supysonic.nomad +++ b/supysonic.nomad @@ -28,6 +28,13 @@ job "supysonic" { name = "supysonic" port = "http" tags = [ + "homer.enable=true", + "homer.name=Supysonic", + "homer.service=Application", + "homer.icon=fas fa-headphones", + "homer.target=_blank", + "homer.url=http://${NOMAD_JOB_NAME}.ducamps.win", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", diff --git a/syncthing.nomad b/syncthing.nomad index 533f14c..eb7b775 100644 --- a/syncthing.nomad +++ b/syncthing.nomad @@ -28,6 +28,16 @@ job "syncthing" { service { name = "syncthing-web" port = "http" + tags = [ + "homer.enable=true", + "homer.name=Syncthing", + "homer.service=Application", + "homer.logo=http://${NOMAD_ADDR_http}/assets/img/logo-horizontal.svg", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_http}", + + + ] } config { image = "linuxserver/syncthing" diff --git a/traefik-ingress.nomad b/traefik-ingress.nomad index aa567b2..150319a 100644 --- a/traefik-ingress.nomad +++ b/traefik-ingress.nomad @@ -34,6 +34,15 @@ job "traefik-ingress" { name = "traefik-admin" port = "admin" tags = [ + "homer.enable=true", + "homer.name=Traefik admin", + "homer.subtitle=WAN", + "homer.service=Platform", + "homer.logo=https://upload.wikimedia.org/wikipedia/commons/1/1b/Traefik.logo.png", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_admin}", + + ] } diff --git a/traefik-local.nomad b/traefik-local.nomad index e47246a..421ab7f 100644 --- a/traefik-local.nomad +++ b/traefik-local.nomad @@ -35,6 +35,15 @@ job "traefik-local" { name = "traefik-local-admin" port = "admin" tags = [ + "homer.enable=true", + "homer.name=Traefik admin", + "homer.subtitle=LAN", + "homer.service=Platform", + "homer.logo=https://upload.wikimedia.org/wikipedia/commons/1/1b/Traefik.logo.png", + "homer.target=_blank", + "homer.url=http://${NOMAD_ADDR_admin}", + + ] } diff --git a/tt-rss.nomad b/tt-rss.nomad index 5f2f3b7..e62cf5e 100644 --- a/tt-rss.nomad +++ b/tt-rss.nomad @@ -25,6 +25,13 @@ job "tt-rss" { name = "tt-rss" port = "http" tags = [ + "homer.enable=true", + "homer.name=TT-RSS", + "homer.service=Application", + "homer.logo=https://framalibre.org/sites/default/files/styles/thumbnail/public/leslogos/ic_launcher_1.png", + "homer.target=_blank", + "homer.url=https://www.ducamps.win/tt-rss", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/tt-rss`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win", diff --git a/vaultwarden.nomad b/vaultwarden.nomad index 80b6776..bca700b 100644 --- a/vaultwarden.nomad +++ b/vaultwarden.nomad @@ -23,6 +23,13 @@ job "vaultwarden" { name = "vaultwarden" port = "http" tags = [ + "homer.enable=true", + "homer.name=VaultWarden", + "homer.service=Application", + "homer.logo=https://yunohost.org/user/images/bitwarden_logo.png", + "homer.target=_blank", + "homer.url=https://${NOMAD_JOB_NAME}.ducamps.win", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`vault.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=vault.ducamps.win", diff --git a/wikijs.nomad b/wikijs.nomad index 25c692b..3ee5a18 100644 --- a/wikijs.nomad +++ b/wikijs.nomad @@ -26,6 +26,14 @@ job "wikijs" { name = "wikijs" port = "http" tags = [ + "homer.enable=true", + "homer.name=wikiJS", + "homer.service=Application", + "homer.subtitle=projet Infotech", + "homer.logo=https://repository-images.githubusercontent.com/65848095/7655d480-b066-11e9-991b-81088c474331", + "homer.target=_blank", + "homer.url=https://${NOMAD_JOB_NAME}.ducamps.win", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", diff --git a/www.nomad b/www.nomad index f770bd5..ace11fa 100644 --- a/www.nomad +++ b/www.nomad @@ -12,6 +12,13 @@ job "www" { service { name = "www" tags = [ + "homer.enable=true", + "homer.name=Website", + "homer.service=Application", + "homer.icon=fas fa-blog", + "homer.target=_blank", + "homer.url=https://www.ducamps.win", + "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",