зеркало из https://github.com/github/vitess-gh.git
Add Docker images for MySQL 5.7.
This commit is contained in:
Родитель
dea4eb2929
Коммит
4170be37ce
|
@ -1,4 +1,4 @@
|
|||
FROM vitess/bootstrap:mysql56
|
||||
FROM vitess/bootstrap:mysql57
|
||||
|
||||
# Re-copy sources from working tree
|
||||
USER root
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
FROM vitess/bootstrap:mysql56
|
||||
|
||||
# Re-copy sources from working tree
|
||||
USER root
|
||||
COPY . /vt/src/github.com/youtube/vitess
|
||||
|
||||
# Fix permissions
|
||||
RUN chown -R vitess:vitess /vt
|
||||
USER vitess
|
||||
|
||||
# Build Vitess
|
||||
RUN make build
|
8
Makefile
8
Makefile
|
@ -118,6 +118,7 @@ docker_bootstrap:
|
|||
docker/bootstrap/build.sh common
|
||||
docker/bootstrap/build.sh mariadb
|
||||
docker/bootstrap/build.sh mysql56
|
||||
docker/bootstrap/build.sh mysql57
|
||||
docker/bootstrap/build.sh percona
|
||||
|
||||
docker_base:
|
||||
|
@ -125,6 +126,10 @@ docker_base:
|
|||
chmod -R o=g *
|
||||
docker build -t vitess/base .
|
||||
|
||||
docker_base_mysql56:
|
||||
chmod -R o=g *
|
||||
docker build -f Dockerfile.percona -t vitess/base:mysql56 .
|
||||
|
||||
docker_base_percona:
|
||||
chmod -R o=g *
|
||||
docker build -f Dockerfile.percona -t vitess/base:percona .
|
||||
|
@ -136,6 +141,9 @@ docker_base_mariadb:
|
|||
docker_lite:
|
||||
cd docker/lite && ./build.sh
|
||||
|
||||
docker_lite_mysql56:
|
||||
cd docker/lite && ./build.sh mysql56
|
||||
|
||||
docker_lite_mariadb:
|
||||
cd docker/lite && ./build.sh mariadb
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
FROM vitess/bootstrap:common
|
||||
|
||||
# Install MySQL 5.7
|
||||
RUN apt-key adv --recv-keys --keyserver ha.pool.sks-keyservers.net 5072E1F5 && \
|
||||
add-apt-repository 'deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7' && \
|
||||
apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server libmysqlclient-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Bootstrap Vitess
|
||||
WORKDIR /vt/src/github.com/youtube/vitess
|
||||
USER vitess
|
||||
ENV MYSQL_FLAVOR MySQL56
|
||||
RUN ./bootstrap.sh --skip_root_installs
|
|
@ -3,7 +3,7 @@ FROM debian:jessie
|
|||
|
||||
# Install dependencies
|
||||
RUN apt-key adv --recv-keys --keyserver pgp.mit.edu 5072E1F5 \
|
||||
&& echo 'deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6' > /etc/apt/sources.list.d/mysql.list \
|
||||
&& echo 'deb http://repo.mysql.com/apt/debian/ jessie mysql-5.7' > /etc/apt/sources.list.d/mysql.list \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# This image is only meant to be built from within the build.sh script.
|
||||
FROM debian:jessie
|
||||
|
||||
# Install dependencies
|
||||
RUN apt-key adv --recv-keys --keyserver pgp.mit.edu 5072E1F5 \
|
||||
&& echo 'deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6' > /etc/apt/sources.list.d/mysql.list \
|
||||
&& apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
bzip2 \
|
||||
memcached \
|
||||
libmysqlclient18 \
|
||||
mysql-client \
|
||||
mysql-server \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set up Vitess environment (just enough to run pre-built Go binaries)
|
||||
ENV VTTOP /vt/src/github.com/youtube/vitess
|
||||
ENV VTROOT /vt
|
||||
ENV GOTOP $VTTOP/go
|
||||
ENV VTDATAROOT $VTROOT/vtdataroot
|
||||
ENV GOBIN $VTROOT/bin
|
||||
ENV GOPATH $VTROOT
|
||||
ENV PATH $VTROOT/bin:$PATH
|
||||
ENV VT_MYSQL_ROOT /usr
|
||||
ENV PKG_CONFIG_PATH $VTROOT/lib
|
||||
ENV LD_LIBRARY_PATH $VTROOT/dist/vt-zookeeper-3.4.6/lib
|
||||
|
||||
# Copy binaries (placed by build.sh)
|
||||
COPY lite/vt /vt
|
||||
|
||||
# Create vitess user
|
||||
RUN groupadd -r vitess && useradd -r -g vitess vitess && \
|
||||
mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt
|
||||
|
||||
# Create mount point for actual data (e.g. MySQL data dir)
|
||||
VOLUME /vt/vtdataroot
|
2
test.go
2
test.go
|
@ -63,7 +63,7 @@ For example:
|
|||
|
||||
// Flags
|
||||
var (
|
||||
flavor = flag.String("flavor", "mysql56", "bootstrap flavor to run against")
|
||||
flavor = flag.String("flavor", "mysql57", "bootstrap flavor to run against")
|
||||
runCount = flag.Int("runs", 1, "run each test this many times")
|
||||
retryMax = flag.Int("retry", 3, "max number of retries, to detect flaky tests")
|
||||
logPass = flag.Bool("log-pass", false, "log test output even if it passes")
|
||||
|
|
Загрузка…
Ссылка в новой задаче