Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up the use of SARC #21

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ clockwork_settings_items_per_page: 25
clockwork_settings_dark_mode: false
clockwork_settings_language: "en"

# SARC
# Install path for SARC code
sarc_install_path: /opt/sarc
# SARC Git repository
sarc_repo: 'https://github.com/mila-iqia/SARC.git'
# SARC commit to checkout
sarc_checkout_commit: "master"
# Port used to access the database
sarc_mongo_port: 8123


clockwork_config:
flask:
testing: false
Expand Down Expand Up @@ -167,3 +178,4 @@ clockwork_config:
nbr_items_per_page: "{{ clockwork_settings_items_per_page }}"
dark_mode: "{{ clockwork_settings_dark_mode }}"
language: "{{ clockwork_settings_language }}"

25 changes: 25 additions & 0 deletions tasks/setup_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,31 @@
state: directory
owner: "{{ clockwork_user }}"

# SARC

- name: Install git
ansible.builtin.apt:
pkg:
- git

- name: Copy SARC code from git
ansible.builtin.git:
repo: '{{ sarc_repo }}'
dest: '{{ sarc_install_path }}'
version: '{{ sarc_checkout_commit }}'
accept_newhostkey: yes

- name: Install Poetry
ansible.builtin.pip:
name: poetry

- name: Install SARC by using Poetry
ansible.builtin.command:
cmd: poetry install
chdir: "{{sarc_install_path}}/SARC/"

# LDAP

- name: Install ldap private key
ansible.builtin.copy:
content: "{{ clockwork_ldap_private_key }}"
Expand Down