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
=== modified file 'README'
--- README 2012-05-15 23:48:00 +0000
+++ README 2013-01-22 11:19:21 +0000
@@ -18,7 +18,7 @@
18 tarmac:18 tarmac:
19 launchpad-username: <USERNAME>19 launchpad-username: <USERNAME>
20 public-key: ssh-rsa AAAAA...20 public-key: ssh-rsa AAAAA...
21 private_key: |21 private-key: |
22 -----BEGIN RSA PRIVATE KEY-----22 -----BEGIN RSA PRIVATE KEY-----
23 MII....23 MII....
24 ...24 ...
2525
=== modified file 'config.yaml'
--- config.yaml 2012-05-15 23:48:00 +0000
+++ config.yaml 2013-01-22 11:19:21 +0000
@@ -14,3 +14,6 @@
14 private-key:14 private-key:
15 description: The SSH private key to use to connect to Launchpad.15 description: The SSH private key to use to connect to Launchpad.
16 type: string16 type: string
17 install-dependencies:
18 description: A list of packages to 'apt-get install' at 'install' time. This lets you inject packages that you will need at testing time.
19 type: string
1720
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2012-05-15 23:48:00 +0000
+++ hooks/config-changed 2013-01-22 11:19:21 +0000
@@ -8,4 +8,10 @@
8export FACTER_tarmac_conf="$(config-get tarmac-conf)"8export FACTER_tarmac_conf="$(config-get tarmac-conf)"
9export FACTER_launchpad_credentials="$(config-get launchpad-credentials)"9export FACTER_launchpad_credentials="$(config-get launchpad-credentials)"
1010
11INSTALL_DEPS="$(config-get install-dependencies)"
12
13if [ -n "$INSTALL_DEPS" ]; then
14 apt-get install -y $INSTALL_DEPS
15fi
16
11puppet apply --templatedir=. tarmac.pp17puppet apply --templatedir=. tarmac.pp
1218
=== modified file 'hooks/install'
--- hooks/install 2012-05-15 23:48:00 +0000
+++ hooks/install 2013-01-22 11:19:21 +0000
@@ -5,4 +5,3 @@
5set -e5set -e
66
7apt-get install -y puppet7apt-get install -y puppet
8puppet apply --templatedir=. tarmac.pp
98
=== modified file 'revision'
--- revision 2012-05-15 23:48:00 +0000
+++ revision 2013-01-22 11:19:21 +0000
@@ -1,1 +1,1 @@
1416

Subscribers

People subscribed via source and target branches

to all changes: