[elasticsearch-s3] Prepare recipes for v7/v8
Create common Dockerfiles for the latest major ES versions Change-Id: I5b1232e41e6713cdf89b832262ec5a703cfaf81d
This commit is contained in:
parent
b152d2e5a6
commit
59de48379b
@ -1,8 +0,0 @@
|
||||
ARG FROM=docker.io/elasticsearch:5.6.4
|
||||
FROM ${FROM}
|
||||
|
||||
RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 \
|
||||
&& chmod +x ./jq \
|
||||
&& cp jq /usr/bin
|
||||
|
||||
RUN bin/elasticsearch-plugin install --batch repository-s3
|
17
elasticsearch-s3/Dockerfile.7
Normal file
17
elasticsearch-s3/Dockerfile.7
Normal file
@ -0,0 +1,17 @@
|
||||
ARG ELASTICSEARCH_VERSION
|
||||
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
|
||||
|
||||
ARG ELASTICSEARCH_VERSION
|
||||
|
||||
RUN set -ex \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
jq \
|
||||
python3-pip \
|
||||
&& pip3 install --no-cache-dir --upgrade pip \
|
||||
&& pip3 install --no-cache-dir \
|
||||
"elasticsearch<=${ELASTICSEARCH_VERSION}" \
|
||||
"elasticsearch-dsl~=7.0" \
|
||||
&& bin/elasticsearch-plugin install --batch repository-s3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
@ -1,15 +0,0 @@
|
||||
ARG FROM=docker.elastic.co/elasticsearch/elasticsearch-oss:7.1.0
|
||||
FROM ${FROM}
|
||||
|
||||
RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64; \
|
||||
chmod +x ./jq ;\
|
||||
cp jq /usr/bin ;\
|
||||
yum -y update ;\
|
||||
rm -rf /var/cache/yum ;\
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py ;\
|
||||
python /tmp/get-pip.py ;\
|
||||
rm -f /tmp/get-pip.py ;\
|
||||
pip install \
|
||||
elasticsearch==7.1.0 \
|
||||
elasticsearch-dsl==7.1.0; \
|
||||
bin/elasticsearch-plugin install --batch repository-s3
|
@ -1,11 +0,0 @@
|
||||
FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2
|
||||
|
||||
RUN yum install -y epel-release; \
|
||||
yum update; \
|
||||
yum install -y python-pip jq; \
|
||||
pip install --upgrade pip; \
|
||||
pip install \
|
||||
elasticsearch==7.8.0 \
|
||||
elasticsearch-dsl==7.2.1; \
|
||||
bin/elasticsearch-plugin install --batch repository-s3; \
|
||||
rm -rf /var/cache/yum
|
12
elasticsearch-s3/Dockerfile.8
Normal file
12
elasticsearch-s3/Dockerfile.8
Normal file
@ -0,0 +1,12 @@
|
||||
ARG ELASTICSEARCH_VERSION
|
||||
FROM docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION}
|
||||
|
||||
USER root
|
||||
|
||||
RUN set -ex \
|
||||
&& apt update \
|
||||
&& apt-get upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
USER elasticsearch
|
@ -1,9 +0,0 @@
|
||||
FROM docker.io/elasticsearch:8.7.1
|
||||
|
||||
USER root
|
||||
|
||||
RUN curl -sL https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 -o /usr/local/bin/jq && \
|
||||
chmod +x /usr/local/bin/jq && \
|
||||
jq --version
|
||||
|
||||
USER elasticsearch
|
@ -1,14 +0,0 @@
|
||||
ARG FROM=docker.elastic.co/elasticsearch/elasticsearch:8.9.0
|
||||
FROM ${FROM}
|
||||
|
||||
ARG JQ_PATH=/usr/bin/jq
|
||||
ARG JQ_VERSION=1.6
|
||||
ARG JQ_SHA512=c9e585368bcb89d4c5213a31866e9301f03fe27165afcb4a3cdf0ec1be43b0fb7439d71dd9607ccc002622915b40389ee79c67d4c3c54ff95257cb23643b0330
|
||||
|
||||
USER root
|
||||
RUN set -x; curl -sSLo "${JQ_PATH}" https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 && \
|
||||
[ "$(sha512sum "${JQ_PATH}" | awk '{print $1}')" = "${JQ_SHA512}" ] || exit 1 && \
|
||||
chmod +x "${JQ_PATH}"
|
||||
|
||||
USER elasticsearch
|
||||
RUN elasticsearch-plugin install --batch repository-s3
|
@ -5,10 +5,10 @@ SCRIPT_DIR=`dirname ${SCRIPT}`
|
||||
cd ${SCRIPT_DIR}/..
|
||||
|
||||
IMAGE="elasticsearch-s3"
|
||||
VERSION=${VERSION:-latest}
|
||||
DISTRO=${DISTRO:-centos_7}
|
||||
VERSION=${VERSION:-8.13.4}
|
||||
MAJOR_VERSION=${MAJOR_VERSION:-8}
|
||||
REGISTRY_URI=${REGISTRY_URI:-"openstackhelm/"}
|
||||
EXTRA_TAG_INFO=${EXTRA_TAG_INFO:-""}
|
||||
docker build -f ${IMAGE}/Dockerfile.${DISTRO} --network=host -t ${REGISTRY_URI}${IMAGE}:${VERSION}-${DISTRO}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE}
|
||||
docker build -f ${IMAGE}/Dockerfile.${MAJOR_VERSION} --network=host --build-arg="ELASTICSEARCH_VERSION=${VERSION}" -t ${REGISTRY_URI}${IMAGE}:${VERSION}${EXTRA_TAG_INFO} ${extra_build_args} ${IMAGE}
|
||||
|
||||
cd -
|
||||
|
@ -37,34 +37,21 @@
|
||||
docker_images:
|
||||
- context: elasticsearch-s3
|
||||
repository: openstackhelm/elasticsearch-s3
|
||||
dockerfile: Dockerfile.5_6_4
|
||||
dockerfile: Dockerfile.7
|
||||
build_args:
|
||||
- "ELASTICSEARCH_VERSION=7.17.21"
|
||||
tags:
|
||||
- latest-5_6_4
|
||||
- "5_6_4-{{ currentdate }}"
|
||||
- latest-7.17.21
|
||||
- "7.17.21-{{ currentdate }}"
|
||||
|
||||
- context: elasticsearch-s3
|
||||
repository: openstackhelm/elasticsearch-s3
|
||||
dockerfile: Dockerfile.7_1_0
|
||||
dockerfile: Dockerfile.8
|
||||
build_args:
|
||||
- "ELASTICSEARCH_VERSION=8.13.4"
|
||||
tags:
|
||||
- latest-7_1_0
|
||||
- "7_1_0-{{ currentdate }}"
|
||||
- context: elasticsearch-s3
|
||||
repository: openstackhelm/elasticsearch-s3
|
||||
dockerfile: Dockerfile.7_6_2
|
||||
tags:
|
||||
- latest-7_6_2
|
||||
- "7_6_2-{{ currentdate }}"
|
||||
- context: elasticsearch-s3
|
||||
repository: openstackhelm/elasticsearch-s3
|
||||
dockerfile: Dockerfile.8_7_1
|
||||
tags:
|
||||
- latest-8_7_1
|
||||
- "8_7_1-{{ currentdate }}"
|
||||
- context: elasticsearch-s3
|
||||
repository: openstackhelm/elasticsearch-s3
|
||||
dockerfile: Dockerfile.8_9_0
|
||||
tags:
|
||||
- latest-8_9_0
|
||||
- "8_9_0-{{ currentdate }}"
|
||||
- latest-8.13.4
|
||||
- "8.13.4-{{ currentdate }}"
|
||||
files: &elasticsearch-s3_files
|
||||
- elasticsearch-s3/.*
|
||||
- zuul.d/elasticsearch-s3.yaml
|
||||
|
Loading…
x
Reference in New Issue
Block a user