Skip to content

Commit 35c26ee

Browse files
author
Bjarke Johannesen
committed
support for running from scratch
1 parent b3c3449 commit 35c26ee

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

install-migrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
- stop_logging
1313
- umount_encrypt_state
1414
- migrid_logrotate
15-
- migrid_clean
1615
- migrid_users
16+
- migrid_clean
1717
- copy_overlay_files
1818
- migrid_baseline
1919
- setup_env

roles/connect_lustre/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
This role aims to connect the deployed migrid application to a configured lustre filesystem.
44
Therefore it can mount the lustre filesystem and link state directory for migrid to it.
55
See `defaults/` for variables.
6+
7+
If you are running `install-migrid.yml` on a system from scratch (empty no installation ever), then you might encounter an error when getting to `ucphhpc.docker_migrid.connect_lustre : Mount Lustre directory`. This is because lnet is not setup, reboot server and rerun `install-migrid.yml`

roles/migrid_clean/tasks/main.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
# clean up directories before doing anything is a good thing.. aah the fresh smell of clean :)
22
---
3+
4+
# this will be use if you run from scratch
5+
- name: Create directory for MiGrid
6+
ansible.builtin.file:
7+
path: "{{ migrid_root }}"
8+
owner: "{{ migrid_adm }}"
9+
group: "{{ migrid_adm }}"
10+
state: directory
11+
12+
#check if Makefile exists, this will only be a problem when running from scratch
13+
- name: check if Makefile exists
14+
ansible.builtin.stat:
15+
path: "{{ migrid_root }}/Makefile"
16+
register: dorunmake
17+
318
- name: Run make clean to remove anything already built
419
shell:
520
cmd: make clean > make-clean.log 2>&1
621
chdir: "{{ migrid_root }}"
722
when:
23+
- dorunmake.stat.exists
824
- migrid_clean_remove_app_root == false
925
- migrid_make_clean == true
1026

@@ -24,13 +40,17 @@
2440
shell:
2541
cmd: make dockerclean > clean.log 2>&1
2642
chdir: "{{ migrid_root }}"
27-
when: migrid_clean_docker_prune_all == true
43+
when:
44+
- dorunmake.stat.exists
45+
- migrid_clean_docker_prune_all == true
2846

2947
- name: Run make dockervolumeclean
3048
shell:
3149
cmd: make dockervolumeclean >> clean.log 2>&1
3250
chdir: "{{ migrid_root }}"
33-
when: migrid_clean_docker_prune_all == true
51+
when:
52+
- dorunmake.stat.exists
53+
- migrid_clean_docker_prune_all == true
3454

3555
- name: Remove {{ migrid_overlay }}
3656
file:

0 commit comments

Comments
 (0)