Skip to content

Commit

Permalink
Fix nomad join
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Apr 25, 2024
1 parent 0595526 commit 8feca42
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
6 changes: 4 additions & 2 deletions artifacts/lrms/nomad_ai4eosc_fe_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
pre_tasks:
- name: Convert server_list to list
set_fact:
server_list: [server_list]
server_list:
- "{{ server_list }}"
when:
- consul_server_join is not defined or consul_server_join == ''
- server_list is string

- name: Use consul_server_join to join the consul cluster
set_fact:
server_list: [consul_server_join]
server_list:
- "{{ consul_server_join }}"
when: consul_server_join is defined and consul_server_join != ''
roles:
- role: 'grycap.consul'
Expand Down
14 changes: 12 additions & 2 deletions artifacts/lrms/nomad_ai4eosc_wn_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@
pre_tasks:
- name: Convert server_list to list
set_fact:
server_list: [server_list]
when: server_list is string
server_list:
- "{{ server_list }}"
when:
- consul_server_join is not defined or consul_server_join == ''
- server_list is string

- name: Use consul_server_join to join the consul cluster
set_fact:
server_list:
- "{{ consul_server_join }}"
when: consul_server_join is defined and consul_server_join != ''

- name: Set nomad plugins var
set_fact:
nomad_plugins_var:
Expand Down
6 changes: 6 additions & 0 deletions templates/nomad_join_ai4eosc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ topology_template:
nomad_server_list: { get_attribute: [ front, private_address ] }
nomad_version: { get_input: nomad_version }
consul_version: { get_input: consul_version }
consul_certs_url: { get_input: consul_cert_url }
nomad_certs_url: { get_input: nomad_cert_url }
consul_server_join: { get_input: consul_server_join }

wn_pub:
type: tosca.nodes.indigo.Compute
Expand Down Expand Up @@ -332,6 +335,9 @@ topology_template:
nomad_version: { get_input: nomad_version }
consul_version: { get_input: consul_version }
nomad_nvidia_support: true
consul_certs_url: { get_input: consul_cert_url }
nomad_certs_url: { get_input: nomad_cert_url }
consul_server_join: { get_input: consul_server_join }

wn_gpu:
type: tosca.nodes.indigo.Compute
Expand Down

0 comments on commit 8feca42

Please sign in to comment.