Merge lp:~vila/ubuntu-ci-services-itself/tricks into lp:ubuntu-ci-services-itself

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Chris Johnston
Approved revision: 377
Merged at revision: 378
Proposed branch: lp:~vila/ubuntu-ci-services-itself/tricks
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 79 lines (+72/-0)
1 file modified
TRICKS (+72/-0)
To merge this branch: bzr merge lp:~vila/ubuntu-ci-services-itself/tricks
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+210756@code.launchpad.net

Commit message

How to install a hotfix on a deployed worker.

Description of the change

This documents the tricks I used to install hot fixes in a worker already deployed.

This works for the code in our payload but NOT for the charms !

Yet, it saved me from re-deploying the whole engine during the crazy
debugging session around private ppas and their fallouts.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:377
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/400/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/400/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

nice trick - better than what i'd been doing.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TRICKS'
2--- TRICKS 2014-03-10 22:30:06 +0000
3+++ TRICKS 2014-03-13 08:57:27 +0000
4@@ -281,3 +281,75 @@
5
6 This works because relations are independent of individual instances. A
7 relation can exist before any units do.
8+
9+Testing hot fixes on a specific instance
10+========================================
11+
12+If you want to test a specific fix for our code base (NOT a charm fix), you
13+can setup a branch on the instance and merge public branches into it.
14+
15+Using the test runner as an example, the process is to:
16+- turn the payload into a branch,
17+- acquire additional branches,
18+- merge branches into the payload,
19+- restart the service.
20+
21+
22+Turning the payload into a branch
23+---------------------------------
24+
25+Go to the instance and become root:
26+
27+$ juju ssh tr-rabbit-worker/0
28+$ sudo -H bash
29+
30+Setup a bzr shared repo so we don't need to download the whole history for
31+each branch we'll use.
32+
33+# bzr whoami "bugfixer <bugfixer@example.com>"
34+# cd /srv
35+# bzr init-repo .
36+# bzr branch lp:ubuntu-ci-services-itself trunk
37+
38+Really turn the payload into a branch:
39+
40+# cp -r trunk/.bzr tr_rabbit_worker/
41+# cd tr_rabbit_worker
42+# bzr st
43+# bzr commit -m 'Uploaded payload as of `date`'
44+
45+From there you have a real branch and can use the usual commands to check
46+its state: 'bzr status', 'bzr diff'.
47+
48+The expected output of 'bzr st' at that point is:
49+
50+# bzr st
51+unknown:
52+ amqp_config.py
53+ unit_config
54+
55+'amqp_config.py' has been generated by the rabbit charm, 'unit_config' comes
56+from the worker charm.
57+
58+Acquire additional branches
59+---------------------------
60+
61+$ cd /srv
62+$ bzr branch lp:~vila/ubuntu-ci-services-itself/hotfix
63+
64+Merge branches into the payload
65+-------------------------------
66+
67+$ cd /srv/tr_rabbit_worker
68+$ bzr merge ../hotfix
69+
70+Restart the service
71+-------------------
72+
73+$ initctl restart tr_rabbit_worker
74+
75+And voila, you're now running the worker in your deployment with the hot fix
76+applied.
77+
78+
79+

Subscribers

People subscribed via source and target branches