Skip to content

Instantly share code, notes, and snippets.

@egeneralov
Created July 16, 2019 17:08
Show Gist options
  • Save egeneralov/f2fb23bc670c792b8f65360a1cf9d145 to your computer and use it in GitHub Desktop.
Save egeneralov/f2fb23bc670c792b8f65360a1cf9d145 to your computer and use it in GitHub Desktop.
#!/bin/bash -xe
# debian[-based]
apt-get update -q
apt-get install -yq gnupg2 curl apt-transport-https default-jre
curl -sL https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" > /etc/apt/sources.list.d/elastic.list
apt-get update -q
apt-get install -yq elasticsearch=6.7.1 kibana=6.7.1
/usr/share/elasticsearch/bin/elasticsearch-users useradd test_admin -p x-pack-test-password -r superuser
systemctl enable elasticsearch
systemctl start elasticsearch
sleep 20
echo -e 'server.host: 0.0.0.0\nelasticsearch.username: test_admin\nelasticsearch.password: x-pack-test-password\n' >> /etc/kibana/kibana.yml
echo -e '\nnetwork.host: 0.0.0.0\naction.auto_create_index: ".ent-search-*-logs-*,-.ent-search-*,+*"' >> /etc/elasticsearch/elasticsearch.yml
sleep 5
systemctl enable kibana
systemctl start kibana
[ -f enterprisesearch-0.1.0-beta1.tar.gz ] || curl -sLO https://download.elastic.co/downloads/enterprisesearch/enterprisesearch-0.1.0-beta1.tar.gz
[ -d enterprisesearch-0.1.0-beta1 ] || tar xzvf enterprisesearch-0.1.0-beta1.tar.gz
cd enterprisesearch-0.1.0-beta1
[ -f config/enterprise_search.yml.orig ] || cp config/enterprise_search.yml{,.orig}
echo 'ent_search:
listen_host: 0.0.0.0
listen_port: 3002
elasticsearch:
username: test_admin
password: x-pack-test-password
secret_session_key: 1e17fecec10a4fb801efe21d55c4675efe7f5e09ede3f1d2be36a9cd62c911c03d74285f37e8fafd1830f98cc6f5a4235a89230b1f354ec403965f776a8459f7
secret_management:
encryption_keys:
- 36f7831286edcbb2a16e54b82a991324a3d4d6a19e9eb247e70342db29f79b9b
allow_es_settings_modification: false' > config/enterprise_search.yml
bin/enterprise-search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment