# ansible script to setup multiple [otree](https://otree.readthedocs.io/en/latest/) instances with gninx reverse proxy and supervisor
# ansible script to setup multiple [otree](https://otree.readthedocs.io/en/latest/) instances with python env, gninx reverse proxy, supervisor and ufw
## preparation
## preparation
...
@@ -38,39 +38,41 @@
...
@@ -38,39 +38,41 @@
2. Adapt your (inventory-)config with ``nano ~/otree-ansible/group_vars/otree_servers.yml`` from the provided example accordingly (press "Strg-x", then "j" to save):
2. Adapt your (inventory-)config with ``nano ~/otree-ansible/group_vars/otree_servers.yml`` from the provided example accordingly (press "Strg-x", then "j" to save):
```
```
otree_master: "otree1"
# which otree instance should be delivered as default
# which otree instance should be delivered as default
otree_domain: "otree.company.org"
otree_master: "otree1"
# fqdn of the otree server
# fqdn of the otree server
otree_group_name: "otreeusers"
otree_domain: "otree.company.org"
# linux group for the otree users
# linux group for the otree users
otree_group_name: "otreeusers"
# dict of users for the available otree instances
otree_users:
otree_users:
# list of users for the available otree instances
# linux username and otree instance name
otree1:
otree1:
# linux username
override: yes
# should an existing otree environment be overriden
# should an existing otree environment be overriden
pre_release: no
override: yes
# 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)
# redis queue. Note don't use a slot twice, there are 16 slots available (0-15)
database: "sqlite:////home/otree1/db.sqlite3"
redis: "redis://localhost:6379/1"
# which database should be used. Examples: "postgres://USER:PASSWORD@HOST:PORT/NAME" or "sqlite:////home/user/db.sqlite3"
# which database should be used. Examples: "postgres://USER:PASSWORD@HOST:PORT/NAME" or "sqlite:////home/user/db.sqlite3"
admin_pw: "mysecretpw1"
database: "sqlite:////home/otree1/db.sqlite3"
# otree admin password
# otree admin password
auth_level: "STUDY"
admin_pw: "mysecretpw1"
# auth level, possible values: "STUDY", "DEMO"
# auth level, possible values: "STUDY", "DEMO"
secret_key: "safaho9awefzuwf"
auth_level: "STUDY"
# django secret key, use differet in different instances
# django secret key, use differet in different instances
production: "1"
secret_key: "safaho9awefzuwf"
# LOG-LEVEL, set to None ("production: ") to enable further debug messages.
# LOG-LEVEL, set to None ("production: ") to enable further debug messages.
1. If no git-repository with your otree project is provided, you can place a copy of the project files (with scp) in ``files/<otree_username>/``.
1. If no git-repository ``app_repo``-value with your otree configuration is provided, you have to place a copy of the project files (with scp) in ``files/<otree_username>/``.