Commit 811507b5 authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

add instructions for upgrading saem-ref

In saemref.install state, read pillar "upgrade" that is passed to the
command line to force the recreation of the virtualenv.

Document the full upgrade procedure in README.
parent 4646f5af
......@@ -112,6 +112,22 @@ the database (WARNING: this will destroy existing database if exists).
Then run: ``salt srv state.highstate`` to finish the installation.
Upgrades
========
To force an upgrade to the latest version of saem-ref, connect to the minion as
root, then run::
[root@minion] % supervisorctl stop all
[root@minion] % salt-call state.sls saemref.install pillar='{"upgrade": true}'
# be patient
[root@minion] % su - saemref
[saemref@minion] % . venv/bin/activate
(venv) [saemref@minion] % cubicweb-ctl upgrade saemref
# proceed to the cubicweb upgrade process
(venv) [saemref@minion] % exit
[root@minion] % supervisorctl start all
Testing
=======
......
......@@ -63,6 +63,12 @@ legacy cleanup:
- uwsgi
- uwsgi-plugin-python
{% if pillar.get('upgrade', False) %}
drop old virtualenv:
file.absent:
- name: /home/{{ saemref.instance.user }}/venv
{% endif %}
venv:
virtualenv.managed:
- name: /home/{{ saemref.instance.user }}/venv
......@@ -70,6 +76,9 @@ venv:
- user: {{ saemref.instance.user }}
- require:
- pkg: legacy cleanup
{% if pillar.get('upgrade', False) %}
- file: drop old virtualenv
{% endif %}
cubicweb in venv:
pip.installed:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment