Merge lp:~gandelman-a/charms/precise/jenkins-slave/extension_executors into lp:charms/jenkins-slave

Proposed by Adam Gandelman
Status: Work in progress
Proposed branch: lp:~gandelman-a/charms/precise/jenkins-slave/extension_executors
Merge into: lp:charms/jenkins-slave
Diff against target: 48 lines (+15/-2)
4 files modified
config.yaml (+3/-0)
hooks/slave-relation-joined (+6/-1)
metadata.yaml (+5/-0)
revision (+1/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/jenkins-slave/extension_executors
Reviewer Review Type Date Requested Status
Review Queue (community) cbt Needs Fixing
Adam Israel (community) Needs Fixing
James Page Pending
Review via email: mp+191744@code.launchpad.net

Description of the change

* Allows the # of executors to be configurable, defaulting to # of cores

* Adds the jenkins extenions interface, much like the master charm. This allows custom subordinates to be associated with the slaves and reduces the need to fork the main principle charm.

To post a comment you must log in.
12. By Adam Gandelman

Fix inspection of config.

Revision history for this message
Adam Israel (aisrael) wrote :

Hey Adam, thanks for the charm contribution and apologies for the delay in review. I took a look at the charm and ran into a few issues.

The initial charm proof didn't run cleanly, so I fixed those issues and continued on.

I deployed jenkins and jenkins-slave per the README, and added the relation between the news.

Once the relation is joined, changes to to the charm's executors config setting do not trigger jenkins master-relation-changed, where jenkins gets the value from the relation, like I would expect.

I then noticed that the executor count determined in slave-relation-joined isn't reflected back in the charm's config, so if a user is working with the juju gui, they don't see that value.

But -- if I destroyed the relation and manually set the executors to 3 (through juju GUI) and then added the relation, jenkins node configuration UI showed 6 executors.

Some of this may be expected behavior to someone more familiar with Jenkins. If so, it would be good to add these kind of caveats to the README.

Here's my branch, for reference:
lp:~aisrael/charms/precise/jenkins-slave/fix-extensions-executors

If you have any questions/comments/concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>, or ask a question tagged with "juju" on http://askubuntu.com.

review: Needs Fixing
Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-964-results

review: Needs Fixing (cbt)

Unmerged revisions

12. By Adam Gandelman

Fix inspection of config.

11. By Adam Gandelman

Add jenkins-extension interface and make # executors configurable.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2011-09-22 08:51:30 +0000
3+++ config.yaml 2013-10-18 02:50:45 +0000
4@@ -6,3 +6,6 @@
5 labels:
6 type: string
7 description: Jenkins labels to associate with jenkins slave node
8+ executors:
9+ type: int
10+ description: Number of job executors. Defaults to number of CPUs.
11
12=== modified file 'hooks/slave-relation-joined'
13--- hooks/slave-relation-joined 2012-07-27 09:52:29 +0000
14+++ hooks/slave-relation-joined 2013-10-18 02:50:45 +0000
15@@ -5,7 +5,12 @@
16 # Set the slave hostname to match the juju unit
17 # in the jenkins master instance
18 slavehost=`echo ${JUJU_UNIT_NAME} | sed s,/,-,`
19-noexecutors=`cat /proc/cpuinfo | grep processor | wc -l`
20+
21+noexecutors=`config-get executors`
22+if [[ -z "$noexecutors" ]] ; then
23+ noexecutors=`cat /proc/cpuinfo | grep processor | wc -l`
24+fi
25+
26 config_labels=`config-get labels`
27 labels=`uname -p`
28
29
30=== modified file 'metadata.yaml'
31--- metadata.yaml 2012-05-22 11:06:20 +0000
32+++ metadata.yaml 2013-10-18 02:50:45 +0000
33@@ -11,3 +11,8 @@
34 provides:
35 slave:
36 interface: jenkins-slave
37+ extension:
38+ interface: jenkins-extension
39+ scope: container
40+ optional: true
41+
42
43=== modified file 'revision'
44--- revision 2012-07-31 13:47:53 +0000
45+++ revision 2013-10-18 02:50:45 +0000
46@@ -1,1 +1,1 @@
47-8
48+11

Subscribers

People subscribed via source and target branches

to all changes: