Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (5.4 kB)

1 857383e3 Giorgos Korfiatis
Upgrade to Synnefo v0.14
2 857383e3 Giorgos Korfiatis
^^^^^^^^^^^^^^^^^^^^^^^^
3 857383e3 Giorgos Korfiatis
4 61c39121 Giorgos Korfiatis
The upgrade to v0.14 consists in three steps:
5 857383e3 Giorgos Korfiatis
6 61c39121 Giorgos Korfiatis
1. Bring down services and backup databases.
7 61c39121 Giorgos Korfiatis
8 61c39121 Giorgos Korfiatis
2. Upgrade packages, migrate the databases and configure settings.
9 61c39121 Giorgos Korfiatis
10 61c39121 Giorgos Korfiatis
3. Register services to astakos and perform a quota-related data migration.
11 857383e3 Giorgos Korfiatis
12 857383e3 Giorgos Korfiatis
.. warning::
13 857383e3 Giorgos Korfiatis
14 857383e3 Giorgos Korfiatis
    It is strongly suggested that you keep separate database backups
15 61c39121 Giorgos Korfiatis
    for each service after the completion of each step.
16 857383e3 Giorgos Korfiatis
17 857383e3 Giorgos Korfiatis
1. Bring web services down, backup databases
18 857383e3 Giorgos Korfiatis
============================================
19 857383e3 Giorgos Korfiatis
20 857383e3 Giorgos Korfiatis
1. All web services must be brought down so that the database maintains a
21 857383e3 Giorgos Korfiatis
   predictable and consistent state during the migration process::
22 857383e3 Giorgos Korfiatis
23 61c39121 Giorgos Korfiatis
    $ service gunicorn stop
24 61c39121 Giorgos Korfiatis
    $ service snf-dispatcher stop
25 61c39121 Giorgos Korfiatis
    etc.
26 857383e3 Giorgos Korfiatis
27 857383e3 Giorgos Korfiatis
2. Backup databases for recovery to a pre-migration state.
28 857383e3 Giorgos Korfiatis
29 857383e3 Giorgos Korfiatis
3. Keep the database servers running during the migration process
30 857383e3 Giorgos Korfiatis
31 857383e3 Giorgos Korfiatis
32 857383e3 Giorgos Korfiatis
2. Upgrade Synnefo and configure settings
33 857383e3 Giorgos Korfiatis
=========================================
34 857383e3 Giorgos Korfiatis
35 61c39121 Giorgos Korfiatis
2.1 Install the new versions of packages
36 61c39121 Giorgos Korfiatis
----------------------------------------
37 61c39121 Giorgos Korfiatis
38 61c39121 Giorgos Korfiatis
::
39 61c39121 Giorgos Korfiatis
40 61c39121 Giorgos Korfiatis
    astakos.host$ apt-get install \
41 61c39121 Giorgos Korfiatis
                            snf-common \
42 61c39121 Giorgos Korfiatis
                            astakosclient \
43 61c39121 Giorgos Korfiatis
                            snf-django-lib \
44 61c39121 Giorgos Korfiatis
                            snf-webproject \
45 61c39121 Giorgos Korfiatis
                            snf-branding \
46 61c39121 Giorgos Korfiatis
                            snf-astakos-app
47 61c39121 Giorgos Korfiatis
48 61c39121 Giorgos Korfiatis
    cyclades.host$ apt-get install \
49 61c39121 Giorgos Korfiatis
                            snf-common \
50 61c39121 Giorgos Korfiatis
                            astakosclient \
51 61c39121 Giorgos Korfiatis
                            snf-django-lib \
52 61c39121 Giorgos Korfiatis
                            snf-webproject \
53 61c39121 Giorgos Korfiatis
                            snf-branding \
54 61c39121 Giorgos Korfiatis
                            snf-pithos-backend \
55 61c39121 Giorgos Korfiatis
                            snf-vncauthproxy \
56 61c39121 Giorgos Korfiatis
                            snf-cyclades-app
57 61c39121 Giorgos Korfiatis
58 61c39121 Giorgos Korfiatis
    pithos.host$ apt-get install \
59 61c39121 Giorgos Korfiatis
                            snf-common \
60 61c39121 Giorgos Korfiatis
                            astakosclient \
61 61c39121 Giorgos Korfiatis
                            snf-django-lib \
62 61c39121 Giorgos Korfiatis
                            snf-webproject \
63 61c39121 Giorgos Korfiatis
                            snf-branding \
64 61c39121 Giorgos Korfiatis
                            snf-pithos-backend \
65 61c39121 Giorgos Korfiatis
                            snf-pithos-app \
66 61c39121 Giorgos Korfiatis
                            snf-pithos-webclient
67 61c39121 Giorgos Korfiatis
68 61c39121 Giorgos Korfiatis
    ganeti.node$ apt-get install \
69 61c39121 Giorgos Korfiatis
                            snf-common \
70 61c39121 Giorgos Korfiatis
                            snf-network \
71 61c39121 Giorgos Korfiatis
                            snf-cyclades-gtools \
72 61c39121 Giorgos Korfiatis
                            snf-pithos-backend
73 61c39121 Giorgos Korfiatis
74 61c39121 Giorgos Korfiatis
.. note::
75 61c39121 Giorgos Korfiatis
76 61c39121 Giorgos Korfiatis
    Installing the packages will cause services to start. Make sure you bring
77 61c39121 Giorgos Korfiatis
    them down again (at least ``gunicorn``, ``snf-dispatcher``)
78 61c39121 Giorgos Korfiatis
79 61c39121 Giorgos Korfiatis
80 61c39121 Giorgos Korfiatis
2.2 Sync and migrate the database
81 61c39121 Giorgos Korfiatis
---------------------------------
82 857383e3 Giorgos Korfiatis
83 857383e3 Giorgos Korfiatis
.. note::
84 857383e3 Giorgos Korfiatis
85 857383e3 Giorgos Korfiatis
   If you are asked about stale content types during the migration process,
86 857383e3 Giorgos Korfiatis
   answer 'no' and let the migration finish.
87 857383e3 Giorgos Korfiatis
88 857383e3 Giorgos Korfiatis
::
89 857383e3 Giorgos Korfiatis
90 857383e3 Giorgos Korfiatis
    astakos-host$ snf-manage syncdb
91 857383e3 Giorgos Korfiatis
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
92 857383e3 Giorgos Korfiatis
    astakos-host$ snf-manage migrate quotaholder_app
93 857383e3 Giorgos Korfiatis
    astakos-host$ snf-manage migrate im
94 857383e3 Giorgos Korfiatis
95 857383e3 Giorgos Korfiatis
    cyclades-host$ snf-manage syncdb
96 857383e3 Giorgos Korfiatis
    cyclades-host$ snf-manage migrate
97 857383e3 Giorgos Korfiatis
98 61c39121 Giorgos Korfiatis
    pithos-host$ pithos-migrate upgrade head
99 857383e3 Giorgos Korfiatis
100 e3ff6830 Georgios D. Tsoukalas
2.3 Configure Base URL settings for all services
101 e3ff6830 Georgios D. Tsoukalas
------------------------------------------------
102 e3ff6830 Georgios D. Tsoukalas
103 e3ff6830 Georgios D. Tsoukalas
In order to make all services' URLs configurable and discoverable from
104 e3ff6830 Georgios D. Tsoukalas
a single endpoint in Astakos through the Openstack Keystone API,
105 e3ff6830 Georgios D. Tsoukalas
every service has a ``XXXXX_BASE_URL`` setting, or it's old corresponding
106 e3ff6830 Georgios D. Tsoukalas
setting was renamed to this. Therefore:
107 e3ff6830 Georgios D. Tsoukalas
108 e3ff6830 Georgios D. Tsoukalas
* Rename ``ASTAKOS_URL`` setting to ``ASTAKOS_BASE_URL``
109 e3ff6830 Georgios D. Tsoukalas
  everywhere in your settings, in all nodes and all config files.
110 e3ff6830 Georgios D. Tsoukalas
  This must point to the top-level Astakos URL.
111 e3ff6830 Georgios D. Tsoukalas
112 e3ff6830 Georgios D. Tsoukalas
* In Cyclades settings, rename the ``APP_INSTALL_URL`` setting
113 e3ff6830 Georgios D. Tsoukalas
  to ``CYCLADES_BASE_URL``. If no such setting has been configured,
114 e3ff6830 Georgios D. Tsoukalas
  you must set it. It must point to the top-level Cyclades URL.
115 18c4414d Giorgos Korfiatis
  Rename ``CYCLADES_ASTAKOS_SERVICE_TOKEN`` to ``CYCLADES_SERVICE_TOKEN``.
116 e3ff6830 Georgios D. Tsoukalas
117 e3ff6830 Georgios D. Tsoukalas
* In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting.
118 e3ff6830 Georgios D. Tsoukalas
  It must point to the top-level Pithos URL.
119 e3ff6830 Georgios D. Tsoukalas
120 3f31a848 Giorgos Korfiatis
3 Register services and migrate quota
121 3f31a848 Giorgos Korfiatis
=====================================
122 857383e3 Giorgos Korfiatis
123 3f31a848 Giorgos Korfiatis
You need to register astakos as a component. Moreover you need to register
124 3f31a848 Giorgos Korfiatis
all services provided by cyclades and pithos.
125 857383e3 Giorgos Korfiatis
126 3f31a848 Giorgos Korfiatis
Running the following script you will be asked to provide the base
127 3f31a848 Giorgos Korfiatis
installation URL for each component. You will also need to specify the URL
128 3f31a848 Giorgos Korfiatis
where the astakos UI resides::
129 857383e3 Giorgos Korfiatis
130 b4109758 Giorgos Korfiatis
    astakos-host$ snf-component-register
131 b446c082 Giorgos Korfiatis
132 b446c082 Giorgos Korfiatis
.. note::
133 b446c082 Giorgos Korfiatis
134 3f31a848 Giorgos Korfiatis
   This command is equivalent to running the following series of commands;
135 3f31a848 Giorgos Korfiatis
   in each host it exports the respective service definitions, copies the
136 3f31a848 Giorgos Korfiatis
   exported json file to the astakos host, where it finally imports it:
137 3f31a848 Giorgos Korfiatis
138 3f31a848 Giorgos Korfiatis
    .. code-block:: console
139 3f31a848 Giorgos Korfiatis
140 3f31a848 Giorgos Korfiatis
       astakos-host$ snf-manage component-add astakos ui_url
141 3f31a848 Giorgos Korfiatis
       astakos-host$ snf-manage service-export-astakos > astakos.json
142 3f31a848 Giorgos Korfiatis
       astakos-host$ snf-manage service-import --json astakos.json
143 3f31a848 Giorgos Korfiatis
       cyclades-host$ snf-manage service-export-cyclades > cyclades.json
144 3f31a848 Giorgos Korfiatis
       # copy the file to astakos-host
145 3f31a848 Giorgos Korfiatis
       astakos-host$ snf-manage service-import --json cyclades.json
146 3f31a848 Giorgos Korfiatis
       pithos-host$ snf-manage service-export-pithos > pithos.json
147 3f31a848 Giorgos Korfiatis
       # copy the file to astakos-host
148 3f31a848 Giorgos Korfiatis
       astakos-host$ snf-manage service-import --json pithos.json
149 857383e3 Giorgos Korfiatis
150 1f5565c3 Giorgos Korfiatis
The limit on pending project applications is since 0.14 handled as an
151 ae883db3 Giorgos Korfiatis
Astakos resource, rather than a custom setting. Command::
152 857383e3 Giorgos Korfiatis
153 1f5565c3 Giorgos Korfiatis
    astakos-host$ astakos-migrate-0.14
154 857383e3 Giorgos Korfiatis
155 ae883db3 Giorgos Korfiatis
will prompt you to set this limit (replacing setting
156 ae883db3 Giorgos Korfiatis
ASTAKOS_PENDING_APPLICATION_LIMIT) and then automatically migrate the
157 ae883db3 Giorgos Korfiatis
user-specific base quota for the new resource ``astakos.pending_app`` using
158 ae883db3 Giorgos Korfiatis
the deprecated user setting.