root / docs / upgrade / upgrade-0.16.rst @ b0b6d5ab
History | View | Annotate | Download (5.9 kB)
1 |
Upgrade to Synnefo v0.16 |
---|---|
2 |
^^^^^^^^^^^^^^^^^^^^^^^^ |
3 |
|
4 |
|
5 |
Upgrade Steps |
6 |
============= |
7 |
|
8 |
The upgrade to v0.16 consists in the following steps: |
9 |
|
10 |
1. Bring down services and backup databases. |
11 |
|
12 |
2. Upgrade packages, migrate the databases and configure settings. |
13 |
|
14 |
3. Inspect and adjust resource limits. |
15 |
|
16 |
4. Bring up all services. |
17 |
|
18 |
.. warning:: |
19 |
|
20 |
It is strongly suggested that you keep separate database backups |
21 |
for each service after the completion of each step. |
22 |
|
23 |
1. Bring web services down, backup databases |
24 |
============================================ |
25 |
|
26 |
1. All web services must be brought down so that the database maintains a |
27 |
predictable and consistent state during the migration process:: |
28 |
|
29 |
$ service gunicorn stop |
30 |
$ service snf-dispatcher stop |
31 |
$ service snf-ganeti-eventd stop |
32 |
|
33 |
2. Backup databases for recovery to a pre-migration state. |
34 |
|
35 |
3. Keep the database servers running during the migration process. |
36 |
|
37 |
|
38 |
2. Upgrade Synnefo and configure settings |
39 |
========================================= |
40 |
|
41 |
2.1 Install the new versions of packages |
42 |
---------------------------------------- |
43 |
|
44 |
:: |
45 |
|
46 |
astakos.host$ apt-get install \ |
47 |
python-objpool \ |
48 |
snf-common \ |
49 |
python-astakosclient \ |
50 |
snf-django-lib \ |
51 |
snf-webproject \ |
52 |
snf-branding \ |
53 |
snf-astakos-app |
54 |
|
55 |
cyclades.host$ apt-get install \ |
56 |
python-objpool \ |
57 |
snf-common \ |
58 |
python-astakosclient \ |
59 |
snf-django-lib \ |
60 |
snf-webproject \ |
61 |
snf-branding \ |
62 |
snf-pithos-backend \ |
63 |
snf-cyclades-app |
64 |
|
65 |
pithos.host$ apt-get install \ |
66 |
python-objpool \ |
67 |
snf-common \ |
68 |
python-astakosclient \ |
69 |
snf-django-lib \ |
70 |
snf-webproject \ |
71 |
snf-branding \ |
72 |
snf-pithos-backend \ |
73 |
snf-pithos-app \ |
74 |
snf-pithos-webclient |
75 |
|
76 |
ganeti.node$ apt-get install \ |
77 |
python-objpool \ |
78 |
snf-common \ |
79 |
snf-cyclades-gtools \ |
80 |
snf-pithos-backend \ |
81 |
snf-network |
82 |
|
83 |
.. note:: |
84 |
|
85 |
Make sure `snf-webproject' has the same version with snf-common |
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 |
104 |
|
105 |
cyclades-host$ snf-manage syncdb |
106 |
cyclades-host$ snf-manage migrate |
107 |
|
108 |
pithos-host$ pithos-migrate upgrade head |
109 |
|
110 |
|
111 |
3. Inspect and adjust resource limits |
112 |
===================================== |
113 |
|
114 |
Synnefo 0.16 brings significant changes at the project mechanism. Projects |
115 |
are now viewed as a source of finite resources, instead of a means to |
116 |
accumulate quota. They are the single source of resources, and quota are now |
117 |
managed at a project/member level. |
118 |
|
119 |
System-provided base quota are now handled through special purpose |
120 |
user-specific *base projects*, identified with the same UUID as the user. |
121 |
These have been created during the database migration process. They are |
122 |
included in the project listing with:: |
123 |
|
124 |
snf-manage project-list --base-projects |
125 |
|
126 |
All projects must specify quota limits for all registered resources. Default |
127 |
values have been set for all resources, listed with:: |
128 |
|
129 |
astakos-host$ snf-manage resource-list |
130 |
|
131 |
Column `base_default` (previously known as `default_quota`) provides the |
132 |
skeleton for the quota limits of user-specific base projects. Column |
133 |
`project_default` is new and acts as skeleton for `applied` (non-base) |
134 |
projects (i.e., for resources not specified in a project application). |
135 |
Project defaults have been initialized during migration based on the base |
136 |
default values: they have been set to `inf` if `base_default` is also `inf`, |
137 |
otherwise set to zero. |
138 |
|
139 |
This default, affecting all future projects, can be modified with:: |
140 |
|
141 |
astakos-host$ snf-manage resource-modify <name> --project-default <value> |
142 |
|
143 |
Till now a project definition contained one quota limit per resource: the |
144 |
maximum that a member can get from the project. A new limit is introduced: |
145 |
the grand maximum a project can provide to its members. This new project |
146 |
limit is initialized during migration as `max members * member limit` (if |
147 |
`max members` is not set, the double of current active members is assumed). |
148 |
|
149 |
Existing projects can now be modified directly through the command line. In |
150 |
order to change a project's resource limits, run:: |
151 |
|
152 |
astakos-host$ snf-manage project-modify <project_uuid> --limit <resource_name> <member_limit> <project_limit> |
153 |
|
154 |
With the new mechanism, when a new resource is allocated (e.g., a VM or a |
155 |
Pithos container is created), it is also associated with a project besides |
156 |
its owner. The migration process has associated existing resources with |
157 |
their owner's base project. Note that users who had made use of projects to |
158 |
increase their quota may end up overlimit on some resources of their base |
159 |
projects and will need to *reassign* some of their reserved resources to |
160 |
another project in order to overcome this restriction. |
161 |
|
162 |
4. Bring all services up |
163 |
======================== |
164 |
|
165 |
After the upgrade is finished, we bring up all services: |
166 |
|
167 |
.. code-block:: console |
168 |
|
169 |
astakos.host # service gunicorn start |
170 |
cyclades.host # service gunicorn start |
171 |
pithos.host # service gunicorn start |
172 |
|
173 |
cyclades.host # service snf-dispatcher start |