Statistics
| Branch: | Tag: | Revision:

root / docs / upgrade / upgrade-0.14.rst @ 61c39121

History | View | Annotate | Download (5.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
                            snf-common \
42
                            astakosclient \
43
                            snf-django-lib \
44
                            snf-webproject \
45
                            snf-branding \
46
                            snf-astakos-app
47

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

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

    
68
    ganeti.node$ apt-get install \
69
                            snf-common \
70
                            snf-network \
71
                            snf-cyclades-gtools \
72
                            snf-pithos-backend
73

    
74
.. note::
75

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

    
79

    
80
2.2 Sync and migrate the database
81
---------------------------------
82

    
83
.. note::
84

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

    
88
::
89

    
90
    astakos-host$ snf-manage syncdb
91
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
92
    astakos-host$ snf-manage migrate quotaholder_app
93
    astakos-host$ snf-manage migrate im
94

    
95
    cyclades-host$ snf-manage syncdb
96
    cyclades-host$ snf-manage migrate
97

    
98
    pithos-host$ pithos-migrate upgrade head
99

    
100
2.3 Configure Base URL settings for all services
101
------------------------------------------------
102

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

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

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

    
117
* In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting.
118
  It must point to the top-level Pithos URL.
119

    
120
3 Register services and migrate quota
121
=====================================
122

    
123
You need to register astakos as a component. Moreover you need to register
124
all services provided by cyclades and pithos.
125

    
126
Running the following script you will be asked to provide the base
127
installation URL for each component. You will also need to specify the URL
128
where the astakos UI resides::
129

    
130
    astakos-host$ snf-component-register
131

    
132
.. note::
133

    
134
   This command is equivalent to running the following series of commands;
135
   in each host it exports the respective service definitions, copies the
136
   exported json file to the astakos host, where it finally imports it:
137

    
138
    .. code-block:: console
139

    
140
       astakos-host$ snf-manage component-add astakos ui_url
141
       astakos-host$ snf-manage service-export-astakos > astakos.json
142
       astakos-host$ snf-manage service-import --json astakos.json
143
       cyclades-host$ snf-manage service-export-cyclades > cyclades.json
144
       # copy the file to astakos-host
145
       astakos-host$ snf-manage service-import --json cyclades.json
146
       pithos-host$ snf-manage service-export-pithos > pithos.json
147
       # copy the file to astakos-host
148
       astakos-host$ snf-manage service-import --json pithos.json
149

    
150
The limit on pending project applications is since 0.14 handled as an
151
Astakos resource, rather than a custom setting. Command::
152

    
153
    astakos-host$ astakos-migrate-0.14
154

    
155
will prompt you to set this limit (replacing setting
156
ASTAKOS_PENDING_APPLICATION_LIMIT) and then automatically migrate the
157
user-specific base quota for the new resource ``astakos.pending_app`` using
158
the deprecated user setting.