~lazypower/charms/trusty/elasticsearch/fix-tests-unit-identifier

« back to all changes in this revision

Viewing changes to hooks/start

  • Committer: Charles Butler
  • Date: 2014-05-12 15:39:10 UTC
  • mfrom: (28.1.1 elasticsearch)
  • Revision ID: chuck@dasroot.net-20140512153910-80f871n2l4wjyayf
  [Justin SB] 2014-04-14 Updating to latest elasticsearch
  * Updates Elastic Search to 1.1.0
  * Replaces Java service wrapper with Upstart

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Here put anything that is needed to start the service.
3
3
# Note that currently this is run directly after install
4
4
# i.e. 'service apache2 start'
 
5
 
5
6
set -eux # -x for verbose logging to juju debug-log
 
7
 
6
8
HOME=`dirname $0`
7
9
. $HOME/common.sh
8
10
 
9
 
 
10
11
open-port 9200/tcp
11
12
open-port 9300/tcp
12
 
/opt/elasticsearch/bin/service/elasticsearch start
 
13
 
 
14
juju-log "run elasticsearch"
 
15
initctl start elasticsearch
 
16
 
 
17
juju-log "started"
13
18
 
14
19
# load up logstash template. 
15
20
# https://github.com/logstash/logstash/wiki/Elasticsearch-Storage-Optimization
16
21
# really we should do this as part of the relationship join.
17
 
juju-log "sleep 10seconds then install logstash template"
 
22
juju-log "sleep 10 seconds then install logstash template"
18
23
sleep 10s
19
24
curl -XPUT 'http://localhost:9200/_template/template_logstash/' -d @${HOME}/../files/charm/logstash-template.json