Skip to content
Snippets Groups Projects
Commit d103c43b authored by Gallenkamp, Fabian's avatar Gallenkamp, Fabian
Browse files

allow customizing python version used, remove pre-release (-> use --pre in...

allow customizing python version used, remove pre-release (-> use --pre in requirements.txt instead)
parent e4c70e59
No related branches found
No related tags found
No related merge requests found
......@@ -61,36 +61,36 @@
when: item.value.override
# install python dependencies, otree and
# install python dependencies and
- name: install psycopg2
pip:
name: psycopg2
state: present
virtualenv: "/home/{{ item.key }}/.venv_otree"
virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv"
virtualenv_command: "{{ item.value.python_binary_path }} -m venv"
become: yes
become_user: "{{ item.key }}"
with_dict: "{{ otree_users }}"
when: item.value.override
- name: install otree
pip:
name: otree
state: present
extra_args: "{{ '--pre' if item.value.pre_release else '' }}"
virtualenv: "/home/{{ item.key }}/.venv_otree"
virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv"
become: yes
become_user: "{{ item.key }}"
with_dict: "{{ otree_users }}"
when: item.value.override
#- name: install otree
# pip:
# name: otree
# state: present
# extra_args: "{{ '--pre' if item.value.pre_release else '' }}"
# virtualenv: "/home/{{ item.key }}/.venv_otree"
# virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv"
# become: yes
# become_user: "{{ item.key }}"
# with_dict: "{{ otree_users }}"
# when: item.value.override
- name: install requirements if exists
pip:
state: present
requirements: "/home/{{ item.key }}/otree/requirements.txt"
virtualenv: "/home/{{ item.key }}/.venv_otree"
virtualenv_command: "/usr/bin/python{{ '3.7' if item.value.pre_release else '3'}} -m venv"
virtualenv_command: "{{ item.value.python_binary_path }} -m venv"
become: yes
become_user: "{{ item.key }}"
with_dict: "{{ otree_users }}"
......
......@@ -21,8 +21,6 @@ otree_users:
# linux username
override: yes
# should a existing otree environment be overriden
pre_release: no
# should the pre release version of otree be installed
redis: "redis://localhost:6379/1"
# redis queue. Note don't use a slot twice, there are 16 slots available (0-15)
database: "sqlite:////home/otree1/db.sqlite3"
......@@ -37,10 +35,13 @@ otree_users:
# LOG-LEVEL, set to None ("production: ") to enable further debug messages.
port: 8005
# port which is used by this instance
python_binary_path: "/usr/bin/python3.7"
# python binary used for otree installation
otree2:
override: no
app_repo: "https://github.com/oTree-org/oTree.git"
# optional: if set clone provided git repository instead of provided directory
pre_release: yes
redis: "redis://localhost:6379/2"
database: "sqlite:////home/otree2/db.sqlite3"
......@@ -49,6 +50,7 @@ otree_users:
secret_key: "sdfunlidsgjndrsgf"
production:
port: 8006
python_binary_path: "/usr/bin/python3.7"
ssl_certificate_path: "/etc/ssl/certs/{{ otree_domain }}.crt"
ssl_certificate_key_path: "/etc/ssl/private/{{ otree_domain }}.key"
......
......@@ -10,9 +10,9 @@
- python3-pip
- python3-dev
- python3-venv
- python3.7
- python3.7-dev
- python3.7-venv
# - python3.7
# - python3.7-dev
# - python3.7-venv
- python-psycopg2
- libpq-dev
- redis-server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment