Skip to content

Commit

Permalink
Merge pull request #10 from rluisr/8.1
Browse files Browse the repository at this point in the history
MySQL 8.1 / 8.0.34
  • Loading branch information
rluisr authored Jul 23, 2023
2 parents 4395fd9 + 2548e6b commit 09b0d30
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.env
.envrc
test/.envrc
17 changes: 17 additions & 0 deletions .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ client for getting mysql-router information.

Supported version
-----------------
- 20190715 (8.0.17 - 8.0.32)
- 20190715 (8.0.17 - 8.0.34 / 8.1.0)

Enable HTTP Server and REST API
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=8.0.32
VERSION=8.1.0
1 change: 0 additions & 1 deletion test/.envrc

This file was deleted.

4 changes: 2 additions & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ test:
docker compose up --build --force-recreate --always-recreate-deps --renew-anon-volumes -d
docker exec test-mysqlrouter-go-test-1 sh -c "bash /go/src/mysqlrouter-go/entrypoint.sh"

down:
clean:
docker compose down
docker compose rm -f

local: test down
local: test clean
2 changes: 1 addition & 1 deletion test/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker compose up && docker compose rm -fsv
See [Makefile](Makefile)
69 changes: 46 additions & 23 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,31 @@ services:
- mysql-router-http
- mysql-router-https

# why using `latest` tag?
# Oracle does not pin the version of mysql-server of linux/amd64 ^^
mysql-server-1:
env_file:
- mysql-server.env
image: mysql/mysql-server:${VERSION}
environment:
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_ROOT_HOST: "%"
image: container-registry.oracle.com/mysql/community-server:latest
command: [ "mysqld","--server_id=1", "--binlog-transaction-dependency-tracking=WRITESET", "--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password" ]
ports:
- "3301:3306"

mysql-server-2:
env_file:
- mysql-server.env
image: mysql/mysql-server:${VERSION}
environment:
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_ROOT_HOST: "%"
image: container-registry.oracle.com/mysql/community-server:latest
command: [ "mysqld","--server_id=2","--binlog-transaction-dependency-tracking=WRITESET", "--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password" ]
ports:
- "3302:3306"

mysql-server-3:
env_file:
- mysql-server.env
image: mysql/mysql-server:${VERSION}
environment:
MYSQL_ROOT_PASSWORD: "mysql"
MYSQL_ROOT_HOST: "%"
image: container-registry.oracle.com/mysql/community-server:latest
command: [ "mysqld","--server_id=3","--binlog-transaction-dependency-tracking=WRITESET", "--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password" ]
ports:
- "3303:3306"
Expand All @@ -42,26 +47,38 @@ services:
platform: linux/amd64
build:
context: ./mysql-shell
args:
MYSQL_SHELL_PACKAGER_URL: "https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-8.1.0-1.el7.x86_64.rpm"
dockerfile: Dockerfile
env_file:
- mysql-shell.env
environment:
MYSQL_USER: "root"
MYSQL_HOST: "mysql-server-1"
MYSQL_PORT: "3306"
MYSQL_PASSWORD: "mysql"
MYSQLSH_SCRIPT: "/setupCluster.js"
image: mysqlshell:${VERSION}
depends_on:
- mysql-server-1
- mysql-server-2
- mysql-server-3

#
# DO NOT CHANGE APP NAME
# WE WILL HAVE TO CHANGE CERTIFICATES.
#
#
# DO NOT CHANGE APP NAME
# WE WILL HAVE TO CHANGE CERTIFICATES.
#
mysql-router-http:
platform: linux/amd64
build:
context: ./mysql-router
args:
MYSQL_YUM_REPO_URL: https://dev.mysql.com/get/mysql80-community-release-el7-8.noarch.rpm
dockerfile: Dockerfile_http
env_file:
- mysql-router.env
environment:
MYSQL_USER: "root"
MYSQL_HOST: "mysql-server-1"
MYSQL_PORT: "3306"
MYSQL_PASSWORD: mysql
MYSQL_INNODB_NUM_MEMBERS: 3
image: mysqlrouter-http:${VERSION}
ports:
- "8080:8080"
Expand All @@ -71,17 +88,23 @@ services:
- mysql-server-3
restart: on-failure

