diff --git a/grafana.nomad b/grafana.nomad index 1849347..cc47aa0 100644 --- a/grafana.nomad +++ b/grafana.nomad @@ -31,10 +31,10 @@ job "dashboard" { update { max_parallel = 1 min_healthy_time = "20s" - healthy_deadline = "7m" - progress_deadline = "15m" + healthy_deadline = "20m" + progress_deadline = "30m" auto_revert = true - auto_promote = true + auto_promote = true canary = 1 } @@ -49,6 +49,7 @@ job "dashboard" { count = 1 network { port "mysql_server" { + static = 3306 to = 3306 } } @@ -73,6 +74,7 @@ job "dashboard" { mode = "fail" } task "mysql" { + leader = true driver = "docker" config { image = "arm64v8/mysql:oracle" @@ -82,6 +84,7 @@ job "dashboard" { MYSQL_ROOT_PASSWORD = "password" # pragma: allowlist secret MYSQL_USER = "mysql" MYSQL_PASSWORD = "password" # pragma: allowlist secret + MYSQL_DATABASE = "grafana" } resources { cpu = 125 @@ -95,6 +98,7 @@ job "dashboard" { count = 1 network { port "grafana_server" { + to = 3000 static = 3000 } } @@ -144,7 +148,7 @@ job "dashboard" { command = "${NOMAD_ALLOC_DIR}/grafana-${var.grafana_version}/bin/grafana-server" args = [ "-homepath=${NOMAD_ALLOC_DIR}/grafana-${var.grafana_version}", - "-config=${NOMAD_ALLOC_DIR}/grafana-${var.grafana_version}/conf/conf.ini" + "--config=${NOMAD_ALLOC_DIR}/grafana-${var.grafana_version}/conf/conf.ini" ] } @@ -152,11 +156,22 @@ job "dashboard" { data = <