File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ paprikant.beacon
55``` yaml
66
77script_user : beacon-import
8- script_dir : /opt/beacon-import/
8+ script_dir : /opt/beacon-import/
99
1010galaxy_api_key : 123213hiufho12h31h321
1111galaxy_api_url : usegalaxy.eu
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python3.9
1+ #!/usr/bin/env python3
22"""Pushes genomic variant information from a galaxy to a beacon instance.
33
44Usage:
Original file line number Diff line number Diff line change 11argparse
22asyncio
3- asyncpg
43datetime
54dataclasses
6- numpy
75typing
8- git+https://github.com/CSCfi/beacon-python
6+ asyncpg >= 0.28.0
7+ numpy
98bioblend
10- cyvcf2
11-
9+ cyvcf2 >= 0.32.1
10+ aiohttp >= 3.8.6
11+ uvloop >= 0.17.0
Original file line number Diff line number Diff line change 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
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
You can’t perform that action at this time.
0 commit comments