Merge lp://staging/~sinzui/charms/precise/elasticsearch/exec-d-support into lp://staging/~charming-devs/charms/precise/elasticsearch/trunk
Status: | Merged |
---|---|
Merged at revision: | 39 |
Proposed branch: | lp://staging/~sinzui/charms/precise/elasticsearch/exec-d-support |
Merge into: | lp://staging/~charming-devs/charms/precise/elasticsearch/trunk |
Diff against target: |
172 lines (+60/-40) 6 files modified
config.yaml (+0/-4) hooks/common.sh (+17/-7) hooks/config-changed (+2/-6) hooks/install (+22/-22) revision (+1/-1) templates/elasticsearch.yml.tmpl (+18/-0) |
To merge this branch: | bzr merge lp://staging/~sinzui/charms/precise/elasticsearch/exec-d-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+157227@code.staging.launchpad.net |
Commit message
Update the charm to use templates and support exec.d for private clouds.
Description of the change
Update the charm to use templates and support exec.d for private clouds.
RULES
For Webops (mthaddon)
* Add an exec.d clause to allow webops to prepare the charm canonistack.
* Use cheetah to create elasticsearch.yml template.
ADDENDUM
* OMG! config is broken. While I lost the cluster-name when I updated
the charm to use apt, I find some small comfort that the config
could only be written once. Subsequent changes were either
ignored or error-ed.
* Always regenerate elasticsearch.yml when the config changes.
* The local plugin is ignored because the url has three-slashes in it:
file:/// which I think is correct, but
file:///var/ is changed to file:/var by the plugin installer, but it
does like file://var
IMPLEMENTATION:
I added the exec.d hook. The script fails over to the PPA I setup.
hooks/install
I extracted the AWS template (that webops will not use). I then moved the
rules to generate the yml to common.sh so that it can be called from both
install and config-changed.
templates/
templates/
hooks/common.sh
hooks/
hooks/install
Remove the extra slash to make bin/plugin happy.
hooks/install
Incremented the charm and removed config vars that are never used.
revision
config.yaml
Looks good. There are a lot of line breaks in the Cheetah template. Maybe remove the line breaks between #if / #endif and the sections they enclose?