Merge lp:~gary/charms/oneiric/buildbot-master/expand-readme into lp:~yellow/charms/oneiric/buildbot-master/trunk

Proposed by Gary Poster on 2012-02-28
Status: Merged
Approved by: Brad Crittenden on 2012-02-28
Approved revision: 36
Merged at revision: 35
Proposed branch: lp:~gary/charms/oneiric/buildbot-master/expand-readme
Merge into: lp:~yellow/charms/oneiric/buildbot-master/trunk
Diff against target: 137 lines (+75/-41)
2 files modified
HACKING.txt (+0/-30)
README.txt (+75/-11)
To merge this branch: bzr merge lp:~gary/charms/oneiric/buildbot-master/expand-readme
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code 2012-02-28 Approve on 2012-02-28
Review via email: mp+95029@code.launchpad.net

Description of the change

This branch adjusts the charm per our recent review: we collapse HACKING into README.

I also added and massaged the README a bit, including making some changes to accommodate changes in the sister branch https://code.launchpad.net/~gary/charms/oneiric/buildbot-slave/expand-readme .

Thank you

To post a comment you must log in.
Brad Crittenden (bac) wrote :

Looks good.

To be more obvious I'd expand "OOM".

I thought the juju_wrapper was going to be moved somewhere else. Let's remember to fix this README when that happens.

review: Approve (code)
37. By Gary Poster on 2012-02-28

tweak per review

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'HACKING.txt'
2--- HACKING.txt 2012-02-23 16:45:54 +0000
3+++ HACKING.txt 1970-01-01 00:00:00 +0000
4@@ -1,30 +0,0 @@
5-Running the charm tests
6-=======================
7-
8-1) Establish a charm repository if you do not already have one. A charm
9- repository is a directory with subdirectories for each Ubuntu version being
10- used. Inside those per-Ubuntu-version directories are the charm
11- directories. For example, to make a charm repository for this charm under
12- Oneiric follow these steps:
13-
14- a) mkdir -p ~/juju-charms/oneiric
15- b) ln -s `pwd` ~/juju-charms/oneiric/buildbot-master
16-
17-2) Copy the juju_wrapper file into some place earlier in your PATH than the
18- real juju executable, naming it "juju". Edit the CHARM_TEST_REPO variable
19- therein to reflect the location of the charm repo from step 1.
20-
21-3) Bootstrap the juju environment if not already done:
22-
23- juju bootstrap
24-
25-4) Run the tests: RESOLVE_TEST_CHARMS=1 tests/buildbot-master.test
26-
27-
28-XXX bac 2012-02-23: The tests do not run locally using precise. Set
29-default-series: oneiric to get them to pass.
30-
31-Running the charm helper tests
32-==============================
33-
34-Just run "python hooks/tests.py".
35
36=== modified file 'README.txt'
37--- README.txt 2012-02-10 22:05:39 +0000
38+++ README.txt 2012-02-28 20:02:17 +0000
39@@ -1,4 +1,35 @@
40-Demo of a single master.cfg file:
41+Usage
42+=====
43+
44+This charm depends on the buildbot-slave charm.
45+
46+It expects all configuration to be provided initially at deploy time,
47+using the --config option.
48+
49+You can provide a master.cfg file to use inline with your config file,
50+or you can provide a full branch that includes a master.cfg and any
51+other desired support files. If you provide a branch, be aware that
52+this charm expects to control the .tac file.
53+
54+In both cases, you need to modify your master.cfg file to be used by
55+the charm.
56+
57+ * The BuildmasterConfig's "slaves" key should usually be an empty
58+ list. This list will be populated by slaves dynamically as they
59+ join. You may be able to also define slaves that are hosted
60+ elsewhere (not in juju). This has not been tested and may need
61+ some adjustments to work.
62+
63+ * The "builders" key should contain instances of
64+ buildbot.config.BuilderConfig, not dicts. The "slavenames"
65+ argument should be a list of a single empty string. The empty
66+ string will be removed and replaced with the names of slaves that
67+ dynamically declare that they want to participate in those builds.
68+
69+Examples are below.
70+
71+Demo of a single master.cfg file
72+--------------------------------
73
74 This uses the standard buildbot Pyflakes example.
75
76@@ -11,18 +42,51 @@
77 juju set buildbot-slave builders=runtests
78 juju add-relation buildbot-slave buildbot-master
79
80-Tou can also run a master and slave that run Launchpad's tests, like so:
81+Look in the pyflakes.yaml file to see how the master.cfg was modified
82+as described above.
83+
84+Demo of a master.cfg in a branch with supporting files
85+------------------------------------------------------
86+
87+This is a pretty odd example in several ways, but you can also run a
88+master and slave that run Launchpad's tests, like so:
89
90 juju bootstrap
91 juju deploy --config=./charms/oneiric/buildbot-master/examples/lpbuildbot.yaml --repository=./charms local:buildbot-master
92-juju deploy --config=./charms/oneiric/buildbot-slave/config.setuplxc.yaml --repository=./charms local:buildbot-slave
93+juju deploy --config=./charms/oneiric/buildbot-slave/examples/lpbuildbot.yaml --repository=./charms local:buildbot-slave
94 juju add-relation buildbot-slave buildbot-master
95
96-XXX Running setuplxc takes a long time. For now, then, replace the
97-juju deploy of the slave with these two lines. This will mean that,
98-when it works, the slave will connect to the master but when it tries
99-to run tests it will fail (because the slave environment has not been
100-set up).
101-
102-juju deploy --repository=./charms local:buildbot-slave
103-juju set buildbot-slave builders=lucid_lp,lucid_db_lp
104+Note that starting up the buildbot-slave for Launchpad takes a very,
105+very long time (over two hours) and requires a large EC2 instance to
106+avoid out of memory errors.
107+
108+Running the charm tests
109+=======================
110+
111+1) Establish a charm repository if you do not already have one. A charm
112+ repository is a directory with subdirectories for each Ubuntu version being
113+ used. Inside those per-Ubuntu-version directories are the charm
114+ directories. For example, to make a charm repository for this charm under
115+ Oneiric follow these steps:
116+
117+ a) mkdir -p ~/juju-charms/oneiric
118+ b) ln -s `pwd` ~/juju-charms/oneiric/buildbot-master
119+
120+2) Copy the juju_wrapper file into some place earlier in your PATH than the
121+ real juju executable, naming it "juju". Edit the CHARM_TEST_REPO variable
122+ therein to reflect the location of the charm repo from step 1.
123+
124+3) Bootstrap the juju environment if not already done:
125+
126+ juju bootstrap
127+
128+4) Run the tests: RESOLVE_TEST_CHARMS=1 tests/buildbot-master.test
129+
130+
131+XXX bac 2012-02-23: The tests do not run locally using precise. Set
132+default-series: oneiric to get them to pass.
133+
134+Running the charm helper tests
135+==============================
136+
137+Just run "python hooks/tests.py".

Subscribers

People subscribed via source and target branches

to all changes: