Merge lp:~jameinel/charms/precise/tarmac/add-install-dependencies into lp:~james-w/charms/precise/tarmac/trunk

Proposed by John A Meinel
Status: Needs review
Proposed branch: lp:~jameinel/charms/precise/tarmac/add-install-dependencies
Merge into: lp:~james-w/charms/precise/tarmac/trunk
Diff against target: 54 lines (+11/-3)
5 files modified
README (+1/-1)
config.yaml (+3/-0)
hooks/config-changed (+6/-0)
hooks/install (+0/-1)
revision (+1/-1)
To merge this branch: bzr merge lp:~jameinel/charms/precise/tarmac/add-install-dependencies
Reviewer Review Type Date Requested Status
James Westby Pending
Review via email: mp+144108@code.launchpad.net

Commit message

Add "install-dependencies" as a list of packages to install at config-changed time.

Small cleanup to README and the 'install' hook.

Description of the change

A few small changes:
 1) Typo in README
 2) Remove 'puppet' call during 'install' hook. AFAICT it wasn't actually doing anything, because puppet wouldn't have any of the config it actually needed to set up all the hooks, etc.
 3) Add "install-dependencies" as a config item. I can put all of my other 'get things running' into the "verify_command" step, but I needed to install packages as root.

To post a comment you must log in.
5. By John A Meinel

update the revision number, otherwise juju is really confused.

6. By John A Meinel

Small tweak.

You need to apt-get install '-y' so that it actually installs the packages.

Unmerged revisions

6. By John A Meinel

Small tweak.

You need to apt-get install '-y' so that it actually installs the packages.

5. By John A Meinel

update the revision number, otherwise juju is really confused.

4. By John A Meinel

Fix typo in the README

3. By John A Meinel

Add an install-dependencies config entry.

This way we can easily install packages that need to be available for the test suite to run.
We can't really put that into the tarmac-conf:verify_command because that
command runs as the tarmac user, not as root.
ATM we only support naming packages that should be installed,
that should keep this a bit more sane that just having a shell
script that gets run.

2. By John A Meinel

Remove the install-time puppet run.

Puppet needs to run during 'config-changed' not during 'install', because you don't
really have the config that puppet needs at 'install' time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2012-05-15 23:48:00 +0000
3+++ README 2013-01-22 11:19:21 +0000
4@@ -18,7 +18,7 @@
5 tarmac:
6 launchpad-username: <USERNAME>
7 public-key: ssh-rsa AAAAA...
8- private_key: |
9+ private-key: |
10 -----BEGIN RSA PRIVATE KEY-----
11 MII....
12 ...
13
14=== modified file 'config.yaml'
15--- config.yaml 2012-05-15 23:48:00 +0000
16+++ config.yaml 2013-01-22 11:19:21 +0000
17@@ -14,3 +14,6 @@
18 private-key:
19 description: The SSH private key to use to connect to Launchpad.
20 type: string
21+ install-dependencies:
22+ description: A list of packages to 'apt-get install' at 'install' time. This lets you inject packages that you will need at testing time.
23+ type: string
24
25=== modified file 'hooks/config-changed'
26--- hooks/config-changed 2012-05-15 23:48:00 +0000
27+++ hooks/config-changed 2013-01-22 11:19:21 +0000
28@@ -8,4 +8,10 @@
29 export FACTER_tarmac_conf="$(config-get tarmac-conf)"
30 export FACTER_launchpad_credentials="$(config-get launchpad-credentials)"
31
32+INSTALL_DEPS="$(config-get install-dependencies)"
33+
34+if [ -n "$INSTALL_DEPS" ]; then
35+ apt-get install -y $INSTALL_DEPS
36+fi
37+
38 puppet apply --templatedir=. tarmac.pp
39
40=== modified file 'hooks/install'
41--- hooks/install 2012-05-15 23:48:00 +0000
42+++ hooks/install 2013-01-22 11:19:21 +0000
43@@ -5,4 +5,3 @@
44 set -e
45
46 apt-get install -y puppet
47-puppet apply --templatedir=. tarmac.pp
48
49=== modified file 'revision'
50--- revision 2012-05-15 23:48:00 +0000
51+++ revision 2013-01-22 11:19:21 +0000
52@@ -1,1 +1,1 @@
53-4
54+6

Subscribers

People subscribed via source and target branches

to all changes: