...
 
Commits (2)
......@@ -28,7 +28,7 @@ include:
- source: salt://saemref/files/logrotate.conf
- template: jinja
CW_MODE=user /home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl source-sync --loglevel error {{ saemref.instance.name }}:
VIRTUAL_ENV=/home/{{ saemref.instance.user }}/venv CW_MODE=user /home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl source-sync --loglevel error {{ saemref.instance.name }}:
cron.present:
- user: {{ saemref.instance.user }}
- hour: "*/1"
......
......@@ -9,3 +9,4 @@ cubicweb-db-create:
- user: {{ saemref.instance.user }}
- env:
CW_MODE: user
VIRTUAL_ENV: /home/{{ saemref.instance.user }}/venv
......@@ -9,4 +9,5 @@ cubicweb-db-init:
- user: {{ saemref.instance.user }}
- env:
CW_MODE: user
VIRTUAL_ENV: /home/{{ saemref.instance.user }}/venv
......@@ -8,7 +8,7 @@ command=/home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl pyramid -D {{ sa
user={{ saemref.instance.user }}
redirect_stderr=true
stdout_logfile=/home/{{ saemref.instance.user }}/{{ saemref.instance.name }}.log
environment=CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }}
environment=VIRTUAL_ENV=/home/{{ saemref.instance.user }}/venv,CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }}
autorestart=true
startsecs=10
......@@ -18,7 +18,7 @@ command=/home/{{ saemref.instance.user }}/venv/bin/gunicorn 'cubicweb.pyramid:ws
{% else -%}
command=/home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl pyramid -D {{ saemref.instance.name }}
{% endif -%}
environment=CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }},CW_CONNECTIONS_POOL_SIZE={{ saemref.instance.oai_threads }},CW_PORT={{ saemref.instance.oai_port }}
environment=VIRTUAL_ENV=/home/{{ saemref.instance.user }}/venv,CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }},CW_CONNECTIONS_POOL_SIZE={{ saemref.instance.oai_threads }},CW_PORT={{ saemref.instance.oai_port }}
user={{ saemref.instance.user }}
redirect_stderr=true
stdout_logfile=/home/{{ saemref.instance.user }}/{{ saemref.instance.name }}-oai.log
......@@ -27,7 +27,7 @@ startsecs=10
[program:saemref-scheduler]
command=/home/{{ saemref.instance.user }}/venv/bin/cubicweb-ctl scheduler {{ saemref.instance.name }}
environment=CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }}
environment=VIRTUAL_ENV=/home/{{ saemref.instance.user }}/venv,CW_MODE=user,HOME=/home/{{ saemref.instance.user }},CW_INSTANCE={{ saemref.instance.name }}
user={{ saemref.instance.user }}
redirect_stderr=true
stdout_logfile=/home/{{ saemref.instance.user }}/{{ saemref.instance.name }}-scheduler.log
......
......@@ -138,6 +138,7 @@ cubicweb-create:
- user: {{ saemref.instance.user }}
- env:
CW_MODE: user
VIRTUAL_ENV: /home/{{ saemref.instance.user }}/venv
- require:
- pkg: cube-packages
- user: {{ saemref.instance.user }}
......
......@@ -19,6 +19,7 @@ cubicweb-upgrade:
- user: {{ saemref.instance.user }}
- env:
CW_MODE: user
VIRTUAL_ENV: /home/{{ saemref.instance.user }}/venv
- require:
- pip: cubicweb-saem_ref
......
......@@ -30,7 +30,7 @@ def test_package_postgresclient(host):
def test_pip_packages(host):
packages = host.pip_package.get_packages(
pip_path='/home/saemref/venv/bin/pip')
assert packages['cubicweb']['version'].startswith("3.25")
assert packages['cubicweb']['version'].startswith("3.26")
assert map(int, packages['cubicweb']['version'].split('.')) >= [3, 25]
assert packages['cubicweb-saem-ref']['version'].startswith(EXPECTED_SAEM_VERSION)
......@@ -189,6 +189,7 @@ EOF'''.format(token_secret))
def cc_shell(host, script_name):
return host.check_output(
'VIRTUAL_ENV=/home/saemref/venv/ '
'CW_INSTANCES_DIR=/home/saemref/etc/cubicweb.d '
'/home/saemref/venv/bin/cubicweb-ctl shell saemref '
'/data/%s', script_name)