Skip to content

Commit

Permalink
Merge pull request #331 from hashicorp/f-gh-327
Browse files Browse the repository at this point in the history
demo/vagrant/das: remove use for deprecated network spec params.
  • Loading branch information
jrasell authored Jan 5, 2021
2 parents 284e609 + 51f958e commit e56e878
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 15 deletions.
28 changes: 25 additions & 3 deletions demo/vagrant/dynamic-app-sizing/jobs/das-autoscaler.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@ job "das-autoscaler" {
group "autoscaler" {
count = 1

network {
port "http" {
to = 8080
}
}

task "autoscaler" {
driver = "docker"

config {
image = "hashicorp/nomad-autoscaler-enterprise:0.2.0-beta2"
command = "nomad-autoscaler"
args = ["agent", "-config", "local/autoscaler.hcl"]
ports = ["http"]

args = [
"agent",
"-config",
"local/autoscaler.hcl",
"-http-bind-address",
"0.0.0.0",
]
}

template {
Expand Down Expand Up @@ -73,9 +87,17 @@ EOH
resources {
cpu = 512
memory = 512
}

service {
name = "autoscaler"
port = "http"

network {
mbits = 10
check {
type = "http"
path = "/v1/health"
interval = "5s"
timeout = "2s"
}
}
}
Expand Down
20 changes: 8 additions & 12 deletions demo/vagrant/dynamic-app-sizing/jobs/prometheus.nomad
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ job "prometheus" {
group "prometheus" {
count = 1

network {
port "prometheus_ui" {
static = 9090
to = 9090
}
}

task "prometheus" {
driver = "docker"

config {
image = "prom/prometheus:v2.18.1"
ports = ["prometheus_ui"]

args = [
"--config.file=/etc/prometheus/config/prometheus.yml",
Expand All @@ -20,10 +28,6 @@ job "prometheus" {
volumes = [
"local/config:/etc/prometheus/config",
]

port_map {
prometheus_ui = 9090
}
}

template {
Expand Down Expand Up @@ -57,14 +61,6 @@ EOH
resources {
cpu = 100
memory = 256

network {
mbits = 10

port "prometheus_ui" {
static = 9090
}
}
}

service {
Expand Down

0 comments on commit e56e878

Please sign in to comment.