new startup for cobald containers
This commit is contained in:
@@ -5,8 +5,17 @@
|
||||
|
||||
- include_tasks: dockerimage.yml
|
||||
loop:
|
||||
- slurmctld
|
||||
- slurmd
|
||||
- name: slurmctld
|
||||
start:
|
||||
- 10-munge
|
||||
- 20-slurmctld
|
||||
- name: slurmd
|
||||
start:
|
||||
- 10-munge
|
||||
- 30-slurmd
|
||||
loop_control:
|
||||
loop_var: image
|
||||
label: "{{ image.name }}"
|
||||
|
||||
- name: generate munge key
|
||||
shell:
|
||||
@@ -63,13 +72,14 @@
|
||||
- set_fact:
|
||||
slurm_nodes: # default nodes: controller and submit machine
|
||||
- machine: ctl
|
||||
image: slurm-slurmctld
|
||||
image: slurm:slurmctld
|
||||
exposed_ports: [ "6817:6817/tcp" ]
|
||||
- machine: submit1
|
||||
image: slurm-slurmd
|
||||
image: slurm:slurmd
|
||||
extra_mounts:
|
||||
- "/home/{{unpriv_user}}/job3/:/mnt/:rw"
|
||||
tags: [ slurm-config ]
|
||||
|
||||
|
||||
# TODO: reserve some address using docker_network_info and assign as aux
|
||||
# address to enable slurmctld to get a static address in order to be
|
||||
# reachable from slurm running on docker host to enable submitting jobs.
|
||||
@@ -80,6 +90,7 @@
|
||||
hostname: "slurm-{{item.machine}}"
|
||||
domainname: "slurm.local"
|
||||
volumes: "{{default_mounts + ( item.extra_mounts | default([]) ) }}"
|
||||
ports: "{{ item.exposed_ports | default([]) }}"
|
||||
networks:
|
||||
- name: "slurm"
|
||||
env:
|
||||
@@ -90,15 +101,16 @@
|
||||
cleanup: True
|
||||
privileged: "{{ container_privileged | bool }}"
|
||||
networks_cli_compatible: True
|
||||
interactive: True
|
||||
vars:
|
||||
default_mounts:
|
||||
- /container/volumes/slurm/:/etc/slurm/:rw
|
||||
- /container/volumes/munge/munge.key:/etc/munge/munge.key:rw
|
||||
- slurm-shared:/shared/:rw
|
||||
slurm_nodes_all: | # add execute nodes
|
||||
{% for i in range(1, 4) -%}
|
||||
{% for i in range(1, num_nodes+1) -%}
|
||||
{% set _ = slurm_nodes.extend([
|
||||
{'machine':'exec%s'|format(i), 'image': 'slurm-slurmd'}]) -%}
|
||||
{'machine':'exec%s'|format(i), 'image': 'slurm:slurmd'}]) -%}
|
||||
{%- endfor %}
|
||||
{{ slurm_nodes }}
|
||||
loop: "{{slurm_nodes_all}}"
|
||||
|
Reference in New Issue
Block a user