diff --git a/jobs/fastcgi.nomad b/jobs/fastcgi.nomad index bae8d43..ca1d60d 100644 --- a/jobs/fastcgi.nomad +++ b/jobs/fastcgi.nomad @@ -1,25 +1,11 @@ -variable "green" { - type = bool - default = false -} - variable "mysql_password_mediawiki" { type = string default = "" } -locals { - blue = !var.green -} - job "fastcgi" { datacenters = ["dc1"] - constraint { - operator = "distinct_hosts" - value = true - } - group "fastcgi" { count = 3 @@ -225,10 +211,9 @@ job "fastcgi" { } update { - auto_revert = true - auto_promote = var.green ? true : false - # canary count equal to the desired count allows a Nomad job to model blue/green deployments - canary = var.green ? 1 : 0 + auto_revert = true + auto_promote = true + canary = 1 progress_deadline = "1h" } } diff --git a/terraform/mediawiki.tf b/terraform/mediawiki.tf index b282c3b..43c023d 100644 --- a/terraform/mediawiki.tf +++ b/terraform/mediawiki.tf @@ -40,7 +40,6 @@ resource "nomad_job" "fastcgi_green" { hcl2 { allow_fs = true vars = { - green = true mysql_password_mediawiki = var.mysql_password_mediawiki } }