Skip to content
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

Update the MySQL version used by our Docker images #12054

Merged
merged 9 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 The Vitess Authors.
# Copyright 2023 The Vitess Authors.
frouioui marked this conversation as resolved.
Show resolved Hide resolved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,17 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is also symlinked as "Dockerfile" in the root of our
# repository because the automated build feature on Docker Hub does not
# allow to specify a different build context. It always assumes that the
# build context is the same directory as the Dockerfile is in.
# "make build" below must be called in our repository's root and
# therefore we need to have the symlinked "Dockerfile" in there as well.
# TODO(mberlin): Remove the symlink and this note once
# https://github.com/docker/hub-feedback/issues/292 is fixed.

ARG bootstrap_version=14
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"
ARG image="vitess/bootstrap:${bootstrap_version}-mysql80"

FROM "${image}"

Expand Down
41 changes: 41 additions & 0 deletions docker/base/Dockerfile.mysql57
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 2023 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.

ARG bootstrap_version=14
ARG image="vitess/bootstrap:${bootstrap_version}-mysql57"

FROM "${image}"

# Allows some docker builds to disable CGO
ARG CGO_ENABLED=0

# Allows docker builds to set the BUILD_NUMBER
ARG BUILD_NUMBER

# Allows docker builds to set the BUILD_GIT_BRANCH
ARG BUILD_GIT_BRANCH

# Allows docker builds to set the BUILD_GIT_REV
ARG BUILD_GIT_REV

# 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
27 changes: 0 additions & 27 deletions docker/base/Dockerfile.mysql80

This file was deleted.

14 changes: 14 additions & 0 deletions docker/base/Dockerfile.percona57
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 The Vitess Authors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

#
# 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.

ARG bootstrap_version=14
ARG image="vitess/bootstrap:${bootstrap_version}-percona57"

Expand Down
14 changes: 14 additions & 0 deletions docker/base/Dockerfile.percona80
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 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.

ARG bootstrap_version=14
ARG image="vitess/bootstrap:${bootstrap_version}-percona80"

Expand Down
2 changes: 1 addition & 1 deletion docker/lite/Dockerfile
2 changes: 2 additions & 0 deletions docker/lite/Dockerfile.mysql80
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ RUN make install PREFIX=/vt/install
# Start over and build the final image.
FROM debian:buster-slim

LABEL com.vitessio.mysql-version="8.0.31"
frouioui marked this conversation as resolved.
Show resolved Hide resolved

# Install dependencies
COPY docker/lite/install_dependencies.sh /vt/dist/install_dependencies.sh
RUN /vt/dist/install_dependencies.sh mysql80
Expand Down
2 changes: 1 addition & 1 deletion docker/lite/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ mysql57)
)
;;
mysql80)
mysql8_version=8.0.23
mysql8_version=8.0.31
do_fetch https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/libmysqlclient21_${mysql8_version}-1debian10_amd64.deb /tmp/libmysqlclient21_${mysql8_version}-1debian10_amd64.deb
do_fetch https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-client-core_${mysql8_version}-1debian10_amd64.deb /tmp/mysql-community-client-core_${mysql8_version}-1debian10_amd64.deb
do_fetch https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-client-plugins_${mysql8_version}-1debian10_amd64.deb /tmp/mysql-community-client-plugins_${mysql8_version}-1debian10_amd64.deb
Expand Down
185 changes: 185 additions & 0 deletions examples/operator/302_new_shards_new_images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
apiVersion: planetscale.com/v2
frouioui marked this conversation as resolved.
Show resolved Hide resolved
kind: VitessCluster
metadata:
name: example
spec:
images:
vtctld: vitess/lite:latest-update-docker-image
vtadmin: vitess/vtadmin:latest
vtgate: vitess/lite:latest-update-docker-image
vttablet: vitess/lite:latest-update-docker-image
vtbackup: vitess/lite:latest-update-docker-image
vtorc: vitess/lite:latest-update-docker-image
mysqld:
mysql80Compatible: vitess/lite:latest-update-docker-image
mysqldExporter: prom/mysqld-exporter:v0.11.0
cells:
- name: zone1
gateway:
authentication:
static:
secret:
name: example-cluster-config
key: users.json
replicas: 1
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
memory: 256Mi
vitessDashboard:
cells:
- zone1
extraFlags:
security_policy: read-only
replicas: 1
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
vtadmin:
rbac:
name: example-cluster-config
key: rbac.yaml
cells:
- zone1
apiAddresses:
- http://localhost:14001
replicas: 1
readOnly: false
apiResources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
webResources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi

keyspaces:
- name: commerce
durabilityPolicy: none
turndownPolicy: Immediate
vitessOrchestrator:
resources:
limits:
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi
extraFlags:
recovery-period-block-duration: 5s
partitionings:
- equal:
parts: 1
shardTemplate:
databaseInitScriptSecret:
name: example-cluster-config
key: init_db.sql
replication:
enforceSemiSync: false
tabletPools:
- cell: zone1
type: replica
replicas: 2
vttablet:
extraFlags:
disable_active_reparents: "true"
db_charset: utf8mb4
resources:
limits:
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
mysqld:
resources:
limits:
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
- name: customer
durabilityPolicy: none
turndownPolicy: Immediate
partitionings:
- equal:
parts: 1
shardTemplate:
databaseInitScriptSecret:
name: example-cluster-config
key: init_db.sql
replication:
enforceSemiSync: false
tabletPools:
- cell: zone1
type: replica
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
resources:
limits:
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
mysqld:
resources:
limits:
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
- equal:
parts: 2
shardTemplate:
databaseInitScriptSecret:
name: example-cluster-config
key: init_db.sql
replication:
enforceSemiSync: false
tabletPools:
- cell: zone1
type: replica
replicas: 2
vttablet:
extraFlags:
db_charset: utf8mb4
resources:
limits:
memory: 256Mi
requests:
cpu: 100m
memory: 256Mi
mysqld:
resources:
limits:
memory: 512Mi
requests:
cpu: 100m
memory: 512Mi
dataVolumeClaimTemplate:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
updateStrategy:
type: Immediate
1 change: 1 addition & 0 deletions t/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package t
frouioui marked this conversation as resolved.
Show resolved Hide resolved