From bd5f31e5156a8a6fad5b35a5cf14d35fe4501f09 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 9 Jul 2024 11:42:53 +0200 Subject: [PATCH 1/2] Set consul public ip --- artifacts/lrms/nomad_ai4eosc_fe_install.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/artifacts/lrms/nomad_ai4eosc_fe_install.yml b/artifacts/lrms/nomad_ai4eosc_fe_install.yml index ea49685..816aa07 100644 --- a/artifacts/lrms/nomad_ai4eosc_fe_install.yml +++ b/artifacts/lrms/nomad_ai4eosc_fe_install.yml @@ -4,6 +4,7 @@ vars: server_list: "{{ nomad_server_list | default([ansible_default_ipv4.address]) }}" server_private_ip: "{{ IM_NODE_PRIVATE_IP | default(ansible_default_ipv4.address) }}" + server_public_ip: "{{ IM_NODE_PUBLIC_IP | default('') }}" launch_traefik: "{{ nomad_launch_traefik | default(false) }}" nvidia_support: false certs_url: "{{ consul_cert_url | default('') }}" @@ -160,9 +161,19 @@ - name: Set facts set_fact: - consul_public_ip: "{{ server_list[0] }}" + consul_servers_ip: "{{ server_list}}" + when: consul_join == '' + + - name: Set facts + set_fact: consul_servers_ip: "{{ [ consul_join ] }}" + when: consul_join != '' + + - name: Set facts + set_fact: + consul_public_ip: "{{ server_list[0] }}" my_ip: "{{ server_private_ip }}" + my_public_ip: "{{ server_public_ip }}" username: cloudadm path: /opt/cloudadm/ nomad_dc: "{{ nomad_input_dc | default('ifca-ai4eosc') }}" From deb9c1ec7a3b5ac3bf623945902b9b9910b0986d Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 9 Jul 2024 11:44:00 +0200 Subject: [PATCH 2/2] Set ports --- templates/nomad_ai4eosc.yaml | 18 ++++++++++++------ templates/nomad_ai4eosc_join.yaml | 24 ++++++++++++++++++------ 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/templates/nomad_ai4eosc.yaml b/templates/nomad_ai4eosc.yaml index 9a92184..d602bc7 100644 --- a/templates/nomad_ai4eosc.yaml +++ b/templates/nomad_ai4eosc.yaml @@ -172,6 +172,15 @@ topology_template: port_4646: protocol: tcp source: 4646 + port_4647: + protocol: tcp + source: 4647 + port_4648: + protocol: tcp + source: 4648 + port_4648u: + protocol: udp + source: 4648 port_8501: protocol: tcp source: 8501 @@ -184,12 +193,9 @@ topology_template: port_8302: protocol: tcp source: 8302 - port_80: - protocol: tcp - source: 80 - port_443: - protocol: tcp - source: 443 + port_8302u: + protocol: udp + source: 8302 requirements: - host: front interfaces: diff --git a/templates/nomad_ai4eosc_join.yaml b/templates/nomad_ai4eosc_join.yaml index 8514cba..ee485fd 100644 --- a/templates/nomad_ai4eosc_join.yaml +++ b/templates/nomad_ai4eosc_join.yaml @@ -188,18 +188,30 @@ topology_template: port_4646: protocol: tcp source: 4646 + port_4647: + protocol: tcp + source: 4647 + port_4648: + protocol: tcp + source: 4648 + port_4648u: + protocol: udp + source: 4648 port_8501: protocol: tcp source: 8501 - port_8302: + port_8300: protocol: tcp - source: 8302 - port_80: + source: 8300 + port_8301: protocol: tcp - source: 80 - port_443: + source: 8301 + port_8302: protocol: tcp - source: 443 + source: 8302 + port_8302u: + protocol: udp + source: 8302 requirements: - host: front interfaces: