root / docs / upgrade / upgrade-0.15.rst @ 06f38d70
History | View | Annotate | Download (4.6 kB)
1 |
Upgrade to Synnefo v0.15 |
---|---|
2 |
^^^^^^^^^^^^^^^^^^^^^^^^ |
3 |
|
4 |
The upgrade to v0.15 consists in the following steps: |
5 |
|
6 |
1. Bring down services and backup databases. |
7 |
|
8 |
2. Upgrade packages, migrate the databases and configure settings. |
9 |
|
10 |
3. Re-register components and services in astakos. |
11 |
|
12 |
4. Bring up all services. |
13 |
|
14 |
.. warning:: |
15 |
|
16 |
It is strongly suggested that you keep separate database backups |
17 |
for each service after the completion of each step. |
18 |
|
19 |
1. Bring web services down, backup databases |
20 |
============================================ |
21 |
|
22 |
1. All web services must be brought down so that the database maintains a |
23 |
predictable and consistent state during the migration process:: |
24 |
|
25 |
$ service gunicorn stop |
26 |
$ service snf-dispatcher stop |
27 |
$ service snf-ganeti-eventd stop |
28 |
|
29 |
2. Backup databases for recovery to a pre-migration state. |
30 |
|
31 |
3. Keep the database servers running during the migration process. |
32 |
|
33 |
|
34 |
2. Upgrade Synnefo and configure settings |
35 |
========================================= |
36 |
|
37 |
2.1 Install the new versions of packages |
38 |
---------------------------------------- |
39 |
|
40 |
:: |
41 |
|
42 |
astakos.host$ apt-get install \ |
43 |
python-objpool \ |
44 |
snf-common \ |
45 |
python-astakosclient \ |
46 |
snf-django-lib \ |
47 |
snf-webproject \ |
48 |
snf-branding \ |
49 |
snf-astakos-app |
50 |
|
51 |
cyclades.host$ apt-get install \ |
52 |
python-objpool \ |
53 |
snf-common \ |
54 |
python-astakosclient \ |
55 |
snf-django-lib \ |
56 |
snf-webproject \ |
57 |
snf-branding \ |
58 |
snf-pithos-backend \ |
59 |
snf-cyclades-app |
60 |
|
61 |
pithos.host$ apt-get install \ |
62 |
python-objpool \ |
63 |
snf-common \ |
64 |
python-astakosclient \ |
65 |
snf-django-lib \ |
66 |
snf-webproject \ |
67 |
snf-branding \ |
68 |
snf-pithos-backend \ |
69 |
snf-pithos-app \ |
70 |
snf-pithos-webclient |
71 |
|
72 |
ganeti.node$ apt-get install \ |
73 |
python-objpool \ |
74 |
snf-common \ |
75 |
snf-cyclades-gtools \ |
76 |
snf-pithos-backend |
77 |
|
78 |
.. note:: |
79 |
|
80 |
Make sure `snf-webproject' has the same version with snf-common |
81 |
|
82 |
.. note:: |
83 |
|
84 |
Installing the packages will cause services to start. Make sure you bring |
85 |
them down again (at least ``gunicorn``, ``snf-dispatcher``) |
86 |
|
87 |
2.2 Sync and migrate the database |
88 |
--------------------------------- |
89 |
|
90 |
.. note:: |
91 |
|
92 |
If you are asked about stale content types during the migration process, |
93 |
answer 'no' and let the migration finish. |
94 |
|
95 |
:: |
96 |
|
97 |
astakos-host$ snf-manage syncdb |
98 |
astakos-host$ snf-manage migrate |
99 |
|
100 |
cyclades-host$ snf-manage syncdb |
101 |
cyclades-host$ snf-manage migrate |
102 |
|
103 |
pithos-host$ pithos-migrate upgrade head |
104 |
|
105 |
2.3 Update configuration files |
106 |
------------------------------ |
107 |
|
108 |
The ``ASTAKOS_BASE_URL`` setting has been replaced (both in Cyclades and |
109 |
Pithos services) with the ``ASTAKOS_AUTH_URL`` setting. |
110 |
|
111 |
For Cyclades service we have to change the ``20-snf-cyclades-app-api.conf`` |
112 |
file, remove the ``ASTAKOS_BASE_URL`` setting and replace it with |
113 |
``ASTAKOS_AUTH_URL``. Typically it is sufficient to add ``/identity/v2.0/`` |
114 |
at the end of base url to get the auth url. For example if base url had the |
115 |
value of 'https://accounts.example.synnefo.org/' then the ``ASTAKOS_AUTH_URL`` |
116 |
setting will have the value of |
117 |
'https://accounts.example.synnefo.org/identity/v2.0/'. |
118 |
|
119 |
For Pithos service we have to change the ``20-snf-pithos-app-settings.conf`` |
120 |
file in the same way as above. |
121 |
|
122 |
3. Re-register components and services in astakos |
123 |
================================================= |
124 |
|
125 |
Component registration has changed; you will thus need to repeat the |
126 |
process. On the astakos node, run:: |
127 |
|
128 |
astakos-host$ snf-component-register |
129 |
|
130 |
This will detect that the Synnefo components are already registered and ask |
131 |
to re-register. Answer positively. You need to enter the base URL and the UI |
132 |
URL for each component, just like during the initial registration. |
133 |
|
134 |
4. Bring all services up |
135 |
======================== |
136 |
|
137 |
After the upgrade is finished, we bring up all services: |
138 |
|
139 |
.. code-block:: console |
140 |
|
141 |
astakos.host # service gunicorn start |
142 |
cyclades.host # service gunicorn start |
143 |
pithos.host # service gunicorn start |
144 |
|
145 |
cyclades.host # service snf-dispatcher start |