Compare commits

..

2 Commits

Author SHA1 Message Date
4c63f2a825 fix: slurm host system access 2021-07-06 15:14:33 +02:00
51390bb321 improved file loading 2021-07-06 14:54:18 +02:00
4 changed files with 19 additions and 16 deletions

View File

@@ -43,6 +43,7 @@
# containers runtime name (not hostname supplied!) and netname is # containers runtime name (not hostname supplied!) and netname is
# the network name in host environment. We should run our own dns... # the network name in host environment. We should run our own dns...
docker_network: slurm docker_network: slurm
slurm_hostsystem_cluster_access: True
when: '"slurm" in group_names' when: '"slurm" in group_names'
tags: slurm, cobald, influxdb, slurm-config tags: slurm, cobald, influxdb, slurm-config
# tags: cobald requires some slurm facts, so cobald tag is included here # tags: cobald requires some slurm facts, so cobald tag is included here

View File

@@ -10,15 +10,16 @@
slurm_image_prefix: cobald slurm_image_prefix: cobald
image_name: "{{cobald_image_tag}}" image_name: "{{cobald_image_tag}}"
dockerfile: "{{ lookup('template', 'cobald.Dockerfile') }}" dockerfile: "{{ lookup('template', 'cobald.Dockerfile') }}"
files: files_list:
- dest: cobald-entrypoint.sh - cobald-entrypoint.sh
content: "{{ lookup('file', 'cobald-entrypoint.sh') }}" - init-cobaldmodules.sh
- dest: init-cobaldmodules.sh - start-drone
content: "{{ lookup('file', 'init-cobaldmodules.sh') }}" - 28-sync-container-slurmd
- dest: start-drone files: "
content: "{{ lookup('file', 'start-drone') }}" {%- set files = [] -%} {%- for i in files_list -%}
- dest: 28-sync-container-slurmd {%- set files = files.append(
content: "{{ lookup('file', '28-sync-container-slurmd') }}" { 'dest': i, 'content': lookup('file', i) }) -%}
{%- endfor %}{{ files }}"
when: cobald_slurm | default(False) when: cobald_slurm | default(False)
- name: build generic cobald docker image - name: build generic cobald docker image

View File

@@ -1,3 +1,6 @@
# TODO: this does not work quite right since slurm-ctl does not reach the host
# system. sinfo, scontrol etc. work but srun does not!
- name: "get addresses from docker network" - name: "get addresses from docker network"
docker_network_info: docker_network_info:
name: "{{ docker_network }}" name: "{{ docker_network }}"
@@ -28,4 +31,5 @@
- name: start munge locally - name: start munge locally
service: service:
name: munge name: munge
enabled: True
state: started state: started

View File

@@ -92,18 +92,11 @@
notify: reconfigure slurm notify: reconfigure slurm
tags: slurm-config tags: slurm-config
- import_tasks: host-config.yml
when: slurm_hostsystem_cluster_access | default(False)
- name: "create docker volume for shared access between nodes" - name: "create docker volume for shared access between nodes"
docker_volume: docker_volume:
name: slurm-shared name: slurm-shared
state: present state: present
# 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.
- name: run slurm docker containers - name: run slurm docker containers
docker_container: docker_container:
name: "{{ slurm_prefix }}-{{ item.machine }}" name: "{{ slurm_prefix }}-{{ item.machine }}"
@@ -130,6 +123,10 @@
label: "{{slurm_prefix}}-{{ item.machine }}" label: "{{slurm_prefix}}-{{ item.machine }}"
tags: slurm-config tags: slurm-config
- name: configure host system to integrate into slurm cluster
import_tasks: host-config.yml
when: slurm_hostsystem_cluster_access | default(False)
- name: export facts about slurm cluster to be used by other modules - name: export facts about slurm cluster to be used by other modules
set_fact: set_fact:
slurm: slurm: