-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert the removal of the MySQL binaries in the vitess/lite
image
#16042
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker/base/Dockerfile | ||
docker/lite/Dockerfile | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
- **[Deletions](#deletions)** | ||
- [`--vreplication_tablet_type` flag](#vreplication-tablet-type-deletion) | ||
- [Pool Capacity Flags](#pool-flags-deletion) | ||
- [MySQL binaries in the vitess/lite Docker images](#vitess-lite) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the
Thus, other than removing the release notes we added in We are removing the |
||
- [vitess/base and vitess/k8s Docker images](#base-k8s-images) | ||
- [`gh-ost` binary and endtoend tests](#gh-ost-binary-tests-removal) | ||
- [Legacy `EmergencyReparentShard` stats](#legacy-emergencyshardreparent-stats) | ||
|
@@ -56,47 +55,6 @@ The previously deprecated flag `--vreplication_tablet_type` has been deleted. | |
|
||
The previously deprecated flags `--queryserver-config-query-pool-waiter-cap`, `--queryserver-config-stream-pool-waiter-cap` and `--queryserver-config-txpool-waiter-cap` have been deleted. | ||
|
||
#### <a id="vitess-lite"/>MySQL binaries in the `vitess/lite` Docker images | ||
|
||
In `v19.0.0` we had deprecated the `mysqld` binary in the `vitess/lite` Docker image. | ||
Making MySQL/Percona version specific image tags also deprecated. | ||
|
||
Starting in `v20.0.0` we no longer build the MySQL/Percona version specific image tags. | ||
Moreover, the `mysqld` binary is no longer present on the `vitess/lite` image. | ||
|
||
Here are the images we will no longer build and push: | ||
|
||
| Image | Available | | ||
|---------------------------------|-----------| | ||
| `vitess/lite:v20.0.0` | YES | | ||
| `vitess/lite:v20.0.0-mysql57` | NO | | ||
| `vitess/lite:v20.0.0-mysql80` | NO | | ||
| `vitess/lite:v20.0.0-percona57` | NO | | ||
| `vitess/lite:v20.0.0-percona80` | NO | | ||
|
||
|
||
If you have not done it yet, you can use an official MySQL Docker image for your `mysqld` container now such as: `mysql:8.0.30`. | ||
Below is an example of a kubernetes yaml file before and after upgrading to an official MySQL image: | ||
|
||
```yaml | ||
# before: | ||
|
||
# you are still on v19 and are looking to upgrade to v20 | ||
# the image used here includes MySQL 8.0.30 and its binaries | ||
|
||
mysqld: | ||
mysql80Compatible: vitess/lite:v19.0.0-mysql80 | ||
``` | ||
```yaml | ||
# after: | ||
|
||
# if we still want to use MySQL 8.0.30, we now have to use the | ||
# official MySQL image with the 8.0.30 tag as shown below | ||
|
||
mysqld: | ||
mysql80Compatible: mysql:8.0.30 # or even mysql:8.0.34 for instance | ||
``` | ||
|
||
#### <a id="base-k8s-images"/>`vitess/base` and `vitess/k8s` Docker images | ||
|
||
Since we have deleted MySQL from our `vitess/lite` image, we are removing the `vitess/base` and `vitess/k8s` images. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright 2024 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=32 | ||
ARG image="vitess/bootstrap:${bootstrap_version}-percona80" | ||
|
||
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:bullseye-slim | ||
|
||
# Install dependencies | ||
COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh | ||
RUN /vt/dist/install_dependencies.sh percona80 | ||
|
||
# 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/vtadmin /vt/web/vtadmin | ||
|
||
# Create mount point for actual data (e.g. MySQL data dir) | ||
VOLUME /vt/vtdataroot | ||
USER vitess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symlink was broken on main for some time