Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elasticsearch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai3
docker
elasticsearch
Commits
3133c283
Commit
3133c283
authored
Sep 28, 2018
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parents
Pipeline
#1255
canceled with stages
in 1 minute and 48 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
149 additions
and
0 deletions
+149
-0
.gitlab-ci.yml
.gitlab-ci.yml
+30
-0
Dockerfile
Dockerfile
+6
-0
README.md
README.md
+14
-0
build.sh
build.sh
+90
-0
conf/chaperone.d/elasticsearch-exporter.conf
conf/chaperone.d/elasticsearch-exporter.conf
+4
-0
conf/chaperone.d/elasticsearch.conf
conf/chaperone.d/elasticsearch.conf
+5
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
3133c283
image
:
docker:latest
stages
:
-
build
-
release
services
:
-
docker:dind
variables
:
IMAGE_TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG
:
$CI_REGISTRY_IMAGE:latest
before_script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
build
:
stage
:
build
script
:
-
docker build --pull -t $IMAGE_TAG .
-
docker push $IMAGE_TAG
release
:
stage
:
release
script
:
-
docker pull $IMAGE_TAG
-
docker tag $IMAGE_TAG $RELEASE_TAG
-
docker push $RELEASE_TAG
only
:
-
master
Dockerfile
0 → 100644
View file @
3133c283
FROM
registry.git.autistici.org/ai3/docker-chaperone-base:master
COPY
conf /tmp/conf
COPY
build.sh /tmp/build.sh
RUN
/tmp/build.sh
&&
rm
/tmp/build.sh
README.md
0 → 100644
View file @
3133c283
docker-elasticsearch
===
Simple Docker image for Elasticsearch, built using Debian packages.
Includes a Prometheus exporter.
The image expects /etc/elasticsearch to be provided externally, and
the following environment variables should be defined:
*
`PORT`
- the port for ES to listen on
*
`EXPORTER_PORT`
- the port for the exporter
You should probably also mount /var/log/elasticsearch and
/var/lib/elasticsearch to external storage.
build.sh
0 → 100755
View file @
3133c283
#!/bin/sh
#
# Install script for elasticsearch inside a Docker container.
#
# Packages that are only used to build the container. These will be
# removed once we're done.
BUILD_PACKAGES
=
"gnupg rsync"
# Packages to install.
PACKAGES
=
"
elasticsearch
elasticsearch-curator
"
# Release tarball for the elasticsearch prometheus exporter.
EXPORTER_RELEASE_URL
=
"https://github.com/justwatchcom/elasticsearch_exporter/releases/download/v1.0.4rc1/elasticsearch_exporter-1.0.4rc1.linux-amd64.tar.gz"
# The default bitnami/minideb image defines an 'install_packages'
# command which is just a convenient helper. Define our own in
# case we are using some other Debian image.
if
[
"x
$(
which install_packages
)
"
=
"x"
]
;
then
install_packages
()
{
env
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-qy
-o
Dpkg::Options::
=
"--force-confdef"
-o
Dpkg::Options::
=
"--force-confold"
--no-install-recommends
"
$@
"
}
fi
set
-x
set
-e
install_packages
${
BUILD_PACKAGES
}
# Install the elastic.co apt key and repository.
cat
| apt-key add -
<<
EOF
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.6
Comment: Hostname: pgp.mit.edu
mQENBFI3HsoBCADXDtbNJnxbPqB1vDNtCsqhe49vFYsZN9IOZsZXgp7aHjh6CJBDA+bGFOwy
hbd7at35jQjWAw1O3cfYsKAmFy+Ar3LHCMkV3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NgRt
KiFv9jQrg2TIWEvzYx9tywTCxc+FFMWAlbCzi+m4WD+QUWWfDQ009U/WM0ks0KwwEwSk/UDu
ToxGnKU2dQARAQABiQEfBBgBAgAJBQJSNx7KAhsMAAoJENJ9ZmzYjkK0c3MIAIE9hAR20mqJ
WLcsxLtrRs6uNF1VrpB+4n/55QU7oxA1iVBO6IFu4qgsF12JTavnJ5MLaETlggXY+zDef9sy
TPXoQctpzcaNVDmedwo1SiL03uMoblOvWpMR/Y0j6rm7IgrMWUDXDPvoPGjMl2q1iTeyHkMZ
EyUJ8SKsaHh4jV9wp9KmC8C+9CwMukL7vM5w8cgvJoAwsp3Fn59AxWthN3XJYcnMfStkIuWg
R7U2r+a210W6vnUxU4oN0PmMcursYPyeV0NX/KQeUeNMwGTFB6QHS/anRaGQewijkrYYoTNt
fllxIu9XYmiBERQ/qPDlGRlOgVTd9xUfHFkzB52c70E=
=92oX
-----END PGP PUBLIC KEY BLOCK-----
EOF
(
echo
"deb https://artifacts.elastic.co/packages/6.x/apt stable main"
;
echo
"deb [arch=amd64] https://packages.elastic.co/curator/5/debian9 stable main"
)
\
>
/etc/apt/sources.list.d/elastic.list
apt-get
-qq
update
# If we do not install a JRE before ES, the installation will fail (huh?)...
install_packages default-jre-headless
install_packages
${
PACKAGES
}
# There is no Debian package (yet) for the prometheus
# exporter. Download the binary from github.
curl
-sL
${
EXPORTER_RELEASE_URL
}
\
|
tar
--wildcards
-xOzvf
-
'*elasticsearch_exporter'
\
>
/usr/sbin/elasticsearch_exporter
chmod
755 /usr/sbin/elasticsearch_exporter
# Overlay our configuration on top of /etc.
rsync
-a
/tmp/conf/ /etc/
# Remove packages used for installation.
apt-get remove
-y
--purge
${
BUILD_PACKAGES
}
apt-get autoremove
-y
apt-get clean
rm
-fr
/var/lib/apt/lists/
*
rm
-fr
/tmp/conf
conf/chaperone.d/elasticsearch-exporter.conf
0 → 100644
View file @
3133c283
exporter
.
service
: {
command
:
"sh -c 'exec /usr/sbin/elasticsearch_exporter -es.indices -es.uri http://127.0.0.1:${PORT} -web.listen-address :${EXPORTER_PORT}'"
,
restart
:
true
,
}
conf/chaperone.d/elasticsearch.conf
0 → 100644
View file @
3133c283
elasticsearch
.
service
: {
command
:
"/bin/sh -c 'exec env ES_HOME=/usr/share/elasticsearch ES_PATH_CONF=/etc/elasticsearch /usr/share/elasticsearch/bin/elasticsearch -E http.port=${PORT}'"
,
kill_signal
:
SIGTERM
,
exit_kills
:
true
,
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment