Merge lp:~jcsackett/charms/precise/charmworld/set-lp-credentials into lp:~juju-jitsu/charms/precise/charmworld/trunk

Proposed by j.c.sackett
Status: Merged
Merged at revision: 82
Proposed branch: lp:~jcsackett/charms/precise/charmworld/set-lp-credentials
Merge into: lp:~juju-jitsu/charms/precise/charmworld/trunk
Prerequisite: lp:~jcsackett/charms/precise/charmworld/cloud-tools-apt-fix
Diff against target: 41 lines (+12/-0)
3 files modified
config.yaml (+5/-0)
hooks/config-changed (+6/-0)
production_overrides.ini (+1/-0)
To merge this branch: bzr merge lp:~jcsackett/charms/precise/charmworld/set-lp-credentials
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+192073@code.launchpad.net

Commit message

Updates the charm to set the lp_credentials as a config option.

Description of the change

The new review job requires an authenticated login to LP via launchpadlib. This
updates the charm to put the right user's (Charmbot) credentials into the
charmworld unit.

config.yaml && hooks/config-changed
-----------------------------------
lp_credentials is added as a new option in config.yaml. hooks/config-changed
writes this out after the configure step. The location of the credentials file
is hardcoded to the webops_deploy/charmworld path.

production_overrides.ini
------------------------
The hardcoded path is added to the overrides. This is hardcoded b/c we're
already engaged in some magic to generate our .ini's--we want to minimize doing
this any further.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2013-09-20 12:39:25 +0000
+++ config.yaml 2013-10-22 00:33:37 +0000
@@ -47,3 +47,8 @@
47 The number of replicas used by ElasticSearch for indices.47 The number of replicas used by ElasticSearch for indices.
48 This number should not exceed the number of ElasticSearch nodes48 This number should not exceed the number of ElasticSearch nodes
49 minus one.49 minus one.
50 lp_credentials:
51 type: string
52 default: ''
53 description: |
54 The lp credentials to use with charmworld ingest, if available.
5055
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2013-07-08 19:45:50 +0000
+++ hooks/config-changed 2013-10-22 00:33:37 +0000
@@ -88,6 +88,12 @@
88 update_source88 update_source
89fi89fi
90configure90configure
91
92lp_credentials=`config-get lp_credentials`
93if [ -n "$lp_credentials" ]; then
94 config-get lp_credentials > /home/webops_deploy/charmworld/charmbot_credentials.txt
95fi
96
91chown webops_deploy.webops_deploy $project_dir -R97chown webops_deploy.webops_deploy $project_dir -R
92can_ingest=$(is_configured_to_ingest)98can_ingest=$(is_configured_to_ingest)
9399
94100
=== modified file 'production_overrides.ini'
--- production_overrides.ini 2013-05-02 18:40:07 +0000
+++ production_overrides.ini 2013-10-22 00:33:37 +0000
@@ -5,6 +5,7 @@
5mongo.host =5mongo.host =
6mongo.port =6mongo.port =
7mongo.url =7mongo.url =
8lp_credentials_file = "/home/webops_deploy/charmworld/charmbot_credentials.txt"
89
9[server:main]10[server:main]
10port = 654311port = 6543

Subscribers

People subscribed via source and target branches

to all changes: