root / docs / upgrade / upgrade-0.14.rst @ a68c2667
History | View | Annotate | Download (8.1 kB)
1 |
Upgrade to Synnefo v0.14 |
---|---|
2 |
^^^^^^^^^^^^^^^^^^^^^^^^ |
3 |
|
4 |
The upgrade to v0.14 consists in three steps: |
5 |
|
6 |
1. Bring down services and backup databases. |
7 |
|
8 |
2. Upgrade packages, migrate the databases and configure settings. |
9 |
|
10 |
3. Register services to astakos and perform a quota-related data migration. |
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 |
Package `kamaki', installed on all nodes in version 0.13, is not required |
85 |
any more and can safely be uninstalled. |
86 |
|
87 |
.. note:: |
88 |
|
89 |
Installing the packages will cause services to start. Make sure you bring |
90 |
them down again (at least ``gunicorn``, ``snf-dispatcher``) |
91 |
|
92 |
2.2 Sync and migrate the database |
93 |
--------------------------------- |
94 |
|
95 |
.. note:: |
96 |
|
97 |
If you are asked about stale content types during the migration process, |
98 |
answer 'no' and let the migration finish. |
99 |
|
100 |
:: |
101 |
|
102 |
astakos-host$ snf-manage syncdb |
103 |
astakos-host$ snf-manage migrate quotaholder_app 0001 --fake |
104 |
astakos-host$ snf-manage migrate quotaholder_app |
105 |
astakos-host$ snf-manage migrate im |
106 |
|
107 |
cyclades-host$ snf-manage syncdb |
108 |
cyclades-host$ snf-manage migrate |
109 |
|
110 |
pithos-host$ pithos-migrate upgrade head |
111 |
|
112 |
2.3 Configure Base URL settings for all services |
113 |
------------------------------------------------ |
114 |
|
115 |
In order to make all services' URLs configurable and discoverable from |
116 |
a single endpoint in Astakos through the Openstack Keystone API, |
117 |
every service has a ``XXXXX_BASE_URL`` setting, or it's old corresponding |
118 |
setting was renamed to this. Therefore: |
119 |
|
120 |
* Rename ``ASTAKOS_URL`` setting to ``ASTAKOS_BASE_URL`` |
121 |
everywhere in your settings, in all nodes and all config files. |
122 |
This must point to the top-level Astakos URL. |
123 |
|
124 |
* In Cyclades settings, rename the ``APP_INSTALL_URL`` setting |
125 |
to ``CYCLADES_BASE_URL``. If no such setting has been configured, |
126 |
you must set it. It must point to the top-level Cyclades URL. |
127 |
Rename ``CYCLADES_ASTAKOS_SERVICE_TOKEN`` to ``CYCLADES_SERVICE_TOKEN``. |
128 |
|
129 |
* In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting; it must point |
130 |
to the top-level Pithos URL. Rename ``PITHOS_QUOTAHOLDER_POOLSIZE``, if |
131 |
set, to ``PITHOS_ASTAKOSCLIENT_POOLSIZE``. |
132 |
|
133 |
* In all 20-<service>-cloudbar.conf files change setting |
134 |
``CLOUDBAR_SERVICES_URL`` to point to ``ASTAKOS_BASE_URL/ui/get_services``, |
135 |
where ``ASTAKOS_BASE_URL`` as above. Similarly, set |
136 |
``CLOUDBAR_MENU_URL`` to ``ASTAKOS_BASE_URL/ui/get_menu``. |
137 |
|
138 |
If two or more services are installed on the same machine, make sure their |
139 |
base URLs do not clash. You can distinguish them with a suffix, e.g. |
140 |
``ASTAKOS_BASE_URL = "https://node1.example.com/astakos"`` and |
141 |
``CYCLADES_BASE_URL = "https://node1.example.com/cyclades"``. |
142 |
|
143 |
3 Register services and migrate quota |
144 |
===================================== |
145 |
|
146 |
You need to register astakos as a component. Moreover you need to register |
147 |
all services provided by cyclades and pithos. |
148 |
Running the following script you will be asked to provide the base |
149 |
installation URL for each component. You will also need to specify the UI |
150 |
URL for astakos. |
151 |
|
152 |
The former is the location where each component resides; it should equal |
153 |
the ``<component_name>_BASE_URL`` as specified in the respective component |
154 |
settings (see above). |
155 |
|
156 |
The latter is the URL that appears in the Cloudbar and leads to the |
157 |
component UI. If you want to follow the default setup, set |
158 |
the UI URL to ``<base_url>/ui/`` where ``base_url`` is the component's base |
159 |
URL as explained before. |
160 |
|
161 |
For example, for Astakos, if |
162 |
``BASE_URL = https://accounts.example.synnefo.org/astakos``, |
163 |
then ``UI_URL = https://accounts.example.synnefo.org/astakos/ui/``):: |
164 |
|
165 |
astakos-host$ snf-component-register |
166 |
|
167 |
(ATTENTION: make sure to go to the next step *WITHOUT* running |
168 |
``snf-manage resource-modify``, suggested at the end of this command) |
169 |
|
170 |
.. note:: |
171 |
|
172 |
This command is equivalent to running the following series of commands; |
173 |
in each host it exports the respective service definitions, copies the |
174 |
exported json file to the astakos host, where it finally imports it: |
175 |
|
176 |
.. code-block:: console |
177 |
|
178 |
astakos-host$ snf-manage component-add astakos ui_url |
179 |
astakos-host$ snf-manage service-export-astakos > astakos.json |
180 |
astakos-host$ snf-manage service-import --json astakos.json |
181 |
cyclades-host$ snf-manage service-export-cyclades > cyclades.json |
182 |
# copy the file to astakos-host |
183 |
astakos-host$ snf-manage service-import --json cyclades.json |
184 |
pithos-host$ snf-manage service-export-pithos > pithos.json |
185 |
# copy the file to astakos-host |
186 |
astakos-host$ snf-manage service-import --json pithos.json |
187 |
|
188 |
Run:: |
189 |
|
190 |
astakos-host$ snf-manage component-list |
191 |
|
192 |
to make sure that all UI URLs are set to the correct value (``<base_url>/ui/`` |
193 |
as explained above). If you have changed some ``<component_name>_BASE_URL`` |
194 |
in the previous step, you will need to update the UI URL with:: |
195 |
|
196 |
snf-manage component-modify <component_name> --url new_ui_url |
197 |
|
198 |
The limit on the pending project applications is since 0.14 handled as an |
199 |
Astakos resource, rather than a custom setting. So, as a last step we need |
200 |
to run:: |
201 |
|
202 |
astakos-host$ astakos-migrate-0.14 |
203 |
|
204 |
This will prompt you to set this limit (replacing setting |
205 |
``ASTAKOS_PENDING_APPLICATION_LIMIT``) and then automatically migrate the |
206 |
user-specific base quota for the new resource ``astakos.pending_app`` using |
207 |
the deprecated user setting. |
208 |
|
209 |
You are now done migrating from Synnefo v0.13 to v0.14. Please test your |
210 |
installation to make sure everything works as expected. |
211 |
|
212 |
4. Update astakos email notification settings |
213 |
============================================= |
214 |
|
215 |
Make sure to update your configuration to include settings refered in the |
216 |
updated :ref:`Email delivery configuration <email-configuration>` section |
217 |
of the quick installation admin guide. |
218 |
|
219 |
5. Bring all services up |
220 |
======================== |
221 |
|
222 |
After the upgrade is finished, we bring up all services: |
223 |
|
224 |
.. code-block:: console |
225 |
|
226 |
astakos.host # service gunicorn start |
227 |
cyclades.host # service gunicorn start |
228 |
pithos.host # service gunicorn start |
229 |
|
230 |
cyclades.host # service snf-dispatcher start |