#
# DO NOT CHANGE APP NAME
# WE WILL HAVE TO CHANGE CERTIFICATES.
#
#
# DO NOT CHANGE APP NAME
# WE WILL HAVE TO CHANGE CERTIFICATES.
#
mysql-router-https:
platform: linux/amd64
build:
context: ./mysql-router
args:
MYSQL_YUM_REPO_URL: https://dev.mysql.com/get/mysql80-community-release-el7-8.noarch.rpm
dockerfile: Dockerfile_https
env_file:
- mysql-router.env
environment:
MYSQL_USER: "root"
MYSQL_HOST: "mysql-server-1"
MYSQL_PORT: "3306"
MYSQL_PASSWORD: mysql
MYSQL_INNODB_NUM_MEMBERS: 3
image: mysqlrouter-https:${VERSION}
ports:
- "8443:8443"
Expand Down
5 changes: 0 additions & 5 deletions test/mysql-router.env

This file was deleted.

6 changes: 4 additions & 2 deletions test/mysql-router/Dockerfile_http
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM oraclelinux:7-slim

RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 \
&& yum install -y yum install http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm \
ARG MYSQL_YUM_REPO_URL

RUN yum install -y $MYSQL_YUM_REPO_URL \
&& yum-config-manager --enable mysql-innovation-community \
&& yum install -y mysql-community-client mysql-router-community libpwquality \
&& yum clean all

Expand Down
6 changes: 4 additions & 2 deletions test/mysql-router/Dockerfile_https
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM oraclelinux:7-slim

RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 \
&& yum install -y yum install http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm \
ARG MYSQL_YUM_REPO_URL

RUN yum install -y $MYSQL_YUM_REPO_URL \
&& yum-config-manager --enable mysql-innovation-community \
&& yum install -y mysql-community-client mysql-router-community libpwquality \
&& yum clean all

Expand Down
3 changes: 3 additions & 0 deletions test/mysql-router/run_http.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
set -e

if [ "$1" = 'mysqlrouter' ]; then

mysqlrouter --version

if [[ -z $MYSQL_HOST || -z $MYSQL_PORT || -z $MYSQL_USER || -z $MYSQL_PASSWORD ]]; then
echo "We require all of"
echo " MYSQL_HOST"
Expand Down
2 changes: 0 additions & 2 deletions test/mysql-server.env

This file was deleted.

5 changes: 0 additions & 5 deletions test/mysql-shell.env

This file was deleted.

8 changes: 2 additions & 6 deletions test/mysql-shell/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# docker buildx build --platform linux/amd64 -t mysqlshell:8.0.29 . --load

FROM oraclelinux:7-slim

ARG KEY=https://repo.mysql.com/RPM-GPG-KEY-mysql
ARG MYSQL_SHELL_PACKAGE_URL="https://dev.mysql.com/get/Downloads/MySQL-Shell/mysql-shell-8.0.29-1.el7.x86_64.rpm"
ARG MYSQL_SHELL_PACKAGER_URL

COPY run.sh /run.sh
RUN chmod +x /run.sh

COPY setupCluster.js /setupCluster.js

RUN rpmkeys --import $KEY \
&& yum install -y $MYSQL_SHELL_PACKAGE_URL \
RUN yum install -y $MYSQL_SHELL_PACKAGER_URL \
&& yum clean all

ENTRYPOINT ["/run.sh"]
Expand Down
1 change: 1 addition & 0 deletions test/mysql-shell/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

if [ "$1" = 'mysqlsh' ]; then
mysqlsh --version

if [[ -z $MYSQL_HOST || -z $MYSQL_PORT || -z $MYSQL_USER || -z $MYSQL_PASSWORD ]]; then
echo "We require all of"
Expand Down

0 comments on commit 09b0d30

Please sign in to comment.