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
=== modified file 'playbook.yaml'
--- playbook.yaml 2015-11-18 03:05:16 +0000
+++ playbook.yaml 2015-11-20 03:11:27 +0000
@@ -45,14 +45,6 @@
45 notify:45 notify:
46 - Restart ElasticSearch46 - Restart ElasticSearch
4747
48 - name: Set Elasticsearch user limits
49 tags:
50 - upgrade-charm
51 template: src={{ charm_dir }}/templates/limits.conf
52 dest=/etc/security/limits.d/elasticsearch.conf
53 notify:
54 - Restart ElasticSearch
55
56 - name: Open ES Port when exposed48 - name: Open ES Port when exposed
57 command: open-port 920049 command: open-port 9200
58 tags:50 tags:
5951
=== modified file 'tasks/install-elasticsearch.yml'
--- tasks/install-elasticsearch.yml 2015-10-01 19:00:31 +0000
+++ tasks/install-elasticsearch.yml 2015-11-20 03:11:27 +0000
@@ -45,3 +45,18 @@
45 - install45 - install
46 - upgrade-charm46 - upgrade-charm
47 when: stat_elasticsearch_deb.stat.exists == true47 when: stat_elasticsearch_deb.stat.exists == true
48
49- name: Set Elasticsearch user limits
50 tags:
51 - upgrade-charm
52 - install
53 template: src={{ charm_dir }}/templates/limits.conf
54 dest=/etc/security/limits.d/elasticsearch.conf
55 notify:
56 - Restart ElasticSearch
57
58- name: Ensure Elasticsearch is started on boot
59 tags:
60 - upgrade-charm
61 - install
62 service: name=elasticsearch enabled=yes

Subscribers

People subscribed via source and target branches