Skip to content

Commit

Permalink
docker: Switch default flavor to mysql56.
Browse files Browse the repository at this point in the history
  • Loading branch information
enisoc committed Nov 3, 2015
1 parent 71e4fdc commit c24dc79
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM vitess/bootstrap:mariadb
FROM vitess/bootstrap:mysql56

# Clear out old tree from bootstrap image.
USER root
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile.mariadb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM vitess/bootstrap:mariadb

# Clear out old tree from bootstrap image.
USER root
RUN rm -rf /vt/src/github.com/youtube/vitess

# Re-copy sources from working tree
COPY . /vt/src/github.com/youtube/vitess

# Fix permissions
RUN chown -R vitess:vitess /vt
USER vitess

# Build Vitess
RUN make build
15 changes: 9 additions & 6 deletions docker/lite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
FROM debian:jessie

# Install dependencies
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db \
&& echo 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main' > /etc/apt/sources.list.d/mariadb.list \
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 \
mariadb-server \
&& 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)
Expand Down
34 changes: 34 additions & 0 deletions docker/lite/Dockerfile.mariadb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 keyserver.ubuntu.com 0xcbcb082a1bb943db \
&& echo 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main' > /etc/apt/sources.list.d/mariadb.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bzip2 \
memcached \
mariadb-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.3.5/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
4 changes: 2 additions & 2 deletions examples/kubernetes/vttablet-pod-benchmarking-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ spec:
-db-config-filtered-uname vt_filtered
-db-config-filtered-dbname vt_{{keyspace}}
-db-config-filtered-charset utf8
-bootstrap_archive mysql-db-dir_10.0.13-MariaDB.tbz" vitess
-bootstrap_archive mysql-db-dir_5.6.24.tbz" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/benchmark.cnf:/vt/config/mycnf/master_mariadb.cnf
value: /vt/config/mycnf/benchmark.cnf:/vt/config/mycnf/master_mysql56.cnf
volumes:
- name: syslog
hostPath: {path: /dev/log}
Expand Down
4 changes: 2 additions & 2 deletions examples/kubernetes/vttablet-pod-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ spec:
-db-config-filtered-uname vt_filtered
-db-config-filtered-dbname vt_{{keyspace}}
-db-config-filtered-charset utf8
-bootstrap_archive mysql-db-dir_10.0.13-MariaDB.tbz" vitess
-bootstrap_archive mysql-db-dir_5.6.24.tbz" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/master_mariadb.cnf
value: /vt/config/mycnf/master_mysql56.cnf
volumes:
- name: syslog
hostPath: {path: /dev/log}
Expand Down
2 changes: 1 addition & 1 deletion test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For example:

// Flags
var (
flavor = flag.String("flavor", "mariadb", "bootstrap flavor to run against")
flavor = flag.String("flavor", "mysql56", "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")
Expand Down

0 comments on commit c24dc79

Please sign in to comment.