Add opensearch image with repository-s3 plugin

Change-Id: Iede201f39698c8df87b3496807b5404979dc6e62
This commit is contained in:
Leontii Istomin 2023-08-01 15:29:40 -05:00
parent 8a75d2e676
commit da34cf79ce
3 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,4 @@
ARG FROM=docker.io/opensearchproject/opensearch:2.9.0
FROM ${FROM}
RUN /usr/share/opensearch/bin/opensearch-plugin install --batch repository-s3

14
opensearch-s3/build.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
SCRIPT=`realpath $0`
SCRIPT_DIR=`dirname ${SCRIPT}`
## Only build from main folder
cd ${SCRIPT_DIR}/..
IMAGE="opensearch-s3"
VERSION=${VERSION:-latest}
DISTRO=${DISTRO:-centos_7}
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}
cd -

60
zuul.d/opensearch-s3.yaml Normal file
View File

@ -0,0 +1,60 @@
---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- project:
check:
jobs:
- openstack-helm-images-build-opensearch-s3
gate:
jobs:
- openstack-helm-images-upload-opensearch-s3
promote:
jobs:
- openstack-helm-images-promote-opensearch-s3
periodic-weekly:
jobs:
- openstack-helm-images-upload-opensearch-s3
- openstack-helm-images-promote-opensearch-s3:
dependencies:
- name: openstack-helm-images-aio-logging
- job:
name: openstack-helm-images-build-opensearch-s3
parent: openstack-helm-images-build
description: Build s3 compatible opensearch image
vars: &opensearch-s3_vars
currentdate: "{{ now(utc=True,fmt='%Y%m%d') }}"
docker_images:
- context: opensearch-s3
repository: openstackhelm/opensearch-s3
dockerfile: Dockerfile.2_9_0
tags:
- 2_9_0
- "2_9_0-{{ currentdate }}"
files: &opensearch-s3_files
- opensearch-s3/.*
- zuul.d/opensearch-s3.yaml
- job:
name: openstack-helm-images-upload-opensearch-s3
parent: openstack-helm-images-upload
description: Build and upload s3 compatible opensearch images
vars: *opensearch-s3_vars
files: *opensearch-s3_files
- job:
name: openstack-helm-images-promote-opensearch-s3
parent: openstack-helm-images-promote
description: Promote a previously published s3 compatible opensearch image to latest.
vars: *opensearch-s3_vars
files: *opensearch-s3_files