Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (6.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
.. warning::
13

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

    
17
1. Bring web services down, backup databases
18
============================================
19

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

    
23
    $ service gunicorn stop
24
    $ service snf-dispatcher stop
25
    etc.
26

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

    
29
3. Keep the database servers running during the migration process
30

    
31

    
32
2. Upgrade Synnefo and configure settings
33
=========================================
34

    
35
2.1 Install the new versions of packages
36
----------------------------------------
37

    
38
::
39

    
40
    astakos.host$ apt-get install \
41
                            python-objpool \
42
                            snf-common \
43
                            python-astakosclient \
44
                            snf-django-lib \
45
                            snf-webproject \
46
                            snf-branding \
47
                            snf-astakos-app
48

    
49
    cyclades.host$ apt-get install \
50
                            python-objpool \
51
                            snf-common \
52
                            python-astakosclient \
53
                            snf-django-lib \
54
                            snf-webproject \
55
                            snf-branding \
56
                            snf-pithos-backend \
57
                            snf-cyclades-app
58

    
59
    pithos.host$ apt-get install \
60
                            python-objpool \
61
                            snf-common \
62
                            python-astakosclient \
63
                            snf-django-lib \
64
                            snf-webproject \
65
                            snf-branding \
66
                            snf-pithos-backend \
67
                            snf-pithos-app \
68
                            snf-pithos-webclient
69

    
70
    ganeti.node$ apt-get install \
71
                            python-objpool \
72
                            snf-common \
73
                            snf-cyclades-gtools \
74
                            snf-pithos-backend
75

    
76
.. note::
77

    
78
    Installing the packages will cause services to start. Make sure you bring
79
    them down again (at least ``gunicorn``, ``snf-dispatcher``)
80

    
81

    
82
2.2 Sync and migrate the database
83
---------------------------------
84

    
85
.. note::
86

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

    
90
::
91

    
92
    astakos-host$ snf-manage syncdb
93
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
94
    astakos-host$ snf-manage migrate quotaholder_app
95
    astakos-host$ snf-manage migrate im
96

    
97
    cyclades-host$ snf-manage syncdb
98
    cyclades-host$ snf-manage migrate
99

    
100
    pithos-host$ pithos-migrate upgrade head
101

    
102
2.3 Configure Base URL settings for all services
103
------------------------------------------------
104

    
105
In order to make all services' URLs configurable and discoverable from
106
a single endpoint in Astakos through the Openstack Keystone API,
107
every service has a ``XXXXX_BASE_URL`` setting, or it's old corresponding
108
setting was renamed to this. Therefore:
109

    
110
* Rename ``ASTAKOS_URL`` setting to ``ASTAKOS_BASE_URL``
111
  everywhere in your settings, in all nodes and all config files.
112
  This must point to the top-level Astakos URL.
113

    
114
* In Cyclades settings, rename the ``APP_INSTALL_URL`` setting
115
  to ``CYCLADES_BASE_URL``. If no such setting has been configured,
116
  you must set it. It must point to the top-level Cyclades URL.
117
  Rename ``CYCLADES_ASTAKOS_SERVICE_TOKEN`` to ``CYCLADES_SERVICE_TOKEN``.
118

    
119
* In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting; it must point
120
  to the top-level Pithos URL. Rename ``PITHOS_QUOTAHOLDER_POOLSIZE``, if
121
  set, to ``PITHOS_ASTAKOSCLIENT_POOLSIZE``.
122

    
123
* In all 20-<service>-cloudbar.conf files change setting
124
  ``CLOUDBAR_SERVICES_URL`` to point to ``ASTAKOS_BASE_URL/ui/get_services``,
125
  where ``ASTAKOS_BASE_URL`` as above. Similarly, set
126
  ``CLOUDBAR_MENU_URL`` to ``ASTAKOS_BASE_URL/ui/get_menu``.
127

    
128

    
129
3 Register services and migrate quota
130
=====================================
131

    
132
You need to register astakos as a component. Moreover you need to register
133
all services provided by cyclades and pithos.
134
Running the following script you will be asked to provide the base
135
installation URL for each component. You will also need to specify the UI
136
URL for astakos.
137

    
138
The former is the location where each component resides; it should equal
139
the ``<component_name>_BASE_URL`` as specified in the respective component
140
settings (see above).
141

    
142
The latter is the URL that appears in the Cloudbar and leads to the
143
component UI. If you want to follow the default setup, set
144
the UI URL to ``<base_url>/ui/`` where ``base_url`` the component's base
145
URL as explained before. (You can later change the UI URL with
146
``snf-manage component-modify <component_name> --url new_ui_url``)::
147

    
148
    astakos-host$ snf-component-register
149

    
150
(proceed to the next step without running ``snf-manage resource-modify``
151
suggested at the end of this command)
152

    
153
.. note::
154

    
155
   This command is equivalent to running the following series of commands;
156
   in each host it exports the respective service definitions, copies the
157
   exported json file to the astakos host, where it finally imports it:
158

    
159
    .. code-block:: console
160

    
161
       astakos-host$ snf-manage component-add astakos ui_url
162
       astakos-host$ snf-manage service-export-astakos > astakos.json
163
       astakos-host$ snf-manage service-import --json astakos.json
164
       cyclades-host$ snf-manage service-export-cyclades > cyclades.json
165
       # copy the file to astakos-host
166
       astakos-host$ snf-manage service-import --json cyclades.json
167
       pithos-host$ snf-manage service-export-pithos > pithos.json
168
       # copy the file to astakos-host
169
       astakos-host$ snf-manage service-import --json pithos.json
170

    
171
The limit on pending project applications is since 0.14 handled as an
172
Astakos resource, rather than a custom setting. Command::
173

    
174
    astakos-host$ astakos-migrate-0.14
175

    
176
will prompt you to set this limit (replacing setting
177
ASTAKOS_PENDING_APPLICATION_LIMIT) and then automatically migrate the
178
user-specific base quota for the new resource ``astakos.pending_app`` using
179
the deprecated user setting.