diff --git a/ansible/roles/condor/files/condor.service b/ansible/roles/condor/files/condor.service new file mode 100644 index 000000000..7d189405b --- /dev/null +++ b/ansible/roles/condor/files/condor.service @@ -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 diff --git a/ansible/roles/condor/tasks/main.yml b/ansible/roles/condor/tasks/main.yml index 5d4ca8037..4c3c9622a 100644 --- a/ansible/roles/condor/tasks/main.yml +++ b/ansible/roles/condor/tasks/main.yml @@ -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 diff --git a/ansible/roles/de-jex/meta/main.yaml b/ansible/roles/de-jex/meta/main.yaml index 3c2102149..048236225 100644 --- a/ansible/roles/de-jex/meta/main.yaml +++ b/ansible/roles/de-jex/meta/main.yaml @@ -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 diff --git a/ansible/roles/de-jex/tasks/main.yaml b/ansible/roles/de-jex/tasks/main.yaml index b6e91a731..0e7002437 100644 --- a/ansible/roles/de-jex/tasks/main.yaml +++ b/ansible/roles/de-jex/tasks/main.yaml @@ -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: @@ -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 diff --git a/ansible/roles/de-jex/templates/jex.properties.j2 b/ansible/roles/de-jex/templates/jex.properties.j2 new file mode 100644 index 000000000..4b1b4eadb --- /dev/null +++ b/ansible/roles/de-jex/templates/jex.properties.j2 @@ -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