Skip to content

Commit

Permalink
fix(bootstrap): Merge pull request #4 from Cosmic9Studios/bootstrap-p…
Browse files Browse the repository at this point in the history
…atch

fix(bootstrap): Bootstrap only now applied to server
  • Loading branch information
phenry20 authored Oct 18, 2019
2 parents 259744e + 0288b4b commit 3112bdd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ resource "google_compute_instance_template" "client" {
}

metadata_startup_script = <<EOT
sudo pm2 start /scripts/nomad.sh --wait-ready --listen-timeout 15000 -- ${var.client_target_size}
sudo pm2 start /scripts/consul.sh --wait-ready --listen-timeout 15000 -- ${var.client_target_size}
sudo pm2 start /scripts/nomad.sh --wait-ready --listen-timeout 15000
sudo pm2 start /scripts/consul.sh --wait-ready --listen-timeout 15000
EOT
}

Expand Down
2 changes: 1 addition & 1 deletion packer/salt/files/consul.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
consul agent -config-dir=/etc/consul.d -ui -ui-content-path /consul/ -bootstrap-expect $1
consul agent -config-dir=/etc/consul.d -ui -ui-content-path /consul/ $1
2 changes: 1 addition & 1 deletion packer/salt/files/nomad.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nomad agent -config=/etc/nomad.d -bootstrap-expect=$1
nomad agent -config=/etc/nomad.d $1
4 changes: 2 additions & 2 deletions server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ resource "google_compute_instance_template" "server" {
}

metadata_startup_script = <<EOT
sudo pm2 start /scripts/nomad.sh -- ${var.server_target_size}
sudo pm2 start /scripts/consul.sh -- ${var.server_target_size}
sudo pm2 start /scripts/nomad.sh -- -bootstrap-expect=${var.server_target_size}
sudo pm2 start /scripts/consul.sh -- -bootstrap-expect ${var.server_target_size}
EOT
}

Expand Down

0 comments on commit 3112bdd

Please sign in to comment.