Skip to content
Snippets Groups Projects
Commit bfabcf93 authored by Jan David Mol's avatar Jan David Mol
Browse files

Merge branch 'tune-startup-latency' into 'master'

Tune startup latency

See merge request !1084
parents 5e14a918 a06a4c78
No related branches found
No related tags found
1 merge request!1084Tune startup latency
Pipeline #115645 failed
Pipeline: tango

#115646

    ...@@ -92,6 +92,36 @@ job "device-servers" { ...@@ -92,6 +92,36 @@ job "device-servers" {
    } }
    } }
    task "wait-for-db" {
    lifecycle {
    hook = "prestart"
    sidecar = false
    }
    driver = "docker"
    config {
    image = "[[.registry.astron.url]]/busybox:latest"
    command = "sh"
    args = ["-c", "while ! nc -z ${MYSQL_HOST} ${MYSQL_PORT}; do sleep 1; done"]
    }
    template {
    wait {
    min = "30s"
    max = "300s"
    }
    error_on_missing_key = true
    data = <<EOH
    {{- range service "tangodb" }}
    MYSQL_HOST = "{{ .Address }}"
    MYSQL_PORT = "{{ .Port }}"
    {{- end }}
    EOH
    destination = "local/env.txt"
    env = true
    }
    }
    task "device-[[ $name ]]" { task "device-[[ $name ]]" {
    driver = "docker" driver = "docker"
    ......
    ...@@ -3,6 +3,12 @@ job "jupyter" { ...@@ -3,6 +3,12 @@ job "jupyter" {
    datacenters = ["stat"] datacenters = ["stat"]
    type = "service" type = "service"
    reschedule {
    unlimited = true
    delay = "60s"
    delay_function = "constant"
    }
    group "jupyter-lab" { group "jupyter-lab" {
    count = 1 count = 1
    ......
    ...@@ -3,6 +3,12 @@ job "landing-page" { ...@@ -3,6 +3,12 @@ job "landing-page" {
    datacenters = ["stat"] datacenters = ["stat"]
    type = "service" type = "service"
    reschedule {
    unlimited = true
    delay = "60s"
    delay_function = "constant"
    }
    group "web-server" { group "web-server" {
    count = 1 count = 1
    ......
    ...@@ -7,6 +7,12 @@ job "log-scraping" { ...@@ -7,6 +7,12 @@ job "log-scraping" {
    type = "service" type = "service"
    [[ end ]] [[ end ]]
    reschedule {
    unlimited = true
    delay = "30s"
    delay_function = "constant"
    }
    update { update {
    min_healthy_time = "10s" min_healthy_time = "10s"
    healthy_deadline = "5m" healthy_deadline = "5m"
    ......
    ...@@ -3,6 +3,12 @@ job "monitoring" { ...@@ -3,6 +3,12 @@ job "monitoring" {
    datacenters = ["stat"] datacenters = ["stat"]
    type = "service" type = "service"
    reschedule {
    unlimited = true
    delay = "60s"
    delay_function = "constant"
    }
    group "postgres" { group "postgres" {
    count = 1 count = 1
    ......
    ...@@ -6,6 +6,7 @@ job "object-replication" { ...@@ -6,6 +6,7 @@ job "object-replication" {
    cron = "*/5 * * * * *" cron = "*/5 * * * * *"
    prohibit_overlap = true prohibit_overlap = true
    } }
    group "batch" { group "batch" {
    count = 1 count = 1
    ......
    ...@@ -3,6 +3,12 @@ job "object-storage" { ...@@ -3,6 +3,12 @@ job "object-storage" {
    datacenters = ["stat"] datacenters = ["stat"]
    type = "service" type = "service"
    reschedule {
    unlimited = true
    delay = "30s"
    delay_function = "constant"
    }
    group "minio" { group "minio" {
    count = 1 count = 1
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment