Merge lp:~michael.nelson/charms/trusty/elasticsearch/restart-on-reboot into lp:~onlineservices-charmers/charms/trusty/elasticsearch/elasticsearch2

Proposed by Michael Nelson
Status: Merged
Merged at revision: 43
Proposed branch: lp:~michael.nelson/charms/trusty/elasticsearch/restart-on-reboot
Merge into: lp:~onlineservices-charmers/charms/trusty/elasticsearch/elasticsearch2
Diff against target: 41 lines (+15/-8)
2 files modified
playbook.yaml (+0/-8)
tasks/install-elasticsearch.yml (+15/-0)
To merge this branch: bzr merge lp:~michael.nelson/charms/trusty/elasticsearch/restart-on-reboot
Reviewer Review Type Date Requested Status
Kelvin Li (community) Approve
Canonical Onlineservices charmers Pending
Review via email: mp+278094@code.launchpad.net

Commit message

Elasticsearch is started on boot (enabled=yes)
Move install/upgrade task for defaults into install-elasticsearch tasks

Description of the change

Tested locally with:

$ sudo lxc-stop -r --name michael-local-machine-2
dev-trusty# ~/configs/canonical-mojo-specs/is/mojo-is-logging-kibana
$ juju run --unit elasticsearch/0 "service elasticsearch status"
 * elasticsearch is running

which failed prior to this change.

To post a comment you must log in.
Revision history for this message
Kelvin Li (kelvin.li) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'playbook.yaml'
2--- playbook.yaml 2015-11-18 03:05:16 +0000
3+++ playbook.yaml 2015-11-20 03:11:27 +0000
4@@ -45,14 +45,6 @@
5 notify:
6 - Restart ElasticSearch
7
8- - name: Set Elasticsearch user limits
9- tags:
10- - upgrade-charm
11- template: src={{ charm_dir }}/templates/limits.conf
12- dest=/etc/security/limits.d/elasticsearch.conf
13- notify:
14- - Restart ElasticSearch
15-
16 - name: Open ES Port when exposed
17 command: open-port 9200
18 tags:
19
20=== modified file 'tasks/install-elasticsearch.yml'
21--- tasks/install-elasticsearch.yml 2015-10-01 19:00:31 +0000
22+++ tasks/install-elasticsearch.yml 2015-11-20 03:11:27 +0000
23@@ -45,3 +45,18 @@
24 - install
25 - upgrade-charm
26 when: stat_elasticsearch_deb.stat.exists == true
27+
28+- name: Set Elasticsearch user limits
29+ tags:
30+ - upgrade-charm
31+ - install
32+ template: src={{ charm_dir }}/templates/limits.conf
33+ dest=/etc/security/limits.d/elasticsearch.conf
34+ notify:
35+ - Restart ElasticSearch
36+
37+- name: Ensure Elasticsearch is started on boot
38+ tags:
39+ - upgrade-charm
40+ - install
41+ service: name=elasticsearch enabled=yes

Subscribers

People subscribed via source and target branches