Installing MinIO for usage with mysql-test-run

You are viewing an old version of this article. View the current version here.

When testing the S3 storage engine with the s3 test suite, mysql-test-run needs access to Amazon S3 compatible storage.

The easiest way to achieve this is to install MinIO, an open source S3 compatible storage.

Here is a shell script that you can use to install MinIO with the right credentials for mysql-test-run. This should work on most Linux systems as the binaries are statically linked.

# Where to install the MinIO binaries and where to store the data
install=/my/local/minio
data=/tmp/shared

mkdir -p $install
wget ftp://ftp.askmonty.org/public/minio/minio-linux-amd64 -O $install/minio
wget ftp://ftp.askmonty.org/public/minio/mc-linux-amd64 -O $install/mc
chmod a+x $install/minio $install/mc
MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minioadmin $install/minio server $data 2>&1 &
$install/mc config host add local http://127.0.0.1:9000 minio minioadmin
$install/mc mb --ignore-existing local/storage-engine

Now you can run the S3 test suite:

cd "mysql-data-dir"/mysql-test
./mysql-test-run --suite=s3

If there is an issue while running the test suite, you can see the files created by MinIO with:

$install/mc ls -r local/storage-engine

If you want to use MinIO with different credentials or you want to run the test against another S3 storage you ave to update the update the following files:

mysql-test/suite/s3/my.cnf
mysql-test/suite/s3/slave.cnf

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.