Commit ed812c39 authored by godog's avatar godog

Initial commit

parents
Pipeline #5554 passed with stages
in 2 minutes
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
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
ENTRYPOINT ["/usr/local/bin/chaperone", "--no-syslog"]
This diff is collapsed.
docker-thanos
===
A Docker image to run Thanos. All Thanos components are run by default on
container startup, individual components can be disabled via the environment.
The following environment variables are understood:
QUERY_OFF
QUERY_HTTP_ADDRESS
QUERY_GRPC_ADDRESS
SIDECAR_OFF
QUERY_HTTP_ADDRESS
QUERY_GRPC_ADDRESS
#!/bin/sh
#
# Install script for Thanos
#
# Packages that are only used to build the container. These will be
# removed once we're done.
BUILD_PACKAGES="curl dpkg-dev rsync"
# Packages to install.
PACKAGES="
"
THANOS_RELEASE=0.9.0
# 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}
THANOS_RELEASE_URL="https://github.com/thanos-io/thanos/releases/download/v${THANOS_RELEASE}/thanos-${THANOS_RELEASE}.linux-$(dpkg-architecture -q DEB_HOST_ARCH).tar.gz"
curl -sL ${THANOS_RELEASE_URL} \
| tar --wildcards -xOzvf - '*thanos' \
> /usr/sbin/thanos
chmod 755 /usr/sbin/thanos
# 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
thanos-query.service: {
command: "/usr/sbin/thanos query --http-address=$(QUERY_HTTP_ADDRESS:-0.0.0.0:10902) --grpc-address=$(QUERY_GRPC_ADDRESS:-0.0.0.0:10901) --store.sd-files=/etc/thanos/store-sd/*.yml",
enabled: "$(QUERY_OFF:|false|true)",
kill_signal: SIGTERM,
exit_kills: true,
}
thanos-sidecar.service: {
command: "/usr/sbin/thanos sidecar --http-address=$(SIDECAR_HTTP_ADDRESS:-0.0.0.0:10912) --grpc-address=$(SIDECAR_GRPC_ADDRESS:-0.0.0.0:10911)",
enabled: "$(SIDECAR_OFF:|false|true)",
kill_signal: SIGTERM,
exit_kills: true,
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment