Skip to content

Commit

Permalink
Merge pull request #48 from indigo-dc/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
mtangaro authored Sep 20, 2019
2 parents 633104d + c9adb9d commit 0e53b04
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ env:
- distro: centos7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: ubuntu1404
init: /sbin/init
run_opts: ""
- distro: ubuntu1604
init: /lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ use_pbkdf2: true

# Galaxy login
require_login: "True"
allow_user_creation: "True"
allow_user_creation: "False"
allow_user_impersonation: "True"
new_user_dataset_access_role_default_private: "True"

Expand Down
1 change: 0 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ galaxy_info:
platforms:
- name: Ubuntu
versions:
- trusty
- xenial
- name: EL
versions:
Expand Down
2 changes: 1 addition & 1 deletion tasks/galaxy-startup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Galaxy startup recipe

- include: install_galaxyctl.yml
- include: galaxyctl.yml

- name: Copy Galaxy startup script
template:
Expand Down
21 changes: 21 additions & 0 deletions tasks/install_galaxyctl.yml → tasks/galaxyctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,24 @@
- { section: 'galaxy', option: 'galaxyctl_log_file', value: '{{ galaxy_log_path }}/galaxyctl.log' }
become_user: root
become_method: sudo

- name: Create api virtual environment
pip:
requirements: '{{ galaxyctl_path }}/api/requirements.txt'
virtualenv: '{{ galaxyctl_path }}/api/venv'

- name: Copy systemd unit file
copy:
src: '{{ galaxyctl_path }}/api/gunicorn/galaxyctl-api.service'
dest: '/etc/systemd/system/galaxyctl-api.service'
remote_src: yes
become_user: root
become_method: sudo

- name: Start and enable galaxyyctl_api
service:
name: galaxyctl-api
state: started
enabled: yes
become_user: root
become_method: sudo
28 changes: 25 additions & 3 deletions tasks/supervisor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

#______________________________________
# Change supervisord.sock ownership
- name: 'Grant {{ galaxy_user }} supervisor access'
- name: '[VM] Grant {{ galaxy_user }} supervisor access'
ini_file:
dest: '{{ supervisord_conf_path }}/supervisord.conf'
section: '{{ item.section }}'
Expand All @@ -75,17 +75,39 @@
with_items:
- { section: 'unix_http_server', option: 'chmod', value: '0770' }
- { section: 'unix_http_server', option: 'chown', value: 'root:{{ galaxy_user }}' }
when:
- ansible_virtualization_type != "docker"
become_user: root
become_method: sudo

- name: Edit supervisor.sock directory permissions
- name: '[VM] Edit supervisor.sock directory permissions'
file:
path: /var/run/supervisor
state: directory
mode: 0755
become_user: root
become_method: sudo
when: ansible_os_family == "RedHat"
when:
- ansible_virtualization_type != "docker"
- ansible_os_family == "RedHat"

- name: '[Docker] Switch from socket file to http for supervisor'
replace:
dest: '{{ supervisord_conf_path }}/supervisord.conf'
regexp: '{{ item.regexp }}'
replace: '{{ item.replace }}'
with_items:
- { regexp: '[unix_http_server]', replace: ';[unix_http_server]' }
- { regexp: 'file=/var/run/supervisor/supervisor.sock ; (the path to the socket file)', replace: ';file=/var/run/supervisor/supervisor.sock ; (the path to the socket file)' }
- { regexp: 'serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL for a unix socket', replace: ';serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL for a unix socket' }
- { regexp: ';[inet_http_server] ; inet (TCP) server disabled by default', replace: '[inet_http_server]' }
- { regexp: ';port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface)', replace: 'port=127.0.0.1:30901' }
- { regexp: ';serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket', replace: 'serverurl=http://127.0.0.1:30901' }
become_user: root
become_method: sudo
when:
- ansible_virtualization_type == "docker"
- ansible_os_family == "RedHat"

#______________________________________
# Supervisord systemd unit file
Expand Down
4 changes: 3 additions & 1 deletion templates/job_conf.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
</handlers>
{%if galaxy_lrms == "slurm"%}
<destinations default="slurm">
<destination id="slurm" runner="slurm" tags="mycluster" />
<destination id="slurm" runner="slurm" tags="mycluster" >
<param id="nativeSpecification">--nodes=1 --ntasks={{galaxy_workers}}</param>
</destination>
{% else %}
<destinations>
{% endif %}
Expand Down

0 comments on commit 0e53b04

Please sign in to comment.