-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuserdata.yaml.j2
111 lines (104 loc) · 3.69 KB
/
userdata.yaml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#cloud-config
write_files:
- content: |
# BEGIN MANAGED BLOCK
COLLECTOR_HOST = {{ htcondor.host }}
CONDOR_HOST = usegalaxy-it
ALLOW_WRITE = *
ALLOW_READ = $(ALLOW_WRITE)
ALLOW_ADMINISTRATOR = *
ALLOW_NEGOTIATOR = $(ALLOW_ADMINISTRATOR)
ALLOW_CONFIG = $(ALLOW_ADMINISTRATOR)
ALLOW_DAEMON = $(ALLOW_ADMINISTRATOR)
ALLOW_OWNER = $(ALLOW_ADMINISTRATOR)
ALLOW_CLIENT = *
DAEMON_LIST = MASTER, SCHEDD, STARTD
FILESYSTEM_DOMAIN = usegalaxy-it
UID_DOMAIN = usegalaxy-it
TRUST_UID_DOMAIN = True
SOFT_UID_DOMAIN = True
# run with partitionable slots
CLAIM_PARTITIONABLE_LEFTOVERS = True
NUM_SLOTS = 1
NUM_SLOTS_TYPE_1 = 1
SLOT_TYPE_1 = 100%
SLOT_TYPE_1_PARTITIONABLE = True
ALLOW_PSLOT_PREEMPTION = False
STARTD.PROPORTIONAL_SWAP_ASSIGNMENT = True
# END MANAGED BLOCK
GalaxyTraining = True
GalaxyGroup = "compute"
GalaxyCluster = none
GalaxyDockerHack = False
STARTD_ATTRS = GalaxyTraining, GalaxyGroup, GalaxyCluster, GalaxyDockerHack
Rank = StringListMember(MY.GalaxyGroup, TARGET.Group)
owner: root:root
path: /etc/condor/condor_config.local
permissions: '0644'
- content: |
[[outputs.influxdb]]
urls = ["https://influxdb.galaxyproject.eu:8086"]
database = "{{ influxdb.database }}"
username = "{{ influxdb.username }}"
password = "{{ influxdb.password }}"
owner: telegraf:telegraf
path: /etc/telegraf/telegraf.d/output.conf
permissions: "0640"
- content: |
/data /etc/auto.data nfsvers=3
/- /etc/auto.usrlocal nfsvers=3
owner: root:root
path: /etc/auto.master.d/data.autofs
permissions: "0644"
- content: |
/data/share -rw,hard,intr,nosuid,quota,nfs,nfsvers=4,minorversion=2 172.18.12.115:/data/share
owner: root:root
path: /etc/auto.data
permissions: "0644"
- content: |
/opt/galaxy -rw,hard,intr,nosuid,quota,nfs,nfsvers=4,minorversion=2 172.18.12.115:/opt/galaxy
owner: root:root
path: /etc/auto.usrlocal
permissions: "0644"
- content: |
- name: Install HTCondor executor node
become: true
hosts: all
connection: local
roles:
- role: ansible-htcondor-grycap
vars:
htcondor_version: "10.x"
htcondor_type_of_node: "execute"
htcondor_role_manager: false
htcondor_role_submit: false
htcondor_role_execute: true
htcondor_copy_template: false
htcondor_host: "{{ htcondor.host }}"
htcondor_password: "{{ htcondor.password }}"
tasks:
- name: Disable pulsar
systemd:
name: pulsar
state: stopped
- name: Ensure password directory exists
file:
path: /etc/condor/passwords.d
state: directory
owner: condor
group: condor
mode: '0755'
- name: Restart HTCondor service
service:
name: condor
state: restarted
owner: centos:centos
path: /home/centos/condor.yml
permissions: "0644"
runcmd:
- echo "test" > /home/centos/test.text
- chown centos:centos /home/centos/test.text
- mkdir -p /home/centos/roles
- chown -R centos:centos /home/centos/roles
- su - centos -c 'ansible-galaxy install -p /home/centos/roles "git+https://github.com/usegalaxy-eu/ansible-htcondor-grycap.git"' >> /var/log/ansible-galaxy.log 2>&1
- su - centos -c 'ansible-playbook -i "localhost," /home/centos/condor.yml' >> /var/log/ansible-playbook.log 2>&1