~coreygoldberg/uci-engine/subunit-results

« back to all changes in this revision

Viewing changes to docs/upgrade.rst

  • Committer: Corey Goldberg
  • Date: 2014-08-13 01:57:54 UTC
  • mfrom: (665.1.81 fix-lrt)
  • Revision ID: corey.goldberg@canonical.com-20140813015754-enosmrk904ebsrjh
re-merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
======================
2
 
Upgrading a deployment
 
2
Upgrading a Deployment
3
3
======================
4
 
Upgrading charms can be sped up using the --upgrade option given in
5
 
deploy.py
6
 
 
7
 
This will trigger the 'juju upgrade-charm' and will upgrade the charms according
8
 
to the content in the local repository.
9
 
 
10
 
This is particularly useful as described under "Upgrade" under
 
4
Upgrading charms can be sped up using the ``--upgrade`` option given in
 
5
``deploy.py``. The upgrade option is deployment aware and only attempts to
 
6
upgrade services that are deployed. Likewise, it will not modify any services
 
7
that are not described in the deployer configuration files.
 
8
 
 
9
The ``--upgrade`` option is described as:
 
10
 
 
11
.. code-block:: none
 
12
 
 
13
  --upgrade {charms,code,config,all}
 
14
                   Upgrade an existing deployment. This argument allows
 
15
                   you to choose the order and number of upgrade
 
16
                   operations. ie - you could just update the charms,
 
17
                   update the configs, or update the code.
 
18
 
 
19
 
 
20
The upgrade choices allow for fine grain control over specific aspects of
 
21
a deployment.
 
22
 
 
23
 * **charms** - This upgrades the charms themselves, performing
 
24
   ``juju upgrade-charm --force`` for each deployed service.
 
25
 * **config** - Updates the options for the deployed services via ``juju set``.
 
26
   This includes an update of the application code (as that is part of the
 
27
   deployment configuration).
 
28
 * **code** - This is a special case of the config option tht only updates the
 
29
   deployed application code. This is to provide an efficient path for the
 
30
   common development case of iterating on application code.
 
31
 * **all** - This is a synonym for ``--upgrade charms --upgrade config``.
 
32
 
 
33
These options are particularly useful when combined with the lxc deployment
 
34
method described under "Upgrade" under
11
35
:doc:`using-lxc-for-local-development`
12
36
 
 
37
Examples
 
38
--------
13
39
Assuming the initial setup of :doc:`using-lxc-for-local-development` or
14
40
:doc:`setting-up-a-cloud-deployment` has been performed, the generic steps
15
41
where upgrade becomes useful are:
16
42
 
 
43
.. note::
 
44
 
 
45
 In all of the below examples, if only a few services were deployed, the
 
46
 ``--upgrade`` option will only upgrade the services that were already
 
47
 deployed. No new services will be deployed as part of the upgrade.
 
48
 
 
49
--upgrade all
 
50
^^^^^^^^^^^^^
 
51
 
17
52
.. code-block:: none
18
53
 
19
54
   1) bzr branch lp:uci-engine
20
55
   2) juju bootstrap
21
56
   3) cd uci-engine
22
 
   4) ./juju-deployer/deploy.py  # "./juju-deployer/deploy.py test-runner" for depploying only test-runner service
23
 
   5) <do changes in charms for the deployed services>
24
 
   6) ./juju-deployer/deploy.py --upgrade # Please see the Note below
25
 
 
26
 
.. note::
27
 
 
28
 
 On instances where only a few services were deployed in step 4, the '--upgrade' option in step 6 will only upgrade the services that were already deployed in step 4. No new services will be deployed as part of the upgrade.
 
57
   4) ./juju-deployer/deploy.py
 
58
      or
 
59
   4) ./juju-deployer/deploy.py test-runner  # for deploying only test-runner service
 
60
   5) <do changes in charms and code for the deployed services>
 
61
   6) ./juju-deployer/deploy.py --upgrade all
 
62
 
 
63
 
 
64
--upgrade charms
 
65
^^^^^^^^^^^^^^^^
 
66
 
 
67
.. code-block:: none
 
68
 
 
69
   1-4) <same as --upgrade all example above>
 
70
   5) <do changes to charms for the deployed services>
 
71
   6) ./juju-deployer/deploy.py --upgrade charms
 
72
 
 
73
 
 
74
--upgrade config
 
75
^^^^^^^^^^^^^^^^
 
76
 
 
77
.. code-block:: none
 
78
 
 
79
   1-4) <same as --upgrade all example above>
 
80
   5) <do changes to charm config and/or code for the deployed services>
 
81
   6) ./juju-deployer/deploy.py --upgrade config
 
82
 
 
83
--upgrade code
 
84
^^^^^^^^^^^^^^
 
85
 
 
86
.. code-block:: none
 
87
 
 
88
   1-4) <same as --upgrade all example above>
 
89
   5) <do changes to code for the deployed services>
 
90
   6) ./juju-deployer/deploy.py --upgrade code
29
91
 
30
92
Upgrading adt-run for the test runner
31
93
-------------------------------------