Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Commit

Permalink
#6 update condor systemd file and playbook, place jex.properties as s…
Browse files Browse the repository at this point in the history
…tandard template, require java-1.8
  • Loading branch information
donsizemore committed Mar 14, 2016
1 parent bcb0eac commit 819036a
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 9 deletions.
20 changes: 20 additions & 0 deletions ansible/roles/condor/files/condor.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=Condor Distributed High-Throughput-Computing
After=syslog.target network.target
Wants=network.target

[Service]
User=condor
Group=condor
EnvironmentFile=-/etc/sysconfig/condor
ExecStart=/usr/sbin/condor_master -f
ExecStop=/usr/sbin/condor_off -master
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=5
StandardOutput=syslog
LimitNOFILE=16384
ControlGroup=/condor

[Install]
WantedBy=multi-user.target
10 changes: 9 additions & 1 deletion ansible/roles/condor/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@

- name: create cred_dir
sudo: yes
file: path="{{ condor.cred_dir }}" state=directory owner=condor group=condor mode=0755
file: path="{{condor.cred_dir}}" state=directory owner=condor group=condor mode=0755

- name: place condor systemd.file so condor doesn't run as root
sudo: yes
copy: src=condor.service dest=/usr/lib/systemd/system/ owner=root group=root mode=0644

- name: reload systemd
sudo: yes
shell: "systemctl daemon-reload"

- name: restart condor
sudo: yes
Expand Down
17 changes: 9 additions & 8 deletions ansible/roles/de-jex/meta/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ dependencies:
- condor
- condor-submitter

- role: util-cfg-systemd-unit
service_name_short: "{{jex.service_name_short}}"
tags:
- jex
- role: util-cfg-service
service_name_short: "{{jex.service_name_short}}"
tags:
- jex
# this errors out, just drop the template in instead.
#- role: util-cfg-systemd-unit
# service_name_short: "{{jex.service_name_short}}"
# tags:
# - jex
#- role: util-cfg-service
# service_name_short: "{{jex.service_name_short}}"
# tags:
# - jex
12 changes: 12 additions & 0 deletions ansible/roles/de-jex/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---

- name: ensure java-1.8.0-openjdk-headless
yum: name=java-1.8.0-openjdk-headless state=latest
tags:
- jex

- name: create /var/log/jex
file: path=/var/log/jex owner=condor group=condor mode=0777 state=directory
tags:
Expand Down Expand Up @@ -58,3 +64,9 @@
tags:
- jex
- config

- name: place jex.properties
template: src=jex.properties.j2 dest=/etc/iplant/de/jex.properties owner=root group=root mode=0644
tags:
- jex
- config
23 changes: 23 additions & 0 deletions ansible/roles/de-jex/templates/jex.properties.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
jar-path = /usr/local/lib/porklock/porklock-standalone.jar
porklock-tag = {{ docker.tag }}
nfs-base = {{ jex.nfs_base }}
irods-base = {{ irods.home }}
irods-user = {{ irods.user }}
irods-pass = {{ irods.password }}
irods-host = {{ irods.host }}
irods-port = {{ irods.port }}
irods-zone = {{ irods.zone }}
irods-resc = {{ irods.default_resource }}
icommands-path = {{ jex.icommands_path }}
condor-log-path = /tmp/
listen-port = {{ jex.port }}
filter-files = .job.ad,.machine.ad,_condor_stderr,_condor_stdout,condor_exec.exe,.chirp_config,.chirp.config,logs/output-last-stdout,logs/output-last-stderr
run-on-nfs = false
request-disk = {{ jex.request_disk }}
batch-group = {{ jex.batch_group }}
jex-events = {{ jexevents.base }}
condor-config = /etc/condor/condor_config
path = /opt/condor/bin/:/usr/bin/:/usr/local/bin/:/bin/
log-file = /var/log/jex/jex.log
log-level = warn
log-backup = 10

0 comments on commit 819036a

Please sign in to comment.