Revision 5c088197 docs/upgrade-0.13.rst
b/docs/upgrade-0.13.rst | ||
---|---|---|
206 | 206 |
3.3 Setup quota settings for all services |
207 | 207 |
----------------------------------------- |
208 | 208 |
|
209 |
Generally: |
|
210 |
|
|
209 | 211 |
:: |
210 | 212 |
|
211 | 213 |
# Service Setting Value |
... | ... | |
223 | 225 |
# pithos: PITHOS_QUOTAHOLDER_URL = http://quotaholder.host/quotaholder/v |
224 | 226 |
# All services must match the quotaholder token and url configured for quotaholder. |
225 | 227 |
|
228 |
Specifically: |
|
229 |
|
|
230 |
On the Astakos host, edit ``/etc/synnefo/20-snf-astakos-app-settings.conf``: |
|
231 |
|
|
232 |
:: |
|
233 |
|
|
234 |
QUOTAHOLDER_TOKEN = 'aExampleTokenJbFm12w' |
|
235 |
ASTAKOS_QUOTAHOLDER_TOKEN = 'aExampleTokenJbFm12w' |
|
236 |
ASTAKOS_QUOTAHOLDER_URL = 'https://accounts.synnefo.local/quotaholder/v' |
|
237 |
|
|
238 |
On the Cyclades host, edit ``/etc/synnefo/20-snf-cyclades-app-quotas.conf``: |
|
239 |
|
|
240 |
:: |
|
241 |
|
|
242 |
CYCLADES_USE_QUOTAHOLDER = True |
|
243 |
CYCLADES_QUOTAHOLDER_URL = 'https://accounts.synnefo.local/quotaholder/v' |
|
244 |
CYCLADES_QUOTAHOLDER_TOKEN = 'aExampleTokenJbFm12w' |
|
245 |
|
|
246 |
On the Pithos host, edit ``/etc/synnefo/20-snf-pithos-app-settings.conf``: |
|
247 |
|
|
248 |
:: |
|
249 |
|
|
250 |
PITHOS_QUOTAHOLDER_URL = 'https://accounts.synnefo.local/quotaholder/v' |
|
251 |
PITHOS_QUOTAHOLDER_TOKEN = 'aExampleTokenJbFm12w' |
|
252 |
|
|
226 | 253 |
3.4 Setup astakos |
227 | 254 |
----------------- |
228 | 255 |
|
229 |
- **Remove** this redirection from astakos front-end web server:: |
|
256 |
- **Remove** this redirection from astakos front-end web server ::
|
|
230 | 257 |
|
231 | 258 |
RewriteRule ^/login(.*) /im/login/redirect$1 [PT,NE] |
232 | 259 |
|
233 | 260 |
(see `<http://docs.dev.grnet.gr/synnefo/latest/quick-install-admin-guide.html#apache2-setup>`_) |
234 | 261 |
|
235 |
- Enable users to change their contact email with the setting:: |
|
262 |
- Enable users to change their contact email. Edit |
|
263 |
``/etc/synnefo/20-snf-astakos-app-settings.conf`` :: |
|
236 | 264 |
|
237 |
# astakos: ASTAKOS_EMAILCHANGE_ENABLED = True
|
|
265 |
ASTAKOS_EMAILCHANGE_ENABLED = True |
|
238 | 266 |
|
239 |
3.6 Setup Cyclades
|
|
267 |
3.5 Setup Cyclades
|
|
240 | 268 |
------------------ |
241 | 269 |
|
242 |
- Make sure this setting is set::
|
|
270 |
- Run on the Astakos host ::
|
|
243 | 271 |
|
244 |
# cyclades: CYCLADES_ASTAKOS_SERVICE_TOKEN = 'secretstring'
|
|
272 |
# snf-manage service-list
|
|
245 | 273 |
|
246 |
from the value in::
|
|
274 |
- Set the Cyclades service token in ``/etc/synnefo/20-snf-cyclades-app-api.conf`` ::
|
|
247 | 275 |
|
248 |
astakos.host$ snf-manage service-list |
|
249 |
|
|
250 |
- The Cyclades user interface needs to translate uuids to displaynames:: |
|
251 |
|
|
252 |
# cyclades: UI_USER_CATALOG_URL = 'https://astakos.host/user_catalogs/' |
|
276 |
CYCLADES_ASTAKOS_SERVICE_TOKEN = 'asfasdf_CycladesServiceToken_iknl' |
|
253 | 277 |
|
254 | 278 |
- Since version 0.13, Synnefo uses **VMAPI** in order to prevent sensitive data |
255 | 279 |
needed by 'snf-image' to be stored in Ganeti configuration (e.g. VM |
256 | 280 |
password). This is achieved by storing all sensitive information to a CACHE |
257 | 281 |
backend and exporting it via VMAPI. The cache entries are invalidated after |
258 | 282 |
the first request. Synnefo uses **memcached** as a django cache backend. |
259 |
To install:: |
|
283 |
To install, run on the Cyclades host::
|
|
260 | 284 |
|
261 | 285 |
apt-get install memcached |
262 | 286 |
apt-get install python-memcache |
263 | 287 |
|
264 | 288 |
You will also need to configure Cyclades to use the memcached cache backend. |
265 | 289 |
Namely, you need to set IP address and port of the memcached daemon, and the |
266 |
default timeout (seconds tha value is stored in the cache):: |
|
290 |
default timeout (seconds tha value is stored in the cache). Edit |
|
291 |
``/etc/synnefo/20-snf-cyclades-app-vmapi.conf`` :: |
|
267 | 292 |
|
268 | 293 |
VMAPI_CACHE_BACKEND = "memcached://127.0.0.1:11211/?timeout=3600" |
269 | 294 |
|
270 | 295 |
|
271 | 296 |
Finally, set the BASE_URL for the VMAPI, which is actually the base URL of |
272 |
Cyclades:: |
|
297 |
Cyclades, again in ``/etc/synnefo/20-snf-cyclades-app-vmapi.conf``::
|
|
273 | 298 |
|
274 | 299 |
VMAPI_BASE_URL = "https://cyclades.okeanos.grnet.gr/" |
275 | 300 |
|
... | ... | |
288 | 313 |
---------------- |
289 | 314 |
|
290 | 315 |
- Pithos forwards user catalog services to Astakos so that web clients may |
291 |
access them for uuid-displayname translations:: |
|
316 |
access them for uuid-displayname translations. Edit on the Pithos host |
|
317 |
``/etc/synnefo/20-snf-pithos-app-settings.conf`` :: |
|
292 | 318 |
|
293 |
# pithos: PITHOS_USER_CATALOG_URL = https://astakos.host/user_catalogs/
|
|
294 |
# pithos: PITHOS_USER_FEEDBACK_URL = https://astakos.host/feedback/
|
|
295 |
# pithos: PITHOS_USER_LOGIN_URL = https://astakos.host/login/
|
|
296 |
# pithos: #PITHOS_PROXY_USER_SERVICES = True # Set False if astakos & pithos are on the same host
|
|
319 |
PITHOS_USER_CATALOG_URL = https://accounts.synnefo.local/user_catalogs/
|
|
320 |
PITHOS_USER_FEEDBACK_URL = https://accounts.synnefo.local/feedback/
|
|
321 |
PITHOS_USER_LOGIN_URL = https://accounts.synnefo.local/login/
|
|
322 |
#PITHOS_PROXY_USER_SERVICES = True # Set False if astakos & pithos are on the same host |
|
297 | 323 |
|
298 | 324 |
|
299 | 325 |
4. Start astakos and quota services |
300 | 326 |
=================================== |
301 |
E.g.:: |
|
327 |
Start the webserver and gunicorn on the Astakos host. E.g.::
|
|
302 | 328 |
|
303 |
astakos.host$ service gunicorn start |
|
329 |
# service apache2 start |
|
330 |
# service gunicorn start |
|
304 | 331 |
|
305 | 332 |
.. warning:: |
306 | 333 |
|
... | ... | |
312 | 339 |
5. Load resource definitions into Astakos |
313 | 340 |
========================================= |
314 | 341 |
|
315 |
Configure and load the available resources per service |
|
316 |
and associated default limits into Astakos:: |
|
317 |
|
|
318 |
astakos.host$ snf-manage astakos-init --load-service-resources |
|
319 |
|
|
320 |
Example astakos settings (from `okeanos.io <https://okeanos.io/>`_):: |
|
342 |
First, set the corresponding values on the following dict in |
|
343 |
``/etc/synnefo/20-snf-astakos-app-settings.conf`` :: |
|
321 | 344 |
|
322 | 345 |
# Set the cloud service properties |
323 | 346 |
ASTAKOS_SERVICES = { |
... | ... | |
368 | 391 |
} |
369 | 392 |
} |
370 | 393 |
|
394 |
Then, configure and load the available resources per service |
|
395 |
and associated default limits into Astakos. On the Astakos host run :: |
|
396 |
|
|
397 |
# snf-manage astakos-init --load-service-resources |
|
398 |
|
|
399 |
|
|
371 | 400 |
.. note:: |
372 | 401 |
|
373 | 402 |
Before v0.13, only `cyclades.vm`, `cyclades.network.private`, |
... | ... | |
413 | 442 |
|
414 | 443 |
Duplicate user found? |
415 | 444 |
|
416 |
- either *merge* (merge will merge all resources to one user):: |
|
445 |
If you want to migrate files first: |
|
446 |
|
|
447 |
- *merge* (merge will merge all resources to one user):: |
|
417 | 448 |
|
418 | 449 |
pithos.host$ snf-manage pithos-manage-accounts --merge-accounts --src-account=SPapagian@grnet.gr --dest-account=spapagian@grnet.gr |
419 | 450 |
# (SPapagian@grnet.gr's contents will be merged into spapagian@grnet.gr, but SPapagian@grnet.gr account will still exist) |
420 | 451 |
|
421 |
- finally *delete* ::
|
|
452 |
- and then *delete* ::
|
|
422 | 453 |
|
423 | 454 |
pithos.host$ snf-manage pithos-manage-accounts --delete-account=SPapagian@grnet.gr |
424 | 455 |
# (only SPapagian@grnet.gr will be deleted not spapagian@grnet.gr) |
425 | 456 |
|
426 |
6.2 Migrate Cyclades users (email case/uuid) |
|
457 |
If you do *NOT* want to migrate files just run the second step and delete |
|
458 |
the duplicate account. |
|
459 |
|
|
460 |
6.3 Migrate Cyclades users (email case/uuid) |
|
427 | 461 |
-------------------------------------------- |
428 | 462 |
|
429 | 463 |
:: |
... | ... | |
438 | 472 |
|
439 | 473 |
cyclades.host$ snf-manage cyclades-astakos-migrate-013 --delete-user=<userid> |
440 | 474 |
|
441 |
6.3 Migrate Pithos user names |
|
475 |
Finally, if you have set manually quotas for specific users inside |
|
476 |
``/etc/synnefo/20-snf-cyclades-app-api.conf`` (in ``VMS_USER_QUOTA``, |
|
477 |
``NETWORKS_USER_QUOTA`` make sure to update them so that: |
|
478 |
|
|
479 |
1. There are no double entries wrt case sensitivity |
|
480 |
2. Replace all user email addresses with the corresponding UUIDs |
|
481 |
|
|
482 |
To find the UUIDs for step 2 run on the Astakos host :: |
|
483 |
|
|
484 |
# snf-manage user-list |
|
485 |
|
|
486 |
6.4 Migrate Pithos user names |
|
442 | 487 |
----------------------------- |
443 | 488 |
|
444 | 489 |
Check if alembic has not been initialized :: |
Also available in: Unified diff