Skip to content

Commit d329705

Browse files
committed
add el10 support
1 parent 582f2cb commit d329705

4 files changed

Lines changed: 34 additions & 17 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ paprikant.beacon
55
```yaml
66

77
script_user: beacon-import
8-
script_dir: /opt/beacon-import/
8+
script_dir: /opt/beacon-import/
99

1010
galaxy_api_key: 123213hiufho12h31h321
1111
galaxy_api_url: usegalaxy.eu

files/beacon-import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3.9
1+
#!/usr/bin/env python3
22
"""Pushes genomic variant information from a galaxy to a beacon instance.
33
44
Usage:

files/requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
argparse
22
asyncio
3-
asyncpg
43
datetime
54
dataclasses
6-
numpy
75
typing
8-
git+https://github.com/CSCfi/beacon-python
6+
asyncpg>=0.28.0
7+
numpy
98
bioblend
10-
cyvcf2
11-
9+
cyvcf2>=0.32.1
10+
aiohttp>=3.8.6
11+
uvloop>=0.17.0

tasks/main.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
---
21
# tasks file for beacon
32
#
4-
53
- name: Install python
64
ansible.builtin.package:
75
name: "{{ item }}"
86
state: present
97
loop:
10-
- python39
8+
- python3
119
- python3-pip
1210
- python3-setuptools
13-
11+
- python3-devel
12+
- gcc
1413

1514
- name: Install cronie
1615
ansible.builtin.package:
1716
name: cronie
1817
state: present
1918

20-
- name: Ensure script user exists
19+
- name: Ensure script user exists
2120
ansible.builtin.user:
2221
name: "{{ script_user }}"
2322
create_home: true
@@ -40,24 +39,42 @@
4039
ansible.builtin.package:
4140
name: git
4241
state: present
43-
4442
# this is no mistake
43+
44+
- name: Create virtualenv and bootstrap pip tooling
45+
ansible.builtin.pip:
46+
name:
47+
- pip
48+
- setuptools
49+
- wheel
50+
state: latest
51+
virtualenv: "{{ script_dir }}/venv"
52+
virtualenv_command: /usr/bin/python3 -m venv
53+
54+
- name: Install beacon-python without deps
55+
ansible.builtin.pip:
56+
name: "git+https://github.com/CSCfi/beacon-python"
57+
extra_args: "--no-deps"
58+
virtualenv: "{{ script_dir }}/venv"
59+
virtualenv_command: /usr/bin/python3 -m venv
60+
4561
- name: Install python deps
4662
ansible.builtin.pip:
4763
requirements: "{{ script_dir }}/requirements.txt"
48-
executable: /usr/bin/pip3.9
64+
virtualenv: "{{ script_dir }}/venv"
65+
virtualenv_command: /usr/bin/python3 -m venv
4966

50-
- name: Create a cronjob for daily executions
67+
- name: Create a cronjob for daily executions
5168
ansible.builtin.cron:
5269
user: "{{ script_user }}"
5370
name: "check dirs"
5471
minute: "0"
5572
hour: "5"
56-
job: "{{ script_dir }}/beacon-import.py -k {{ galaxy_api_key }} -u {{ galaxy_api_url }} rebuild -H {{ beacon_db_host }} -P {{ beacon_db_port }} -U {{beacon_db_user }} -W {{ beacon_db_password }} -N {{ beacon_db_name }} || touch /tmp/job_error"
73+
job: "{{ script_dir }}/venv/bin/python {{ script_dir }}/beacon-import.py -k {{ galaxy_api_key }} -u {{ galaxy_api_url }} rebuild -H {{ beacon_db_host }} -P {{ beacon_db_port }} -U {{ beacon_db_user }} -W {{ beacon_db_password }} -N {{ beacon_db_name }} || touch /tmp/job_error"
5774

5875
- name: Make sure crond is started and enabled
5976
ansible.builtin.systemd:
60-
name: crond
77+
name: crond
6178
state: started
6279
enabled: yes
6380

0 commit comments

Comments
 (0)