Skip to content

Commit 412c8f9

Browse files
committed
Merge pull request #8 from SeqWare/feature/docker_automated_build
Feature/docker automated build
2 parents f7adfcd + 6506dc2 commit 412c8f9

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

roles/grid-engine/tasks/master.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
- name: SGE | Template act_qmaster
1111
template: src=act_qmaster.j2 dest=/var/lib/gridengine/default/common/act_qmaster
12+
when: docker is not defined
1213

1314
- name: SGE | Ensure gridengine-master started
1415
service: name=gridengine-master state=started
@@ -17,14 +18,17 @@
1718
command: qconf -as {{ inventory_hostname }}
1819
register: configure_master_as
1920
changed_when: not 'already exists' in configure_master_as.stderr
21+
when: docker is not defined
2022

2123
- name: SGE | Make a directory for our SGE templates
2224
file: state=directory path=/etc/gridengine/templates mode=0744
25+
when: docker is not defined
2326

2427
# setup memory as a consumable resource
2528
- name: SGE | Template memory configuration file
2629
template: src=sc.j2 dest=/etc/gridengine/templates/sge_sc
2730
register: memory_template
31+
when: docker is not defined
2832

2933
- name: SGE | Setup memory as consumable resource
3034
command: qconf -Mc /etc/gridengine/templates/sge_sc
@@ -38,30 +42,31 @@
3842
shell: qconf -su users | grep -E "^entries" | cut -f2 -d " "
3943
register: sge_current_users
4044
changed_when: false
45+
when: docker is not defined
4146

4247
- name: SGE | Add the capsid user
4348
command: qconf -au capsid users
44-
when: not 'capsid' in sge_current_users.stdout.split(',')
49+
when: docker is not defined and not 'capsid' in sge_current_users.stdout.split(',')
4550

4651
# loop through and template worker hosts
4752
- name: SGE | Generate execution host templates
4853
template: src=execution_host.j2 dest=/etc/gridengine/templates/sge_execution_host_{{ item }}.sh mode=0555
49-
when: not single_node
54+
when: not single_node and docker is not defined
5055
with_items: groups.worker
5156
register: execution_host_template
5257

5358
# loop through and setup worker hosts, if this was better it would modify existing hosts as well instead of ignoring errors
5459
- name: SGE | Add worker hosts as execution hosts
5560
shell: export EDITOR=/etc/gridengine/templates/sge_execution_host_{{ item }}.sh && qconf -ae ; qconf -me {{ item }}
5661
with_items: groups.worker
57-
when: execution_host_template.changed
62+
when: execution_host_template.changed
5863
ignore_errors: yes
5964

6065
# add the master as an execution host if we only have one node
6166
- name: SGE | Single node execution host templates
6267
template: src=execution_selfhost.j2 dest=/etc/gridengine/templates/sge_execution_host_master.sh mode=0555
6368
register: execution_host_template
64-
when: single_node
69+
when: single_node and docker is not defined
6570

6671
- name: SGE | Single node host as execution host
6772
shell: export EDITOR=/etc/gridengine/templates/sge_execution_host_master.sh && qconf -ae ; qconf -me master
@@ -74,35 +79,39 @@
7479
ignore_errors: yes
7580
register: sge_current_host_groups
7681
changed_when: false
82+
when: docker is not defined
7783

7884
# The template now handles the hostlist properly
7985
- name: SGE | Template host group configuration
8086
template: src=ahgrp.j2 dest=/etc/gridengine/templates/sge_ahgrp
81-
when: not '@allhosts' in sge_current_host_groups.stdout_lines
87+
when: docker is not defined and not '@allhosts' in sge_current_host_groups.stdout_lines
8288

8389
- name: SGE | Add the host group configuration
8490
command: qconf -Ahgrp /etc/gridengine/templates/sge_ahgrp
85-
when: not '@allhosts' in sge_current_host_groups.stdout_lines
91+
when: docker is not defined and not '@allhosts' in sge_current_host_groups.stdout_lines
8692

8793
# Again, we don't want to do this if it already exists
8894
- name: SGE | Check current queues
8995
command: qconf -sql
9096
ignore_errors: yes
9197
register: sge_current_queues
9298
changed_when: false
99+
when: docker is not defined
93100

94101
# template handles hostlist, worker queue slots, target load average
95102
- name: SGE | Template main queue
96103
template: src=aq.j2 dest=/etc/gridengine/templates/sge_aq
97104
register: main_queue_template
105+
when: docker is not defined
98106

99107
- name: SGE | Add main queue
100108
command: qconf -Aq /etc/gridengine/templates/sge_aq
101-
when: not 'main.q' in sge_current_queues.stdout_lines
109+
when: docker is not defined and not 'main.q' in sge_current_queues.stdout_lines
102110

103111
- name: SGE | Template modify queue
104112
template: src=mq.j2 dest=/etc/gridengine/templates/sge_mq.sh mode=0555
105113
register: modify_main_queue_template
114+
when: docker is not defined
106115

107116
- name: SGE | Modify main queue
108117
shell: export EDITOR=/etc/gridengine/templates/sge_mq.sh && qconf -mq main.q
@@ -111,20 +120,21 @@
111120
- name: SGE | Check parallel environment status
112121
command: qconf -sp serial
113122
ignore_errors: yes
114-
when: grid_engine_master == True
123+
when: grid_engine_master == True and docker is not defined
115124
register: sge_parallel_env
116125
changed_when: false
117126

118127
- name: SGE | Template serial parallel environment file
119128
template: src=serial_profile.j2 dest=/etc/gridengine/templates/sge_serial_profile
120129
register: serial_profile
130+
when: docker is not defined
121131

122132
# Again, if this was better, we would re-create the environment if there were changes in the template
123133
- name: SGE | Setup serial profile environment
124134
command: "{{ item }}"
125135
with_items:
126136
- qconf -Ap /etc/gridengine/templates/sge_serial_profile
127137
- qconf -aattr queue pe_list serial main.q
128-
when: "'serial is not a parallel environment' in sge_parallel_env.stderr or serial_profile.changed"
138+
when: "docker is not defined and 'serial is not a parallel environment' in sge_parallel_env.stderr or docker is not defined and serial_profile.changed"
129139

130140
# TODO: bindle 1.2.1 re-runs the sge setup script on reboot. Determine whether this is really needed

roles/seqware-master-infrastructure/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,14 @@
297297
- name: NFS Restart
298298
service: name=rpcbind state=restarted
299299
when: nfs_setup.changed
300+
ignore_errors: yes
301+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'
302+
303+
- name: NFS Restart
304+
service: name=portmap state=restarted
305+
when: nfs_setup.changed
306+
ignore_errors: yes
307+
when: ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'precise'
300308

301309
- name: NFS Restart
302310
service: name=nfs-kernel-server state=restarted

0 commit comments

Comments
 (0)