From 099bb1b2d53c4ef7eabc9b9dd7910048f24fa530 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Mon, 13 Jan 2025 17:12:59 +0100
Subject: [PATCH 1/4] Enable Consul GUI in development/test environment

---
 README.md                               | 2 +-
 infra/dev/nomad/config/nomad/consul.hcl | 4 ++++
 infra/dev/nomad/nomad.hcl               | 4 +++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 0a787c366..cfcba2d17 100644
--- a/README.md
+++ b/README.md
@@ -97,7 +97,7 @@ jumppad up infra/dev/all.hcl
 
 to start the dev environment including tango.
 
-Nomad is now available at http://localhost:4646/
+Nomad is now available at http://localhost:4646/ and Consul is available at http://192.168.73.16:8500/
 
 The development environment and its network can be stopped using
 
diff --git a/infra/dev/nomad/config/nomad/consul.hcl b/infra/dev/nomad/config/nomad/consul.hcl
index 5691997e9..88ae9b1ec 100644
--- a/infra/dev/nomad/config/nomad/consul.hcl
+++ b/infra/dev/nomad/config/nomad/consul.hcl
@@ -16,6 +16,10 @@ connect {
   enabled = true
 }
 
+ui_config {
+  enabled = true
+}
+
 retry_join              = ["192.168.76.1"]
 skip_leave_on_interrupt = true
 leave_on_terminate      = false
diff --git a/infra/dev/nomad/nomad.hcl b/infra/dev/nomad/nomad.hcl
index eab54d784..a3df67b18 100644
--- a/infra/dev/nomad/nomad.hcl
+++ b/infra/dev/nomad/nomad.hcl
@@ -14,7 +14,9 @@ resource "template" "consul_config" {
   server = true
 
   bootstrap_expect = 1
-  ui = true
+  ui_config {
+    enabled = true
+  }
 
   bind_addr = "0.0.0.0"
   client_addr = "127.0.0.1 {{GetInterfaceIP \"eth0\"}}"
-- 
GitLab


From 1d89a6aab0000efcfcb505e61417fd34a7bdc598 Mon Sep 17 00:00:00 2001
From: Reinder Kraaij <kraaij@astron.nl>
Date: Mon, 27 Jan 2025 16:29:09 +0100
Subject: [PATCH 2/4] resolve Merge confilct from  ui_config

---
 infra/dev/nomad/jobs/consul-agent.nomad | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/infra/dev/nomad/jobs/consul-agent.nomad b/infra/dev/nomad/jobs/consul-agent.nomad
index 1b79cc165..5d053bfe3 100644
--- a/infra/dev/nomad/jobs/consul-agent.nomad
+++ b/infra/dev/nomad/jobs/consul-agent.nomad
@@ -47,6 +47,10 @@ connect {
   enabled = true
 }
 
+ui_config {
+  enabled = true
+}
+
 retry_join              = ["192.168.76.1"]
 skip_leave_on_interrupt = true
 leave_on_terminate      = false
-- 
GitLab


From 89984cddba39da0b521c69ae0b27e6c7325d1c53 Mon Sep 17 00:00:00 2001
From: Reinder Kraaij <kraaij@astron.nl>
Date: Mon, 27 Jan 2025 16:37:18 +0100
Subject: [PATCH 3/4] Removed ui_config from nomad

---
 infra/dev/nomad/nomad.hcl | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/infra/dev/nomad/nomad.hcl b/infra/dev/nomad/nomad.hcl
index 0653c9331..9d85a7bda 100644
--- a/infra/dev/nomad/nomad.hcl
+++ b/infra/dev/nomad/nomad.hcl
@@ -14,10 +14,7 @@ resource "template" "consul_config" {
   server = true
 
   bootstrap_expect = 1
-  ui_config {
-    enabled = true
-  }
-
+ 
   bind_addr = "0.0.0.0"
   client_addr = "127.0.0.1 {{GetInterfaceIP \"eth0\"}}"
   advertise_addr = "{{GetInterfaceIP \"eth0\"}}"
-- 
GitLab


From 986a87f230b4c21d839319d5aa9318601d68c479 Mon Sep 17 00:00:00 2001
From: Reinder Kraaij <kraaij@astron.nl>
Date: Mon, 27 Jan 2025 19:31:55 +0100
Subject: [PATCH 4/4] make sure ui = true stays there

---
 infra/dev/nomad/nomad.hcl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/infra/dev/nomad/nomad.hcl b/infra/dev/nomad/nomad.hcl
index 9d85a7bda..e5b3f4e24 100644
--- a/infra/dev/nomad/nomad.hcl
+++ b/infra/dev/nomad/nomad.hcl
@@ -14,7 +14,8 @@ resource "template" "consul_config" {
   server = true
 
   bootstrap_expect = 1
- 
+  ui = true
+  
   bind_addr = "0.0.0.0"
   client_addr = "127.0.0.1 {{GetInterfaceIP \"eth0\"}}"
   advertise_addr = "{{GetInterfaceIP \"eth0\"}}"
-- 
GitLab