From d672b634a19a18eba5e3b91d0b0f45ff884a817a Mon Sep 17 00:00:00 2001 From: deepthi Date: Thu, 12 May 2022 17:52:54 -0700 Subject: [PATCH] remove references to MySQL and Percona 5.6 Signed-off-by: deepthi --- Makefile | 6 +- docker/base/Dockerfile.mysql56 | 21 ------- docker/base/Dockerfile.percona | 21 ------- docker/bootstrap/Dockerfile.mysql56 | 27 --------- docker/bootstrap/Dockerfile.percona | 35 ------------ docker/bootstrap/README.md | 13 +++-- docker/bootstrap/build.sh | 6 +- docker/lite/Dockerfile.mysql56 | 57 ------------------- docker/lite/Dockerfile.percona | 57 ------------------- docker/lite/install_dependencies.sh | 26 +-------- .../vreplication/vcopier_test.go | 2 +- .../vreplication/vplayer_flaky_test.go | 2 +- 12 files changed, 16 insertions(+), 257 deletions(-) delete mode 100644 docker/base/Dockerfile.mysql56 delete mode 100644 docker/base/Dockerfile.percona delete mode 100644 docker/bootstrap/Dockerfile.mysql56 delete mode 100644 docker/bootstrap/Dockerfile.percona delete mode 100644 docker/lite/Dockerfile.mysql56 delete mode 100644 docker/lite/Dockerfile.percona diff --git a/Makefile b/Makefile index a5bc241de61..82a9e591d92 100644 --- a/Makefile +++ b/Makefile @@ -255,7 +255,7 @@ $(PROTO_GO_OUTS): minimaltools install_protoc-gen-go proto/*.proto # Please read docker/README.md to understand the different available images. # This rule builds the bootstrap images for all flavors. -DOCKER_IMAGES_FOR_TEST = mariadb mariadb103 mysql56 mysql57 mysql80 percona percona57 percona80 +DOCKER_IMAGES_FOR_TEST = mariadb mariadb103 mysql57 mysql80 percona57 percona80 DOCKER_IMAGES = common $(DOCKER_IMAGES_FOR_TEST) BOOTSTRAP_VERSION=8 ensure_bootstrap_version: @@ -293,7 +293,7 @@ endef docker_base: ${call build_docker_image,docker/base/Dockerfile,vitess/base} -DOCKER_BASE_SUFFIX = mysql56 mysql80 mariadb mariadb103 percona percona57 percona80 +DOCKER_BASE_SUFFIX = mysql80 mariadb mariadb103 percona57 percona80 DOCKER_BASE_TARGETS = $(addprefix docker_base_, $(DOCKER_BASE_SUFFIX)) $(DOCKER_BASE_TARGETS): docker_base_%: ${call build_docker_image,docker/base/Dockerfile.$*,vitess/base:$*} @@ -303,7 +303,7 @@ docker_base_all: docker_base $(DOCKER_BASE_TARGETS) docker_lite: ${call build_docker_image,docker/lite/Dockerfile,vitess/lite} -DOCKER_LITE_SUFFIX = mysql56 mysql57 ubi7.mysql57 mysql80 ubi7.mysql80 mariadb mariadb103 percona percona57 ubi7.percona57 percona80 ubi7.percona80 alpine testing ubi8.mysql80 ubi8.arm64.mysql80 +DOCKER_LITE_SUFFIX = mysql57 ubi7.mysql57 mysql80 ubi7.mysql80 mariadb mariadb103 percona57 ubi7.percona57 percona80 ubi7.percona80 alpine testing ubi8.mysql80 ubi8.arm64.mysql80 DOCKER_LITE_TARGETS = $(addprefix docker_lite_,$(DOCKER_LITE_SUFFIX)) $(DOCKER_LITE_TARGETS): docker_lite_%: ${call build_docker_image,docker/lite/Dockerfile.$*,vitess/lite:$*} diff --git a/docker/base/Dockerfile.mysql56 b/docker/base/Dockerfile.mysql56 deleted file mode 100644 index 4b5d752be76..00000000000 --- a/docker/base/Dockerfile.mysql56 +++ /dev/null @@ -1,21 +0,0 @@ -ARG bootstrap_version=8 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql56" - -FROM "${image}" - -# Allows some docker builds to disable CGO -ARG CGO_ENABLED=0 - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree -USER root -COPY . /vt/src/vitess.io/vitess - -# Build Vitess -RUN make build - -# Fix permissions -RUN chown -R vitess:vitess /vt -USER vitess diff --git a/docker/base/Dockerfile.percona b/docker/base/Dockerfile.percona deleted file mode 100644 index 1b9be4c3cd1..00000000000 --- a/docker/base/Dockerfile.percona +++ /dev/null @@ -1,21 +0,0 @@ -ARG bootstrap_version=8 -ARG image="vitess/bootstrap:${bootstrap_version}-percona" - -FROM "${image}" - -# Allows some docker builds to disable CGO -ARG CGO_ENABLED=0 - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree -USER root -COPY . /vt/src/vitess.io/vitess - -# Fix permissions -RUN chown -R vitess:vitess /vt -USER vitess - -# Build Vitess -RUN make build diff --git a/docker/bootstrap/Dockerfile.mysql56 b/docker/bootstrap/Dockerfile.mysql56 deleted file mode 100644 index c6af31839ac..00000000000 --- a/docker/bootstrap/Dockerfile.mysql56 +++ /dev/null @@ -1,27 +0,0 @@ -ARG bootstrap_version -ARG image="vitess/bootstrap:${bootstrap_version}-common" - -FROM "${image}" - -# Install MySQL 5.6. This version of MySQL is completely EOL by Oracle, and hence the upstream -# APT repositories are no longer signed. We need to use `--allow-insecure-repositories` when updating -# and `--allow-unauthenticated` for installing, otherwise APT will refuse to install the unsigned packages. -# TODO@vmg: remove the mysql56 image altogether -RUN for i in $(seq 1 10); do apt-key adv --no-tty --recv-keys --keyserver keyserver.ubuntu.com 467B942D3A79BD29 && break; done && \ - add-apt-repository 'deb http://repo.mysql.com/apt/debian/ stretch mysql-5.6' && \ - for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 && break; done && \ - echo 'deb http://repo.percona.com/apt buster main' > /etc/apt/sources.list.d/percona.list && \ - { \ - echo debconf debconf/frontend select Noninteractive; \ - echo percona-server-server-5.6 percona-server-server/root_password password 'unused'; \ - echo percona-server-server-5.6 percona-server-server/root_password_again password 'unused'; \ - } | debconf-set-selections && \ - apt-get update -y --allow-insecure-repositories && \ - DEBIAN_FRONTEND=noninteractive apt-get install --allow-unauthenticated -y mysql-server libmysqlclient-dev libdbd-mysql-perl rsync libev4 percona-xtrabackup-24 && \ - rm -rf /var/lib/apt/lists/* - -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - -USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/Dockerfile.percona b/docker/bootstrap/Dockerfile.percona deleted file mode 100644 index c94605881c6..00000000000 --- a/docker/bootstrap/Dockerfile.percona +++ /dev/null @@ -1,35 +0,0 @@ -ARG bootstrap_version -ARG image="vitess/bootstrap:${bootstrap_version}-common" - -FROM "${image}" - -# Install Percona 5.6 -# -# Unfortunately we need to keep the 'stretch' repo from Percona as there's no official support -# for MySQL 5.6 for Debian Buster -# -# I think it's fine as MySQL 5.6 will be EOL pretty soon (February 5, 2021) -# -# Also, for the 'percona-xtrabackup-24' package we need to specificly target the -# 'buster' repository as the 'stretch' package requires 'libcurl3' that is not present -# in Debian Buster. -# -RUN for i in $(seq 1 10); do apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 9334A25F8507EFA5 && break; done && \ - add-apt-repository 'deb http://repo.percona.com/apt stretch main' && \ - add-apt-repository 'deb http://repo.percona.com/apt buster main' && \ - { \ - echo debconf debconf/frontend select Noninteractive; \ - echo percona-server-server-5.6 percona-server-server/root_password password 'unused'; \ - echo percona-server-server-5.6 percona-server-server/root_password_again password 'unused'; \ - } | debconf-set-selections && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - percona-server-server-5.6 libperconaserverclient18.1-dev rsync libev4 && \ - apt-get install -y -t buster percona-xtrabackup-24 && \ - rm -rf /var/lib/apt/lists/* - -# Bootstrap Vitess -WORKDIR /vt/src/vitess.io/vitess - -USER vitess -RUN ./bootstrap.sh diff --git a/docker/bootstrap/README.md b/docker/bootstrap/README.md index 931e31861f2..156dbb95222 100644 --- a/docker/bootstrap/README.md +++ b/docker/bootstrap/README.md @@ -6,11 +6,12 @@ after successfully running `bootstrap.sh` and `dev.env`. The `vitess/bootstrap` image comes in different flavors: * `vitess/bootstrap:common` - dependencies that are common to all flavors -* `vitess/bootstrap:mariadb` - bootstrap image for MariaDB -* `vitess/bootstrap:mysql56` - bootstrap image for MySQL 5.6 +* `vitess/bootstrap:mariadb` - bootstrap image for MariaDB 10.2 +* `vitess/bootstrap:mariadb103`- bootstrap image for MariaDB 10.3 * `vitess/bootstrap:mysql57` - bootstrap image for MySQL 5.7 -* `vitess/bootstrap:percona` - bootstrap image for Percona Server +* `vitess/bootstrap:mysql80` - bootstrap image for MySQL 8.0 * `vitess/bootstrap:percona57` - bootstrap image for Percona Server 5.7 +* `vitess/bootstrap:percona80` - bootstrap image for Percona Server 8.0 **NOTE: Unlike the base image that builds Vitess itself, this bootstrap image will NOT be rebuilt automatically on every push to the Vitess main branch.** @@ -22,7 +23,7 @@ First build the `common` image, then any flavors you want. For example: ```sh vitess$ docker/bootstrap/build.sh common -vitess$ docker/bootstrap/build.sh mysql56 +vitess$ docker/bootstrap/build.sh mysql80 ``` Is it also possible to specify the resulting image name: @@ -34,13 +35,13 @@ vitess$ docker/bootstrap/build.sh common --image my-common-image If custom image names are specified, you might need to set the base image name when building flavors: ```sh -vitess$ docker/bootstrap/build.sh mysql56 --base_image my-common-image +vitess$ docker/bootstrap/build.sh mysql80 --base_image my-common-image ``` Both arguments can be combined. For example: ```sh -vitess$ docker/bootstrap/build.sh mysql56 --base_image my-common-image --image my-mysql-image +vitess$ docker/bootstrap/build.sh mysql80 --base_image my-common-image --image my-mysql-image ``` ## For Vitess Project Maintainers diff --git a/docker/bootstrap/build.sh b/docker/bootstrap/build.sh index ff225f11a48..a3ac24d916d 100755 --- a/docker/bootstrap/build.sh +++ b/docker/bootstrap/build.sh @@ -18,15 +18,15 @@ # # First build the `common` image, then any flavors you want. For example: # $ docker/bootstrap/build.sh common -# $ docker/bootstrap/build.sh mysql56 +# $ docker/bootstrap/build.sh mysql80 # # Is it also possible to specify the resulting image name: # $ docker/bootstrap/build.sh common --image my-common-image # # If custom image names are specified, you might need to set the base image name when building flavors: -# $ docker/bootstrap/build.sh mysql56 --base_image my-common-image +# $ docker/bootstrap/build.sh mysql80 --base_image my-common-image # Both arguments can be combined. For example: -# $ docker/bootstrap/build.sh mysql56 --base_image my-common-image --image my-mysql-image +# $ docker/bootstrap/build.sh mysql80 --base_image my-common-image --image my-mysql-image flavor=$1 diff --git a/docker/lite/Dockerfile.mysql56 b/docker/lite/Dockerfile.mysql56 deleted file mode 100644 index e3192acc184..00000000000 --- a/docker/lite/Dockerfile.mysql56 +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# 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. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=8 -ARG image="vitess/bootstrap:${bootstrap_version}-mysql56" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM debian:buster-slim - -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh mysql56 - -# Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/orchestrator /vt/web/orchestrator - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess diff --git a/docker/lite/Dockerfile.percona b/docker/lite/Dockerfile.percona deleted file mode 100644 index 32afc6f60ca..00000000000 --- a/docker/lite/Dockerfile.percona +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2019 The Vitess Authors. -# -# 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. - -# NOTE: We have to build the Vitess binaries from scratch instead of sharing -# a base image because Docker Hub dropped the feature we relied upon to -# ensure images contain the right binaries. - -# Use a temporary layer for the build stage. -ARG bootstrap_version=8 -ARG image="vitess/bootstrap:${bootstrap_version}-percona" - -FROM "${image}" AS builder - -# Allows docker builds to set the BUILD_NUMBER -ARG BUILD_NUMBER - -# Re-copy sources from working tree. -COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess - -# Build and install Vitess in a temporary output directory. -USER vitess -RUN make install PREFIX=/vt/install - -# Start over and build the final image. -FROM debian:buster-slim - -# Install dependencies -COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh -RUN /vt/dist/install_dependencies.sh percona - -# Set up Vitess user and directory tree. -RUN groupadd -r vitess && useradd -r -g vitess vitess -RUN mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt - -# Set up Vitess environment (just enough to run pre-built Go binaries) -ENV VTROOT /vt/src/vitess.io/vitess -ENV VTDATAROOT /vt/vtdataroot -ENV PATH $VTROOT/bin:$PATH - -# Copy artifacts from builder layer. -COPY --from=builder --chown=vitess:vitess /vt/install /vt -COPY --from=builder --chown=vitess:vitess /vt/src/vitess.io/vitess/web/orchestrator /vt/web/orchestrator - -# Create mount point for actual data (e.g. MySQL data dir) -VOLUME /vt/vtdataroot -USER vitess diff --git a/docker/lite/install_dependencies.sh b/docker/lite/install_dependencies.sh index b88763f31d0..15c8ed11206 100755 --- a/docker/lite/install_dependencies.sh +++ b/docker/lite/install_dependencies.sh @@ -65,15 +65,6 @@ apt-get install -y --no-install-recommends "${BASE_PACKAGES[@]}" # Packages specific to certain flavors. case "${FLAVOR}" in -mysql56) - PACKAGES=( - libmysqlclient18 - mysql-client - mysql-server - libcurl3 - percona-xtrabackup - ) - ;; mysql57) mysql57_version=5.7.31 do_fetch https://repo.mysql.com/apt/debian/pool/mysql-5.7/m/mysql-community/libmysqlclient20_${mysql57_version}-1debian10_amd64.deb /tmp/libmysqlclient20_${mysql57_version}-1debian10_amd64.deb @@ -153,7 +144,7 @@ esac # Get GPG keys for extra apt repositories. case "${FLAVOR}" in -mysql56|mysql57|mysql80) +mysql57|mysql80) # repo.mysql.com add_apt_key 8C718D3B5072E1F5 add_apt_key 467B942D3A79BD29 @@ -169,9 +160,6 @@ add_apt_key 9334A25F8507EFA5 # Add extra apt repositories for MySQL. case "${FLAVOR}" in -mysql56) - echo 'deb http://repo.mysql.com/apt/debian/ stretch mysql-5.6' > /etc/apt/sources.list.d/mysql.list - ;; mysql57) echo 'deb http://repo.mysql.com/apt/debian/ buster mysql-5.7' > /etc/apt/sources.list.d/mysql.list ;; @@ -188,11 +176,6 @@ esac # Add extra apt repositories for Percona Server and/or Percona XtraBackup. case "${FLAVOR}" in -percona|mysql56) - # 5.6 is no longer supported on buster - echo 'deb http://deb.debian.org/debian stretch main' > /etc/apt/sources.list.d/stretch.list - echo 'deb http://repo.percona.com/apt stretch main' > /etc/apt/sources.list.d/percona.list - ;; mysql57|mysql80|percona57) echo 'deb http://repo.percona.com/apt buster main' > /etc/apt/sources.list.d/percona.list ;; @@ -204,13 +187,6 @@ esac # Pre-fill values for installation prompts that are normally interactive. case "${FLAVOR}" in -percona) - debconf-set-selections <