Statistics
| Branch: | Tag: | Revision:

root / docs / upgrade / upgrade-0.14.rst @ f1be16bf

History | View | Annotate | Download (7.4 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

    
139
3 Register services and migrate quota
140
=====================================
141

    
142
You need to register astakos as a component. Moreover you need to register
143
all services provided by cyclades and pithos.
144
Running the following script you will be asked to provide the base
145
installation URL for each component. You will also need to specify the UI
146
URL for astakos.
147

    
148
The former is the location where each component resides; it should equal
149
the ``<component_name>_BASE_URL`` as specified in the respective component
150
settings (see above).
151

    
152
The latter is the URL that appears in the Cloudbar and leads to the
153
component UI. If you want to follow the default setup, set
154
the UI URL to ``<base_url>/ui/`` where ``base_url`` is the component's base
155
URL as explained before. (You can later change the UI URL with
156
``snf-manage component-modify <component_name> --url new_ui_url``).
157

    
158
For example, for Astakos, if
159
``BASE_URL = https://accounts.example.synnefo.org/astakos``,
160
then ``UI_URL = https://accounts.example.synnefo.org/astakos/ui``)::
161

    
162
    astakos-host$ snf-component-register
163

    
164
(ATTENTION: make sure to go to the next step *WITHOUT* running
165
``snf-manage resource-modify``, suggested at the end of this command)
166

    
167
.. note::
168

    
169
   This command is equivalent to running the following series of commands;
170
   in each host it exports the respective service definitions, copies the
171
   exported json file to the astakos host, where it finally imports it:
172

    
173
    .. code-block:: console
174

    
175
       astakos-host$ snf-manage component-add astakos ui_url
176
       astakos-host$ snf-manage service-export-astakos > astakos.json
177
       astakos-host$ snf-manage service-import --json astakos.json
178
       cyclades-host$ snf-manage service-export-cyclades > cyclades.json
179
       # copy the file to astakos-host
180
       astakos-host$ snf-manage service-import --json cyclades.json
181
       pithos-host$ snf-manage service-export-pithos > pithos.json
182
       # copy the file to astakos-host
183
       astakos-host$ snf-manage service-import --json pithos.json
184

    
185
The limit on the pending project applications is since 0.14 handled as an
186
Astakos resource, rather than a custom setting. So, as a last step we need
187
to run::
188

    
189
    astakos-host$ astakos-migrate-0.14
190

    
191
This will prompt you to set this limit (replacing setting
192
``ASTAKOS_PENDING_APPLICATION_LIMIT``) and then automatically migrate the
193
user-specific base quota for the new resource ``astakos.pending_app`` using
194
the deprecated user setting.
195

    
196
You are now done migrating from Synnefo v0.13 to v0.14. Please test your
197
installation to make sure everything works as expected.
198

    
199

    
200
4. Bring all services up
201
========================
202

    
203
After the upgrade is finished, we bring up all services:
204

    
205
.. code-block:: console
206

    
207
    astakos.host  # service gunicorn start
208
    cyclades.host # service gunicorn start
209
    pithos.host   # service gunicorn start
210

    
211
    cyclades.host # service snf-dispatcher start