1

I found out about Vitess which let you shard MySQL database. I want to use the docker image of both MariaDB and Vitess but I'm not quite sure what to do next. I'm using CentOS 7.

I installed the images

docker pull mariadb
docker pull vitess/root
docker pull vitess/orchestrator

Log inside the vitess image

sudo docker run -ti vitess/root bash

As the website said, make build

make build

I set up the variables

export VTROOT=/vt
export VTDATAROOT=/vt/vtdataroot

The manual said it was in the home directory but in the image it's at root.

But after that I'm stuck. I laucnh zookeeper : ./zk-up.sh

Starting zk servers... Waiting for zk servers to be ready... Started zk servers. ERROR: logging before flag.Parse: E0412
00:31:26.378586     132 syslogger.go:122] can't connect to syslog
W0412 00:31:26.382527     132 vtctl.go:80] cannot connect to syslog:
Unix syslog delivery error Configured zk servers.

Oops, okay, let's continue...

./vtctld-up.sh for the web internace

Starting vtctld...
Access vtctld web UI at http://88bdaff4e181:15000

Obviously I cannot access that link since it's in docker on a headless server

./vttablet-up.sh suppose to bring up 3 vttablets, but MariaDB is in another docker, not yet started and if I open the file it is not apparent how to set it up.

Is there any MySQL or PostgreSQL sharding solution more easily installable? Or how can I set this up?

(Docker noob here sorry)

Thanks!

Dan Kohn
  • 33,811
  • 9
  • 84
  • 100
Jayd
  • 183
  • 3
  • 15
  • Are you putting all the shards on the same physical hardware? If so, is this just for testing? I do not expect it to provide any performance benefit. – Rick James Apr 29 '18 at 00:11

1 Answers1

1

If you need multiple container orchestrated, best bet is to use docker-compose. You can define all the application dependencies as separate containers and network them to be accessible from each other.

Shoan
  • 4,003
  • 1
  • 26
  • 29