Skip to content

Commit 8ad84fb

Browse files
authored
add percona84 (#18950)
Signed-off-by: Jeremy Doupe <[email protected]>
1 parent 1f49de4 commit 8ad84fb

File tree

5 files changed

+90
-3
lines changed

5 files changed

+90
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto
284284
# Please read docker/README.md to understand the different available images.
285285

286286
# This rule builds the bootstrap images for all flavors.
287-
DOCKER_IMAGES_FOR_TEST = mysql80 mysql84 percona80
287+
DOCKER_IMAGES_FOR_TEST = mysql80 mysql84 percona80 percona84
288288
DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST)
289289
BOOTSTRAP_VERSION=49
290290
ensure_bootstrap_version:
@@ -339,7 +339,7 @@ docker_lite:
339339
docker_mini:
340340
${call build_docker_image,docker/mini/Dockerfile,vitess/mini}
341341

342-
DOCKER_VTTESTSERVER_SUFFIX = mysql84
342+
DOCKER_VTTESTSERVER_SUFFIX = mysql84 percona84
343343
DOCKER_VTTESTSERVER_TARGETS = $(addprefix docker_vttestserver_,$(DOCKER_VTTESTSERVER_SUFFIX))
344344
$(DOCKER_VTTESTSERVER_TARGETS): docker_vttestserver_%:
345345
${call build_docker_image,docker/vttestserver/Dockerfile.$*,vitess/vttestserver:$*}

docker/lite/Dockerfile.percona84

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2025 The Vitess Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM --platform=linux/amd64 golang:1.25.3-bookworm AS builder
16+
17+
# Allows docker builds to set the BUILD_NUMBER
18+
ARG BUILD_NUMBER
19+
20+
# Allows docker builds to set the BUILD_GIT_BRANCH
21+
ARG BUILD_GIT_BRANCH
22+
23+
# Allows docker builds to set the BUILD_GIT_REV
24+
ARG BUILD_GIT_REV
25+
26+
# Allows docker builds to set the BUILD_TIME
27+
ARG BUILD_TIME
28+
29+
WORKDIR /vt/src/vitess.io/vitess
30+
31+
# Create vitess user
32+
RUN groupadd -r vitess && useradd -r -g vitess vitess
33+
RUN mkdir -p /vt/vtdataroot /home/vitess
34+
RUN chown -R vitess:vitess /vt /home/vitess
35+
USER vitess
36+
37+
# Re-copy sources from working tree.
38+
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess
39+
40+
RUN make install PREFIX=/vt/install
41+
42+
# Start over and build the final image.
43+
FROM --platform=linux/amd64 debian:bookworm-slim
44+
45+
# Install dependencies
46+
COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh
47+
RUN /vt/dist/install_dependencies.sh percona84
48+
49+
# Set up Vitess user and directory tree.
50+
RUN groupadd -r vitess && useradd -r -g vitess vitess
51+
RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt
52+
53+
# Set up Vitess environment (just enough to run pre-built Go binaries)
54+
ENV VTROOT /vt
55+
ENV VTDATAROOT /vt/vtdataroot
56+
ENV PATH $VTROOT/bin:$PATH
57+
58+
# Copy artifacts from builder layer.
59+
COPY --from=builder --chown=vitess:vitess /vt/install /vt
60+
COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/vtadmin /vt/web/vtadmin
61+
62+
# Create mount point for actual data (e.g. MySQL data dir)
63+
VOLUME /vt/vtdataroot
64+
USER vitess

docker/utils/install_dependencies.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,15 @@ percona80)
133133
percona-xtrabackup-80
134134
)
135135
;;
136+
percona84)
137+
PACKAGES=(
138+
libperconaserverclient22
139+
percona-telemetry-agent
140+
percona-server-rocksdb
141+
percona-server-server
142+
percona-xtrabackup-84
143+
)
144+
;;
136145
*)
137146
echo "Unknown flavor ${FLAVOR}"
138147
exit 1
@@ -169,6 +178,12 @@ percona80)
169178
echo 'deb http://repo.percona.com/apt bookworm main' > /etc/apt/sources.list.d/percona.list
170179
echo 'deb http://repo.percona.com/ps-80/apt bookworm main' > /etc/apt/sources.list.d/percona80.list
171180
;;
181+
percona84)
182+
echo 'deb http://repo.percona.com/apt bookworm main' > /etc/apt/sources.list.d/percona.list
183+
echo 'deb http://repo.percona.com/pxb-84-lts/apt bookworm main' >> /etc/apt/sources.list.d/percona.list
184+
echo 'deb http://repo.percona.com/telemetry/apt bookworm main' > /etc/apt/sources.list.d/percona-telemetry.list
185+
echo 'deb http://repo.percona.com/ps-84-lts/apt bookworm main' > /etc/apt/sources.list.d/percona84.list
186+
;;
172187
esac
173188

174189
# Pre-fill values for installation prompts that are normally interactive.
@@ -178,6 +193,13 @@ percona80)
178193
debconf debconf/frontend select Noninteractive
179194
percona-server-server-8.0 percona-server-server/root_password password 'unused'
180195
percona-server-server-8.0 percona-server-server/root_password_again password 'unused'
196+
EOF
197+
;;
198+
percona84)
199+
debconf-set-selections <<EOF
200+
debconf debconf/frontend select Noninteractive
201+
percona-server-server-8.4 percona-server-server/root_password password 'unused'
202+
percona-server-server-8.4 percona-server-server/root_password_again password 'unused'
181203
EOF
182204
;;
183205
esac

go/tools/go-upgrade/go-upgrade.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ func replaceGoVersionInCodebase(old, new *version.Version) error {
346346
"./docker/lite/Dockerfile.mysql80",
347347
"./docker/lite/Dockerfile.mysql84",
348348
"./docker/lite/Dockerfile.percona80",
349+
"./docker/lite/Dockerfile.percona84",
349350
"./docker/vttestserver/Dockerfile.mysql80",
350351
"./docker/vttestserver/Dockerfile.mysql84",
351352
}

test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const (
114114
configFileName = "test/config.json"
115115

116116
// List of flavors for which a bootstrap Docker image is available.
117-
flavors = "mysql80,mysql84,percona80"
117+
flavors = "mysql80,mysql84,percona80,percona84"
118118
)
119119

120120
// Config is the overall object serialized in test/config.json.

0 commit comments

Comments
 (0)