Skip to content

Commit 3bf47c8

Browse files
Update protoc installation through github binaries (#5823)
Signed-off-by: Peter Zhu <[email protected]>
1 parent d6a2039 commit 3bf47c8

File tree

4 files changed

+43
-11
lines changed

4 files changed

+43
-11
lines changed

docker/ci/dockerfiles/current/build.al2.opensearch.x64.arm64.dockerfile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ USER 0
2323
RUN yum clean all && \
2424
amazon-linux-extras install epel -y && \
2525
yum update -y && \
26-
yum install -y which curl git gnupg2 tar net-tools procps-ng python3 python3-devel python3-pip zip unzip jq pigz protobuf-compiler
26+
yum install -y which curl git gnupg2 tar net-tools procps-ng python3 python3-devel python3-pip zip unzip jq pigz
2727

2828
# Create user group
2929
RUN groupadd -g 1000 $CONTAINER_USER && \
@@ -171,9 +171,9 @@ RUN pip3 install cmake==3.26.4
171171
# Only linux x64 glibc217 is supported in unofficial build until https://github.com/nodejs/unofficial-builds/pull/91 is merged for pre-compiled arm64 binaries
172172
# The linux arm64 glibc226 tarball here is directly compiled from the source code on AL2 host for the time being
173173
RUN if [ `uname -m` = "x86_64" ]; then \
174-
curl -SL https://ci.opensearch.org/ci/dbc/tools/node/node-v20.18.0-linux-x64-glibc-217.tar.xz -o /node20.tar.xz; \
174+
curl -SfL https://ci.opensearch.org/ci/dbc/tools/node/node-v20.18.0-linux-x64-glibc-217.tar.xz -o /node20.tar.xz; \
175175
else \
176-
curl -SL https://ci.opensearch.org/ci/dbc/tools/node/node-v20.18.0-linux-arm64-glibc-226-libstdcpp-6.0.24.tar.xz -o /node20.tar.xz; \
176+
curl -SfL https://ci.opensearch.org/ci/dbc/tools/node/node-v20.18.0-linux-arm64-glibc-226-libstdcpp-6.0.24.tar.xz -o /node20.tar.xz; \
177177
fi; \
178178
mkdir /node_al2 && \
179179
tar -xf /node20.tar.xz --strip-components 1 -C /node_al2 && \
@@ -186,7 +186,17 @@ WORKDIR $CONTAINER_USER_HOME
186186
# Install Rust
187187
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
188188

189+
# Install protobuf
190+
RUN if [ "$(uname -m)" = "x86_64" ]; then \
191+
curl -SfL https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-x86_64.zip -o protoc.zip; \
192+
else \
193+
curl -Sfl https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-aarch_64.zip -o protoc.zip; \
194+
fi; \
195+
unzip protoc.zip -d $CONTAINER_USER_HOME/.local && rm -v protoc.zip
196+
189197
# Install fpm for opensearch dashboards core
190198
RUN gem install dotenv -v 2.8.1 && gem install public_suffix -v 5.1.1 && gem install rchardet -v 1.8.0 && gem install fpm -v 1.14.2
191-
ENV PATH=$CONTAINER_USER_HOME/.gem/gems/fpm-1.14.2/bin:$PATH
192-
RUN fpm -v
199+
200+
# Setup ENV
201+
ENV PATH=$CONTAINER_USER_HOME/.gem/gems/fpm-1.14.2/bin:$CONTAINER_USER_HOME/.local/bin:$PATH
202+
RUN fpm -v && protoc --version

docker/ci/dockerfiles/current/build.almalinux8.opensearch.x64.arm64.ppc64le.dockerfile renamed to docker/ci/dockerfiles/current/build.almalinux8.opensearch.x64.arm64.dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ USER 0
2222
# Add normal dependencies
2323
RUN dnf clean all && dnf install -y 'dnf-command(config-manager)' && \
2424
dnf update -y && \
25-
dnf install -y which curl git gnupg2 tar net-tools procps-ng python39 python39-devel python39-pip zip unzip jq protobuf-compiler
25+
dnf install -y which curl git gnupg2 tar net-tools procps-ng python39 python39-devel python39-pip zip unzip jq
2626

2727
# Replace default curl 7.61.1 on Almalinux8 with 7.75+ version to support aws-sigv4
2828
# https://github.com/curl/curl/commit/08e8455dddc5e48e58a12ade3815c01ae3da3b64
@@ -115,7 +115,17 @@ WORKDIR $CONTAINER_USER_HOME
115115
# Install Rust
116116
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
117117

118+
# Install protobuf
119+
RUN if [ "$(uname -m)" = "x86_64" ]; then \
120+
curl -SfL https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-x86_64.zip -o protoc.zip; \
121+
else \
122+
curl -Sfl https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-aarch_64.zip -o protoc.zip; \
123+
fi; \
124+
unzip protoc.zip -d $CONTAINER_USER_HOME/.local && rm -v protoc.zip
125+
118126
# Install fpm for opensearch dashboards core
119127
RUN gem install dotenv -v 2.8.1 && gem install public_suffix -v 5.1.1 && gem install rchardet -v 1.8.0 && gem install fpm -v 1.14.2
120-
ENV PATH=$CONTAINER_USER_HOME/.gem/gems/fpm-1.14.2/bin:$PATH
121-
RUN fpm -v
128+
129+
# Setup ENV
130+
ENV PATH=$CONTAINER_USER_HOME/.gem/gems/fpm-1.14.2/bin:$CONTAINER_USER_HOME/.local/bin:$PATH
131+
RUN fpm -v && protoc --version

docker/ci/dockerfiles/current/build.ubuntu2404.opensearch.x64.arm64.dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN apt-get update -y && apt-get install -y docker.io=24.0.7* curl build-essenti
2828
apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 xauth xvfb && \
2929
apt-get install -y libxrender1 libxi6 libxtst6 libasound2t64 && \
3030
apt-get install -y libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libatspi2.0-dev libxcomposite-dev libxdamage1 libxfixes3 libxfixes-dev libxrandr2 libgbm-dev libxkbcommon-x11-0 libpangocairo-1.0-0 libcairo2 libcairo2-dev libnss3 libnspr4 libnspr4-dev && \
31-
apt-get install -y mandoc less protobuf-compiler && \
31+
apt-get install -y mandoc less && \
3232
apt-get clean -y
3333

3434
# Docker Compose v2
@@ -80,7 +80,19 @@ RUN groupadd -g 1000 $CONTAINER_USER && \
8080
USER $CONTAINER_USER
8181
WORKDIR $CONTAINER_USER_HOME
8282

83+
RUN aws --install
84+
8385
# Install Rust
8486
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y
8587

86-
RUN aws --install
88+
# Install protobuf
89+
RUN if [ "$(uname -m)" = "x86_64" ]; then \
90+
curl -SfL https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-x86_64.zip -o protoc.zip; \
91+
else \
92+
curl -Sfl https://github.com/protocolbuffers/protobuf/releases/download/v33.0/protoc-33.0-linux-aarch_64.zip -o protoc.zip; \
93+
fi; \
94+
unzip protoc.zip -d $CONTAINER_USER_HOME/.local && rm -v protoc.zip
95+
96+
# Setup ENV
97+
ENV PATH=$CONTAINER_USER_HOME/.local/bin:$PATH
98+
RUN protoc --version

feature-manifests/feature-datafusion/opensearch-3.4.0.yml renamed to feature-manifests/feature-datafusion/opensearch-3.3.0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
schema-version: '1.2'
33
build:
44
name: OpenSearch
5-
version: 3.4.0
5+
version: 3.3.0
66
ci:
77
image:
88
linux:

0 commit comments

Comments
 (0)