root / docs / upgrade / upgrade-0.14.rst @ 36fea6f9
History | View | Annotate | Download (8.1 kB)
1 | 857383e3 | Giorgos Korfiatis | Upgrade to Synnefo v0.14 |
---|---|---|---|
2 | 857383e3 | Giorgos Korfiatis | ^^^^^^^^^^^^^^^^^^^^^^^^ |
3 | 857383e3 | Giorgos Korfiatis | |
4 | 61c39121 | Giorgos Korfiatis | The upgrade to v0.14 consists in three steps: |
5 | 857383e3 | Giorgos Korfiatis | |
6 | 61c39121 | Giorgos Korfiatis | 1. Bring down services and backup databases. |
7 | 61c39121 | Giorgos Korfiatis | |
8 | 61c39121 | Giorgos Korfiatis | 2. Upgrade packages, migrate the databases and configure settings. |
9 | 61c39121 | Giorgos Korfiatis | |
10 | 61c39121 | Giorgos Korfiatis | 3. Register services to astakos and perform a quota-related data migration. |
11 | 857383e3 | Giorgos Korfiatis | |
12 | 68358dbe | Constantinos Venetsanopoulos | 4. Bring up all services. |
13 | 68358dbe | Constantinos Venetsanopoulos | |
14 | 857383e3 | Giorgos Korfiatis | .. warning:: |
15 | 857383e3 | Giorgos Korfiatis | |
16 | 857383e3 | Giorgos Korfiatis | It is strongly suggested that you keep separate database backups |
17 | 61c39121 | Giorgos Korfiatis | for each service after the completion of each step. |
18 | 857383e3 | Giorgos Korfiatis | |
19 | 857383e3 | Giorgos Korfiatis | 1. Bring web services down, backup databases |
20 | 857383e3 | Giorgos Korfiatis | ============================================ |
21 | 857383e3 | Giorgos Korfiatis | |
22 | 857383e3 | Giorgos Korfiatis | 1. All web services must be brought down so that the database maintains a |
23 | 857383e3 | Giorgos Korfiatis | predictable and consistent state during the migration process:: |
24 | 857383e3 | Giorgos Korfiatis | |
25 | 61c39121 | Giorgos Korfiatis | $ service gunicorn stop |
26 | 61c39121 | Giorgos Korfiatis | $ service snf-dispatcher stop |
27 | 68358dbe | Constantinos Venetsanopoulos | $ service snf-ganeti-eventd stop |
28 | 857383e3 | Giorgos Korfiatis | |
29 | 857383e3 | Giorgos Korfiatis | 2. Backup databases for recovery to a pre-migration state. |
30 | 857383e3 | Giorgos Korfiatis | |
31 | 857383e3 | Giorgos Korfiatis | 3. Keep the database servers running during the migration process |
32 | 857383e3 | Giorgos Korfiatis | |
33 | 857383e3 | Giorgos Korfiatis | |
34 | 857383e3 | Giorgos Korfiatis | 2. Upgrade Synnefo and configure settings |
35 | 857383e3 | Giorgos Korfiatis | ========================================= |
36 | 857383e3 | Giorgos Korfiatis | |
37 | 61c39121 | Giorgos Korfiatis | 2.1 Install the new versions of packages |
38 | 61c39121 | Giorgos Korfiatis | ---------------------------------------- |
39 | 61c39121 | Giorgos Korfiatis | |
40 | 61c39121 | Giorgos Korfiatis | :: |
41 | 61c39121 | Giorgos Korfiatis | |
42 | 61c39121 | Giorgos Korfiatis | astakos.host$ apt-get install \ |
43 | aa5e1e06 | Giorgos Korfiatis | python-objpool \ |
44 | 61c39121 | Giorgos Korfiatis | snf-common \ |
45 | aa5e1e06 | Giorgos Korfiatis | python-astakosclient \ |
46 | 61c39121 | Giorgos Korfiatis | snf-django-lib \ |
47 | 61c39121 | Giorgos Korfiatis | snf-webproject \ |
48 | 61c39121 | Giorgos Korfiatis | snf-branding \ |
49 | 61c39121 | Giorgos Korfiatis | snf-astakos-app |
50 | 61c39121 | Giorgos Korfiatis | |
51 | 61c39121 | Giorgos Korfiatis | cyclades.host$ apt-get install \ |
52 | aa5e1e06 | Giorgos Korfiatis | python-objpool \ |
53 | 61c39121 | Giorgos Korfiatis | snf-common \ |
54 | aa5e1e06 | Giorgos Korfiatis | python-astakosclient \ |
55 | 61c39121 | Giorgos Korfiatis | snf-django-lib \ |
56 | 61c39121 | Giorgos Korfiatis | snf-webproject \ |
57 | 61c39121 | Giorgos Korfiatis | snf-branding \ |
58 | 61c39121 | Giorgos Korfiatis | snf-pithos-backend \ |
59 | 61c39121 | Giorgos Korfiatis | snf-cyclades-app |
60 | 61c39121 | Giorgos Korfiatis | |
61 | 61c39121 | Giorgos Korfiatis | pithos.host$ apt-get install \ |
62 | aa5e1e06 | Giorgos Korfiatis | python-objpool \ |
63 | 61c39121 | Giorgos Korfiatis | snf-common \ |
64 | aa5e1e06 | Giorgos Korfiatis | python-astakosclient \ |
65 | 61c39121 | Giorgos Korfiatis | snf-django-lib \ |
66 | 61c39121 | Giorgos Korfiatis | snf-webproject \ |
67 | 61c39121 | Giorgos Korfiatis | snf-branding \ |
68 | 61c39121 | Giorgos Korfiatis | snf-pithos-backend \ |
69 | 61c39121 | Giorgos Korfiatis | snf-pithos-app \ |
70 | 61c39121 | Giorgos Korfiatis | snf-pithos-webclient |
71 | 61c39121 | Giorgos Korfiatis | |
72 | 61c39121 | Giorgos Korfiatis | ganeti.node$ apt-get install \ |
73 | aa5e1e06 | Giorgos Korfiatis | python-objpool \ |
74 | 61c39121 | Giorgos Korfiatis | snf-common \ |
75 | 61c39121 | Giorgos Korfiatis | snf-cyclades-gtools \ |
76 | 61c39121 | Giorgos Korfiatis | snf-pithos-backend |
77 | 61c39121 | Giorgos Korfiatis | |
78 | 61c39121 | Giorgos Korfiatis | .. note:: |
79 | 61c39121 | Giorgos Korfiatis | |
80 | 68358dbe | Constantinos Venetsanopoulos | Make sure `snf-webproject' has the same version with snf-common |
81 | 68358dbe | Constantinos Venetsanopoulos | |
82 | 68358dbe | Constantinos Venetsanopoulos | .. note:: |
83 | 68358dbe | Constantinos Venetsanopoulos | |
84 | f1be16bf | Giorgos Korfiatis | Package `kamaki', installed on all nodes in version 0.13, is not required |
85 | f1be16bf | Giorgos Korfiatis | any more and can safely be uninstalled. |
86 | f1be16bf | Giorgos Korfiatis | |
87 | f1be16bf | Giorgos Korfiatis | .. note:: |
88 | f1be16bf | Giorgos Korfiatis | |
89 | 61c39121 | Giorgos Korfiatis | Installing the packages will cause services to start. Make sure you bring |
90 | 61c39121 | Giorgos Korfiatis | them down again (at least ``gunicorn``, ``snf-dispatcher``) |
91 | 61c39121 | Giorgos Korfiatis | |
92 | 61c39121 | Giorgos Korfiatis | 2.2 Sync and migrate the database |
93 | 61c39121 | Giorgos Korfiatis | --------------------------------- |
94 | 857383e3 | Giorgos Korfiatis | |
95 | 857383e3 | Giorgos Korfiatis | .. note:: |
96 | 857383e3 | Giorgos Korfiatis | |
97 | 857383e3 | Giorgos Korfiatis | If you are asked about stale content types during the migration process, |
98 | 857383e3 | Giorgos Korfiatis | answer 'no' and let the migration finish. |
99 | 857383e3 | Giorgos Korfiatis | |
100 | 857383e3 | Giorgos Korfiatis | :: |
101 | 857383e3 | Giorgos Korfiatis | |
102 | 857383e3 | Giorgos Korfiatis | astakos-host$ snf-manage syncdb |
103 | 857383e3 | Giorgos Korfiatis | astakos-host$ snf-manage migrate quotaholder_app 0001 --fake |
104 | 857383e3 | Giorgos Korfiatis | astakos-host$ snf-manage migrate quotaholder_app |
105 | 857383e3 | Giorgos Korfiatis | astakos-host$ snf-manage migrate im |
106 | 857383e3 | Giorgos Korfiatis | |
107 | 857383e3 | Giorgos Korfiatis | cyclades-host$ snf-manage syncdb |
108 | 857383e3 | Giorgos Korfiatis | cyclades-host$ snf-manage migrate |
109 | 857383e3 | Giorgos Korfiatis | |
110 | 61c39121 | Giorgos Korfiatis | pithos-host$ pithos-migrate upgrade head |
111 | 857383e3 | Giorgos Korfiatis | |
112 | e3ff6830 | Georgios D. Tsoukalas | 2.3 Configure Base URL settings for all services |
113 | e3ff6830 | Georgios D. Tsoukalas | ------------------------------------------------ |
114 | e3ff6830 | Georgios D. Tsoukalas | |
115 | e3ff6830 | Georgios D. Tsoukalas | In order to make all services' URLs configurable and discoverable from |
116 | e3ff6830 | Georgios D. Tsoukalas | a single endpoint in Astakos through the Openstack Keystone API, |
117 | e3ff6830 | Georgios D. Tsoukalas | every service has a ``XXXXX_BASE_URL`` setting, or it's old corresponding |
118 | e3ff6830 | Georgios D. Tsoukalas | setting was renamed to this. Therefore: |
119 | e3ff6830 | Georgios D. Tsoukalas | |
120 | e3ff6830 | Georgios D. Tsoukalas | * Rename ``ASTAKOS_URL`` setting to ``ASTAKOS_BASE_URL`` |
121 | e3ff6830 | Georgios D. Tsoukalas | everywhere in your settings, in all nodes and all config files. |
122 | e3ff6830 | Georgios D. Tsoukalas | This must point to the top-level Astakos URL. |
123 | e3ff6830 | Georgios D. Tsoukalas | |
124 | e3ff6830 | Georgios D. Tsoukalas | * In Cyclades settings, rename the ``APP_INSTALL_URL`` setting |
125 | e3ff6830 | Georgios D. Tsoukalas | to ``CYCLADES_BASE_URL``. If no such setting has been configured, |
126 | e3ff6830 | Georgios D. Tsoukalas | you must set it. It must point to the top-level Cyclades URL. |
127 | 18c4414d | Giorgos Korfiatis | Rename ``CYCLADES_ASTAKOS_SERVICE_TOKEN`` to ``CYCLADES_SERVICE_TOKEN``. |
128 | e3ff6830 | Georgios D. Tsoukalas | |
129 | aa5e1e06 | Giorgos Korfiatis | * In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting; it must point |
130 | aa5e1e06 | Giorgos Korfiatis | to the top-level Pithos URL. Rename ``PITHOS_QUOTAHOLDER_POOLSIZE``, if |
131 | aa5e1e06 | Giorgos Korfiatis | set, to ``PITHOS_ASTAKOSCLIENT_POOLSIZE``. |
132 | aa5e1e06 | Giorgos Korfiatis | |
133 | aa5e1e06 | Giorgos Korfiatis | * In all 20-<service>-cloudbar.conf files change setting |
134 | aa5e1e06 | Giorgos Korfiatis | ``CLOUDBAR_SERVICES_URL`` to point to ``ASTAKOS_BASE_URL/ui/get_services``, |
135 | aa5e1e06 | Giorgos Korfiatis | where ``ASTAKOS_BASE_URL`` as above. Similarly, set |
136 | aa5e1e06 | Giorgos Korfiatis | ``CLOUDBAR_MENU_URL`` to ``ASTAKOS_BASE_URL/ui/get_menu``. |
137 | aa5e1e06 | Giorgos Korfiatis | |
138 | bb013297 | Giorgos Korfiatis | If two or more services are installed on the same machine, make sure their |
139 | bb013297 | Giorgos Korfiatis | base URLs do not clash. You can distinguish them with a suffix, e.g. |
140 | bb013297 | Giorgos Korfiatis | ``ASTAKOS_BASE_URL = "https://node1.example.com/astakos"`` and |
141 | bb013297 | Giorgos Korfiatis | ``CYCLADES_BASE_URL = "https://node1.example.com/cyclades"``. |
142 | e3ff6830 | Georgios D. Tsoukalas | |
143 | 3f31a848 | Giorgos Korfiatis | 3 Register services and migrate quota |
144 | 3f31a848 | Giorgos Korfiatis | ===================================== |
145 | 857383e3 | Giorgos Korfiatis | |
146 | 3f31a848 | Giorgos Korfiatis | You need to register astakos as a component. Moreover you need to register |
147 | 3f31a848 | Giorgos Korfiatis | all services provided by cyclades and pithos. |
148 | 3f31a848 | Giorgos Korfiatis | Running the following script you will be asked to provide the base |
149 | 0d87ef78 | Giorgos Korfiatis | installation URL for each component. You will also need to specify the UI |
150 | 0d87ef78 | Giorgos Korfiatis | URL for astakos. |
151 | 0d87ef78 | Giorgos Korfiatis | |
152 | 0d87ef78 | Giorgos Korfiatis | The former is the location where each component resides; it should equal |
153 | 0d87ef78 | Giorgos Korfiatis | the ``<component_name>_BASE_URL`` as specified in the respective component |
154 | 0d87ef78 | Giorgos Korfiatis | settings (see above). |
155 | 0d87ef78 | Giorgos Korfiatis | |
156 | 0d87ef78 | Giorgos Korfiatis | The latter is the URL that appears in the Cloudbar and leads to the |
157 | 0d87ef78 | Giorgos Korfiatis | component UI. If you want to follow the default setup, set |
158 | 68358dbe | Constantinos Venetsanopoulos | the UI URL to ``<base_url>/ui/`` where ``base_url`` is the component's base |
159 | bb013297 | Giorgos Korfiatis | URL as explained before. |
160 | 68358dbe | Constantinos Venetsanopoulos | |
161 | 68358dbe | Constantinos Venetsanopoulos | For example, for Astakos, if |
162 | 68358dbe | Constantinos Venetsanopoulos | ``BASE_URL = https://accounts.example.synnefo.org/astakos``, |
163 | bb013297 | Giorgos Korfiatis | then ``UI_URL = https://accounts.example.synnefo.org/astakos/ui/``):: |
164 | 857383e3 | Giorgos Korfiatis | |
165 | b4109758 | Giorgos Korfiatis | astakos-host$ snf-component-register |
166 | b446c082 | Giorgos Korfiatis | |
167 | 68358dbe | Constantinos Venetsanopoulos | (ATTENTION: make sure to go to the next step *WITHOUT* running |
168 | 68358dbe | Constantinos Venetsanopoulos | ``snf-manage resource-modify``, suggested at the end of this command) |
169 | aa5e1e06 | Giorgos Korfiatis | |
170 | b446c082 | Giorgos Korfiatis | .. note:: |
171 | b446c082 | Giorgos Korfiatis | |
172 | 3f31a848 | Giorgos Korfiatis | This command is equivalent to running the following series of commands; |
173 | 3f31a848 | Giorgos Korfiatis | in each host it exports the respective service definitions, copies the |
174 | 3f31a848 | Giorgos Korfiatis | exported json file to the astakos host, where it finally imports it: |
175 | 3f31a848 | Giorgos Korfiatis | |
176 | 3f31a848 | Giorgos Korfiatis | .. code-block:: console |
177 | 3f31a848 | Giorgos Korfiatis | |
178 | 3f31a848 | Giorgos Korfiatis | astakos-host$ snf-manage component-add astakos ui_url |
179 | 3f31a848 | Giorgos Korfiatis | astakos-host$ snf-manage service-export-astakos > astakos.json |
180 | 3f31a848 | Giorgos Korfiatis | astakos-host$ snf-manage service-import --json astakos.json |
181 | 3f31a848 | Giorgos Korfiatis | cyclades-host$ snf-manage service-export-cyclades > cyclades.json |
182 | 3f31a848 | Giorgos Korfiatis | # copy the file to astakos-host |
183 | 3f31a848 | Giorgos Korfiatis | astakos-host$ snf-manage service-import --json cyclades.json |
184 | 3f31a848 | Giorgos Korfiatis | pithos-host$ snf-manage service-export-pithos > pithos.json |
185 | 3f31a848 | Giorgos Korfiatis | # copy the file to astakos-host |
186 | 3f31a848 | Giorgos Korfiatis | astakos-host$ snf-manage service-import --json pithos.json |
187 | 857383e3 | Giorgos Korfiatis | |
188 | bb013297 | Giorgos Korfiatis | Run:: |
189 | bb013297 | Giorgos Korfiatis | |
190 | bb013297 | Giorgos Korfiatis | astakos-host$ snf-manage component-list |
191 | bb013297 | Giorgos Korfiatis | |
192 | bb013297 | Giorgos Korfiatis | to make sure that all UI URLs are set to the correct value (``<base_url>/ui/`` |
193 | bb013297 | Giorgos Korfiatis | as explained above). If you have changed some ``<component_name>_BASE_URL`` |
194 | bb013297 | Giorgos Korfiatis | in the previous step, you will need to update the UI URL with:: |
195 | bb013297 | Giorgos Korfiatis | |
196 | bb013297 | Giorgos Korfiatis | snf-manage component-modify <component_name> --url new_ui_url |
197 | bb013297 | Giorgos Korfiatis | |
198 | 68358dbe | Constantinos Venetsanopoulos | The limit on the pending project applications is since 0.14 handled as an |
199 | 68358dbe | Constantinos Venetsanopoulos | Astakos resource, rather than a custom setting. So, as a last step we need |
200 | 68358dbe | Constantinos Venetsanopoulos | to run:: |
201 | 857383e3 | Giorgos Korfiatis | |
202 | 1f5565c3 | Giorgos Korfiatis | astakos-host$ astakos-migrate-0.14 |
203 | 857383e3 | Giorgos Korfiatis | |
204 | 68358dbe | Constantinos Venetsanopoulos | This will prompt you to set this limit (replacing setting |
205 | 68358dbe | Constantinos Venetsanopoulos | ``ASTAKOS_PENDING_APPLICATION_LIMIT``) and then automatically migrate the |
206 | ae883db3 | Giorgos Korfiatis | user-specific base quota for the new resource ``astakos.pending_app`` using |
207 | ae883db3 | Giorgos Korfiatis | the deprecated user setting. |
208 | 68358dbe | Constantinos Venetsanopoulos | |
209 | 68358dbe | Constantinos Venetsanopoulos | You are now done migrating from Synnefo v0.13 to v0.14. Please test your |
210 | 68358dbe | Constantinos Venetsanopoulos | installation to make sure everything works as expected. |
211 | 68358dbe | Constantinos Venetsanopoulos | |
212 | 7dd63e07 | Kostas Papadimitriou | 4. Update astakos email notification settings |
213 | 7dd63e07 | Kostas Papadimitriou | ============================================= |
214 | 68358dbe | Constantinos Venetsanopoulos | |
215 | 7dd63e07 | Kostas Papadimitriou | Make sure to update your configuration to include settings refered in the |
216 | 7dd63e07 | Kostas Papadimitriou | updated :ref:`Email delivery configuration <email-configuration>` section |
217 | 7dd63e07 | Kostas Papadimitriou | of the quick installation admin guide. |
218 | 7dd63e07 | Kostas Papadimitriou | |
219 | 7dd63e07 | Kostas Papadimitriou | 5. Bring all services up |
220 | 68358dbe | Constantinos Venetsanopoulos | ======================== |
221 | 68358dbe | Constantinos Venetsanopoulos | |
222 | 68358dbe | Constantinos Venetsanopoulos | After the upgrade is finished, we bring up all services: |
223 | 68358dbe | Constantinos Venetsanopoulos | |
224 | 68358dbe | Constantinos Venetsanopoulos | .. code-block:: console |
225 | 68358dbe | Constantinos Venetsanopoulos | |
226 | 68358dbe | Constantinos Venetsanopoulos | astakos.host # service gunicorn start |
227 | 68358dbe | Constantinos Venetsanopoulos | cyclades.host # service gunicorn start |
228 | 68358dbe | Constantinos Venetsanopoulos | pithos.host # service gunicorn start |
229 | 68358dbe | Constantinos Venetsanopoulos | |
230 | 68358dbe | Constantinos Venetsanopoulos | cyclades.host # service snf-dispatcher start |