Statistics
| Branch: | Tag: | Revision:

root / docs / upgrade / upgrade-0.14.rst @ 0be81d73

History | View | Annotate | Download (3.3 kB)

1
Upgrade to Synnefo v0.14
2
^^^^^^^^^^^^^^^^^^^^^^^^
3

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

    
6

    
7
.. warning::
8

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

    
12
1. Bring web services down, backup databases
13
============================================
14

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

    
18
    # service gunicorn stop
19
    # service snf-dispatcher stop
20
    # etc.
21

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

    
24
3. Keep the database servers running during the migration process
25

    
26

    
27
2. Upgrade Synnefo and configure settings
28
=========================================
29

    
30
2.2 Sync and migrate Django DB
31
------------------------------
32

    
33
.. note::
34

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

    
38
::
39

    
40
    astakos-host$ snf-manage syncdb
41
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
42
    astakos-host$ snf-manage migrate quotaholder_app
43
    astakos-host$ snf-manage migrate im
44

    
45
    cyclades-host$ snf-manage syncdb
46
    cyclades-host$ snf-manage migrate
47

    
48

    
49
3 Quota-related steps
50
=====================
51

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

    
55
Run::
56

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

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

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

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

    
71
    astakos-host$ astakos-migrate-0.14
72

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

    
76
    astakos-host$ snf-manage reconcile-resources-astakos --fix
77

    
78
4 Change Astakos URIs in settings
79
=================================
80

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

    
84
.. code-block:: console
85

    
86
    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
87

    
88
with:
89

    
90
.. code-block:: console
91

    
92
    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/astakos/api/get_services'
93

    
94
|
95

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

    
99
.. code-block:: console
100

    
101
    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
102

    
103
with:
104

    
105
.. code-block:: console
106

    
107
    CLOUDBAR_SERVICES_URL = 'https://node1.example.com/astakos/api/get_services'
108

    
109
|
110

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

    
114
.. code-block:: console
115

    
116
   CLOUDBAR_SERVICES_URL = 'https://node1.example.com/im/get_services'
117

    
118
with:
119

    
120
.. code-block:: console
121

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