README.md 1.45 KB
Newer Older
Torsten N. Fit's avatar
Torsten N. Fit committed
1
au_otree
Torsten N. Fit's avatar
Torsten N. Fit committed
2
3
=========

Torsten N. Fit's avatar
Torsten N. Fit committed
4
Role to setup oTree dev/prod environment on Ubuntu server. (VM, Cloud instance etc).
Torsten N. Fit's avatar
Torsten N. Fit committed
5
6
7
8

Requirements
------------

Torsten N. Fit's avatar
Torsten N. Fit committed
9
10
11
The actual oTree code for dev/prod should be in a git repository "otree_repo", that can be cloned.
If you are using GitLab, but want to keep repo private, then consider using a deploy-token:  
https://docs.gitlab.com/ee/user/project/deploy_tokens/#git-clone-a-repository
Torsten N. Fit's avatar
Torsten N. Fit committed
12

Torsten Nielsen's avatar
Torsten Nielsen committed
13

Torsten N. Fit's avatar
Torsten N. Fit committed
14
15
16
Role Variables
--------------

17
18
19
20
21
22
    otree_user: "ot"
    otree_prod_port: 8000
    otree_dev_port:  8100
    otree_fqdn: "otree.local"
    otree_repo: "https://gitlab.au.dk/otree/otree_example_apps.git"
    otree_admin_password='my_otree_admin_pw'
Torsten N. Fit's avatar
Torsten N. Fit committed
23
24
25
26

Dependencies
------------

Torsten Nielsen's avatar
Torsten Nielsen committed
27
28
To install Caddy server we use the Ansible role: nvjacobo.caddy - install using:
$ ansible-galaxy install nvjacobo.caddy
Torsten N. Fit's avatar
Torsten N. Fit committed
29
30
31
32

Example Playbook
----------------

Torsten Nielsen's avatar
Torsten Nielsen committed
33
Example playbook - if using a private repository in GitLab for the otree_repo, then create a deploy-token in GitLab.
Torsten N. Fit's avatar
Torsten N. Fit committed
34
35

    - hosts: servers
Torsten N. Fit's avatar
Torsten N. Fit committed
36
37
38
39
      tasks:
      - name: Include the oTree role
        include_role:
          name: au_otree
Torsten Nielsen's avatar
Torsten Nielsen committed
40
41
42
43
        tags:
          - always


Torsten N. Fit's avatar
Torsten N. Fit committed
44
45
46
47
48
49
      vars:
        allow_world_readable_tmpfiles: true
        ansible_python_interpreter: /usr/bin/python3.8
        otree_fqdn: "fqdn or hostname"
        otree_repo: "https://gitlab+deploy-token-36XXXXXXX@gitlab.au.dk/otree/otree_polsci.git"
        otree_admin_password: "my_otree_admin_pw"
Torsten N. Fit's avatar
Torsten N. Fit committed
50
51
52
53

License
-------

Torsten Nielsen's avatar
Torsten Nielsen committed
54
MIT
Torsten N. Fit's avatar
Torsten N. Fit committed
55
56
57
58

Author Information
------------------

Torsten N. Fit's avatar
Torsten N. Fit committed
59
tnielsen@au.dk