#cloud-config
hostname: elasticsearch
fqdn: elasticsearch
manage_etc_hosts: true
runcmd:
  - add-apt-repository ppa:webupd8team/java -y
  - echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
  - echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections
  - apt-get update
  - apt-get install oracle-java8-installer -y
  - wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.4.deb
  - dpkg -i elasticsearch-1.7.4.deb
  - "echo 'network.host: 0.0.0.0' > /etc/elasticsearch/elasticsearch.yml"
  - service elasticsearch start
