diff --git a/.github/workflows/ci-e2e.yaml b/.github/workflows/ci-e2e.yaml index 546005c3..f6dc0ecb 100644 --- a/.github/workflows/ci-e2e.yaml +++ b/.github/workflows/ci-e2e.yaml @@ -24,7 +24,7 @@ jobs: name: Integration tests with MySQL strategy: matrix: - mysql-version: ["8.0.35", "8.0.36", "8.0.37"] + mysql-version: ["8.0.28", "8.0.36", "8.0.37", "8.4.0"] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -44,7 +44,7 @@ jobs: name: Supported Kubernetes versions End-to-End Tests strategy: matrix: - mysql-version: ["8.0.37"] + mysql-version: ["8.4.0"] k8s-version: ["1.27.13", "1.28.9", "1.29.4"] runs-on: group: moco @@ -67,7 +67,7 @@ jobs: name: Supported MySQL versions End-to-End Tests strategy: matrix: - mysql-version: ["8.0.35", "8.0.36", "8.0.37"] + mysql-version: ["8.0.28", "8.0.36", "8.0.37"] k8s-version: ["1.29.4"] runs-on: group: moco diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index 7c7219d5..86797d96 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -17,7 +17,7 @@ jobs: name: Integration tests with MySQL strategy: matrix: - mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37"] + mysql-version: ["8.0.28", "8.0.36", "8.0.37", "8.4.0"] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -29,7 +29,7 @@ jobs: name: Supported Kubernetes versions End-to-End Tests strategy: matrix: - mysql-version: ["8.0.37"] + mysql-version: ["8.4.0"] k8s-version: ["1.27.13", "1.28.9", "1.29.4"] runs-on: group: moco @@ -44,7 +44,7 @@ jobs: name: Supported MySQL versions End-to-End Tests strategy: matrix: - mysql-version: ["8.0.18", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37"] + mysql-version: ["8.0.28", "8.0.36", "8.0.37", "8.4.0"] k8s-version: ["1.29.4"] runs-on: group: moco diff --git a/Dockerfile b/Dockerfile index da07f3ea..040c028c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,13 +20,13 @@ USER 10000:10000 ENTRYPOINT ["/moco-controller"] # For MySQL binaries -FROM --platform=$TARGETPLATFORM ghcr.io/cybozu-go/moco/mysql:8.0.37.1 as mysql +FROM --platform=$TARGETPLATFORM ghcr.io/cybozu-go/moco/mysql:8.4.0.1 as mysql # the backup image FROM --platform=$TARGETPLATFORM ghcr.io/cybozu/ubuntu:22.04 LABEL org.opencontainers.image.source https://github.com/cybozu-go/moco -ARG MYSQLSH_VERSION=8.0.37 +ARG MYSQLSH_VERSION=8.4.0 ARG MYSQLSH_GLIBC_VERSION=2.28 ARG TARGETARCH @@ -41,7 +41,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && if [ "${TARGETARCH}" = 'amd64' ]; then MYSQLSH_ARCH='x86-64'; fi \ && if [ "${TARGETARCH}" = 'arm64' ]; then MYSQLSH_ARCH='arm-64'; fi \ - && curl -o /tmp/mysqlsh.tar.gz -fsL "https://cdn.mysql.com//Downloads/MySQL-Shell/mysql-shell-${MYSQLSH_VERSION}-linux-glibc${MYSQLSH_GLIBC_VERSION}-${MYSQLSH_ARCH:-unknown}bit.tar.gz" \ + && curl -o /tmp/mysqlsh.tar.gz -fsL "https://cdn.mysql.com/Downloads/MySQL-Shell/mysql-shell-${MYSQLSH_VERSION}-linux-glibc${MYSQLSH_GLIBC_VERSION}-${MYSQLSH_ARCH:-unknown}bit.tar.gz" \ && mkdir /usr/local/mysql-shell \ && tar -xf /tmp/mysqlsh.tar.gz -C /usr/local/mysql-shell --strip-components=1 \ && rm -f /tmp/mysqlsh.tar.gz diff --git a/Makefile b/Makefile index 7e28e4a6..08079ad5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ CTRL_RUNTIME_VERSION := $(shell awk '/sigs.k8s.io\/controller-runtime/ {print su KUSTOMIZE_VERSION = 5.4.1 HELM_VERSION = 3.15.0 CRD_TO_MARKDOWN_VERSION = 0.0.3 -MYSQLSH_VERSION = 8.0.37-1 +MYSQLSH_VERSION = 8.4.0-1 MDBOOK_VERSION = 0.4.37 GORELEASER_VERSION = 1.26.1 YQ_VERSION = 4.44.1 diff --git a/README.md b/README.md index ada50674..5652bbba 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Blog article: [Introducing MOCO, a modern MySQL operator on Kubernetes](https:// ## Supported software -- MySQL: 8.0.18, 8.0.25, 8.0.26, 8.0.27, 8.0.28, 8.0.30, 8.0.31, 8.0.32, 8.0.33, 8.0.34, 8.0.35, 8.0.36, 8.0.37 +- MySQL: 8.0.28, 8.0.36, 8.0.37, 8.4.0 - Kubernetes: 1.27, 1.28, 1.29 MOCO supports (tests) the LTS releases of MySQL 8. @@ -74,7 +74,7 @@ spec: spec: containers: - name: mysqld - image: ghcr.io/cybozu-go/moco/mysql:8.0.37 + image: ghcr.io/cybozu-go/moco/mysql:8.4.0 volumeClaimTemplates: - metadata: name: mysql-data diff --git a/containers/mysql/8.4.0/Dockerfile b/containers/mysql/8.4.0/Dockerfile new file mode 100644 index 00000000..8ce9e12d --- /dev/null +++ b/containers/mysql/8.4.0/Dockerfile @@ -0,0 +1,40 @@ +FROM ghcr.io/cybozu/ubuntu-dev:22.04 AS builder + +ARG MYSQL_VERSION=8.4.0 + +RUN apt-get update && apt-get -y install --no-install-recommends \ + cmake \ + libncurses5-dev \ + libjemalloc-dev \ + libnuma-dev \ + libaio-dev \ + pkg-config + +RUN cd tmp/ \ + && curl -fsSL -O https://dev.mysql.com/get/Downloads/MySQL-8.4/mysql-${MYSQL_VERSION}.tar.gz \ + && tar -x -z -f mysql-${MYSQL_VERSION}.tar.gz \ + && cd mysql-${MYSQL_VERSION} \ + && mkdir bld \ + && cd bld \ + && cmake .. -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DWITH_NUMA=1 -DWITH_JEMALLOC=1 -DWITH_PACKAGE_FLAGS=0 \ + && make -j 20 \ + && make install + +FROM ghcr.io/cybozu/ubuntu:22.04 + +COPY --from=builder /usr/local/mysql/LICENSE /usr/local/mysql/LICENSE +COPY --from=builder /usr/local/mysql/bin /usr/local/mysql/bin +COPY --from=builder /usr/local/mysql/lib /usr/local/mysql/lib +COPY --from=builder /usr/local/mysql/share /usr/local/mysql/share + +RUN apt-get update \ + && apt-get install -y --no-install-recommends libjemalloc2 libnuma1 libaio1 \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /var/lib/mysql \ + && chown -R 10000:10000 /var/lib/mysql + +ENV PATH=/usr/local/mysql/bin:"$PATH" +VOLUME /var/lib/mysql +ENTRYPOINT ["mysqld"] +EXPOSE 3306 33060 33062 8080 +USER 10000:10000 diff --git a/containers/mysql/8.4.0/TAG b/containers/mysql/8.4.0/TAG new file mode 100644 index 00000000..5fa2e0c0 --- /dev/null +++ b/containers/mysql/8.4.0/TAG @@ -0,0 +1 @@ +8.4.0.1 diff --git a/containers/mysql/8.4.0/container-structure-test.yaml b/containers/mysql/8.4.0/container-structure-test.yaml new file mode 100644 index 00000000..b1336096 --- /dev/null +++ b/containers/mysql/8.4.0/container-structure-test.yaml @@ -0,0 +1,15 @@ +schemaVersion: '2.0.0' +fileExistenceTests: +- name: 'mysqld' + path: '/usr/local/mysql/bin/mysqld' + shouldExist: true + isExecutableBy: 'owner' +- name: 'mysql lib' + path: '/usr/local/mysql/lib' + shouldExist: true +- name: 'mysql share' + path: '/usr/local/mysql/share' + shouldExist: true +- name: 'mysql LICENSE' + path: '/usr/local/mysql/LICENSE' + shouldExist: true diff --git a/e2e/Makefile b/e2e/Makefile index 99ac5747..3f40b0be 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -1,7 +1,7 @@ KIND_VERSION = 0.23.0 KUBERNETES_VERSION = 1.29.4 CERT_MANAGER_VERSION = 1.14.5 -MYSQL_VERSION = 8.0.37 +MYSQL_VERSION = 8.4.0 KIND := $(dir $(shell pwd))/bin/kind KUBECTL := $(dir $(shell pwd))/bin/kubectl diff --git a/e2e/upgrade_test.go b/e2e/upgrade_test.go index 45485967..66fff3bf 100644 --- a/e2e/upgrade_test.go +++ b/e2e/upgrade_test.go @@ -19,8 +19,8 @@ import ( var upgradeYAML string const ( - mysqlVersionOld = "8.0.18" - mysqlVersionNew = "8.0.25" + mysqlVersionOld = "8.0.28" + mysqlVersionNew = "8.0.37" ) var _ = Context("upgrade", func() {