Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (3.4 kB)

1
Upgrade to Synnefo v0.14
2
^^^^^^^^^^^^^^^^^^^^^^^^
3

    
4
The bulk of the upgrade to v0.14 is about resource and quota migrations.
5

    
6

    
7
.. warning::
8

    
9
    It is strongly suggested that you keep separate database backups
10
    for each service after the completion of each of step.
11

    
12
1. Bring web services down, backup databases
13
============================================
14

    
15
1. All web services must be brought down so that the database maintains a
16
   predictable and consistent state during the migration process::
17

    
18
    # service gunicorn stop
19
    # service snf-dispatcher stop
20
    # etc.
21

    
22
2. Backup databases for recovery to a pre-migration state.
23

    
24
3. Keep the database servers running during the migration process
25

    
26

    
27
2. Upgrade Synnefo and configure settings
28
=========================================
29

    
30
2.2 Sync and migrate Django DB
31
------------------------------
32

    
33
.. note::
34

    
35
   If you are asked about stale content types during the migration process,
36
   answer 'no' and let the migration finish.
37

    
38
::
39

    
40
    astakos-host$ snf-manage syncdb
41
    astakos-host$ snf-manage migrate quotaholder_app 0001 --fake
42
    astakos-host$ snf-manage migrate quotaholder_app
43
    astakos-host$ snf-manage migrate im
44

    
45
    cyclades-host$ snf-manage syncdb
46
    cyclades-host$ snf-manage migrate
47

    
48

    
49
2.3 Configure Base URL settings for all services
50
------------------------------------------------
51

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

    
57
* Rename ``ASTAKOS_URL`` setting to ``ASTAKOS_BASE_URL``
58
  everywhere in your settings, in all nodes and all config files.
59
  This must point to the top-level Astakos URL.
60

    
61
* In Cyclades settings, rename the ``APP_INSTALL_URL`` setting
62
  to ``CYCLADES_BASE_URL``. If no such setting has been configured,
63
  you must set it. It must point to the top-level Cyclades URL.
64

    
65
* In Pithos settings, introduce a ``PITHOS_BASE_URL`` setting.
66
  It must point to the top-level Pithos URL.
67

    
68
3 Register astakos service and migrate quota
69
============================================
70

    
71
You need to register Astakos as a service. The following command will ask
72
you to provide the service URL (to appear in the Cloudbar) as well as its
73
API URL. It will also automatically register the resource definitions
74
offered by astakos.
75

    
76
Run::
77

    
78
    astakos-host$ snf-register-services astakos
79

    
80
.. note::
81

    
82
   This command is equivalent to running:
83

    
84
   .. code-block:: console
85
     astakos-host$ snf-manage service-add astakos service_url api_url
86
     astakos-host$ snf-manage resource-export-astakos > astakos.json
87
     astakos-host$ snf-manage resource-import --json astakos.json
88

    
89

    
90
The limit on pending project applications is since 0.14 handled as an
91
Astakos resource, rather than a custom setting. In order to set this
92
limit (replacing setting ASTAKOS_PENDING_APPLICATION_LIMIT) run::
93

    
94
    astakos-host$ snf-manage resource-modify astakos.pending_app --limit <num>
95

    
96
To take into account the user-specific limits we need a data migration. The
97
following command populates the user-specific base quota for resource
98
``astakos.pending_app`` using the deprecated user setting::
99

    
100
    astakos-host$ astakos-migrate-0.14
101

    
102
Finally, Astakos needs to inform the quota system for the current number
103
of pending applications per user::
104

    
105
    astakos-host$ snf-manage reconcile-resources-astakos --fix