upgrade-0.14.rst 3.69 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
Upgrade to Synnefo v0.14
^^^^^^^^^^^^^^^^^^^^^^^^

The bulk of the upgrade to v0.14 is about resource and quota migrations.


.. warning::

    It is strongly suggested that you keep separate database backups
    for each service after the completion of each of step.

1. Bring web services down, backup databases
============================================

1. All web services must be brought down so that the database maintains a
   predictable and consistent state during the migration process::

    # service gunicorn stop
    # service snf-dispatcher stop
    # etc.

2. Backup databases for recovery to a pre-migration state.

3. Keep the database servers running during the migration process


2. Upgrade Synnefo and configure settings
=========================================

2.2 Sync and migrate Django DB
------------------------------

.. note::

   If you are asked about stale content types during the migration process,
   answer 'no' and let the migration finish.

::

    astakos-host$ snf-manage syncdb
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
    astakos-host$ snf-manage migrate quotaholder_app
    astakos-host$ snf-manage migrate im

    cyclades-host$ snf-manage syncdb
    cyclades-host$ snf-manage migrate


3 Quota-related steps
=====================

Astakos and its resources should also get registered, so that they can
be known to the quota system.

Run::

    astakos-host$ snf-manage service-add astakos service_url api_url
    astakos-host$ snf-manage resource-export-astakos > astakos.json
    astakos-host$ snf-manage resource-import --json astakos.json

61 62 63
The limit on pending project applications is since 0.14 handled as an
Astakos resource, rather than a custom setting. In order to set this
limit (replacing setting ASTAKOS_PENDING_APPLICATION_LIMIT) run::
64

65
    astakos-host$ snf-manage resource-modify astakos.pending_app --limit <num>
66

67 68 69
To take into account the user-specific limits we need a data migration. The
following command populates the user-specific base quota for resource
``astakos.pending_app`` using the deprecated user setting::
70

71
    astakos-host$ astakos-migrate-0.14
72

73 74
Finally, Astakos needs to inform the quota system for the current number
of pending applications per user::
75

76
    astakos-host$ snf-manage reconcile-resources-astakos --fix
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

4 Change Astakos URIs in settings
=================================

In astakos-host edit ``/etc/synnefo/20-snf-astakos-app-cloudbar.conf`` and replace
the following lines:

.. code-block:: console

    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
    CLOUDBAR_MENU_URL = 'https://node1.example.com/im/get_menu'

with:

.. code-block:: console

    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/astakos/api/get_services'
    CLOUDBAR_MENU_URL = 'https://node1.example.com/astakos/api/get_menu'

|

Also in pithos-host edit ``/etc/synnefo/20-snf-pithos-webclient-cloudbar.conf``
and the following lines:

.. code-block:: console

    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
    CLOUDBAR_MENU_URL = 'https://node1.example.com/im/get_menu'

with:

.. code-block:: console

    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/astakos/api/get_services'
    CLOUDBAR_MENU_URL = 'https://node1.example.com/astakos/api/get_menu'

|

Finally in cyclades-node edit ``/etc/synnefo/20-snf-cyclades-app-cloudbar.conf``
and replace the following lines:

.. code-block:: console

   CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
   CLOUDBAR_MENU_URL = 'https://account.node1.example.com/im/get_menu'

with:

.. code-block:: console

   CLOUDBAR_SERVICES_URL = 'https://node1.example.com/astakos/api/get_services'
   CLOUDBAR_MENU_URL = 'https://account.node1.example.com/astakos/api/get_menu'