New appliance: elasticsearch
This is an elasticsearch image/appliance.
This commit is contained in:
parent
995705d789
commit
0c19fb8470
|
@ -0,0 +1,31 @@
|
||||||
|
ES_HOME ?= /var/lib/elasticsearch
|
||||||
|
ES_VER ?= 1.7.1
|
||||||
|
ES_TARBALL = elasticsearch-$(ES_VER).tar.gz
|
||||||
|
ES_URL = https://download.elastic.co/elasticsearch/elasticsearch/$(ES_TARBALL)
|
||||||
|
|
||||||
|
preinstall:
|
||||||
|
|
||||||
|
create_user:
|
||||||
|
-$(inroot) useradd --system \
|
||||||
|
--comment "Elastic Search" \
|
||||||
|
--home-dir=$(ES_HOME) \
|
||||||
|
--create-home \
|
||||||
|
elastic
|
||||||
|
|
||||||
|
install_elasticsearch:
|
||||||
|
$(inroot) test -f /usr/portage/distfiles/$(ES_TARBALL) || \
|
||||||
|
wget -P /usr/portage/distfiles $(ES_URL)
|
||||||
|
$(inroot) tar xf /usr/portage/distfiles/$(ES_TARBALL) -C $(ES_HOME)
|
||||||
|
$(inroot) sh -c 'cd $(ES_HOME) && ln -s elasticsearch-$(ES_VER)/* .'
|
||||||
|
|
||||||
|
postinstall: elasticsearch.service
|
||||||
|
$(MAKE) create_user
|
||||||
|
$(inroot) rm -rf $(ES_HOME)
|
||||||
|
$(inroot) mkdir -p $(ES_HOME)
|
||||||
|
$(MAKE) install_elasticsearch
|
||||||
|
$(inroot) chown -R elastic:elastic $(ES_HOME)
|
||||||
|
cp elasticsearch.service $(CHROOT)/etc/systemd/system
|
||||||
|
$(inroot) systemctl enable elasticsearch.service
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
[Unit]
|
||||||
|
Description = ElasticSearch full-text search and analytics engine
|
||||||
|
After = network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User = elastic
|
||||||
|
Group = elastic
|
||||||
|
Environment=ES_HOME=/var/lib/elasticsearch
|
||||||
|
ExecStart = /var/lib/elasticsearch/bin/elasticsearch
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy = multi-user.target
|
|
@ -0,0 +1 @@
|
||||||
|
sys-kernel/gentoo-sources ~amd64 ~x86
|
|
@ -0,0 +1,12 @@
|
||||||
|
app-editors/nano ncurses
|
||||||
|
dev-lang/python ssl threads xml
|
||||||
|
dev-libs/libpcre cxx
|
||||||
|
dev-util/pkgconfig internal-glib
|
||||||
|
net-misc/openssh ssl
|
||||||
|
net-misc/wget ssl
|
||||||
|
sys-apps/hwids udev
|
||||||
|
sys-apps/kmod tools
|
||||||
|
sys-apps/portage ipc
|
||||||
|
sys-auth/pambase nullok sha512
|
||||||
|
sys-devel/gcc cxx nptl
|
||||||
|
sys-kernel/gentoo-sources symlink
|
|
@ -0,0 +1 @@
|
||||||
|
dev-java/icedtea-bin
|
Loading…
Reference in New Issue