Merge branch 'master' into resharding

This commit is contained in:
Alain Jobart 2015-08-13 06:56:29 -07:00
Родитель 37626cea48 ca10b6aa42
Коммит f354154c30
4 изменённых файлов: 25 добавлений и 6 удалений

Просмотреть файл

@ -13,7 +13,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
make \
memcached \
mercurial \
openjdk-7-jre-headless \
openjdk-7-jdk \
pkg-config \
python-dev \
python-mysqldb \
@ -23,6 +23,12 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Maven 3.1+
RUN mkdir -p /vt/dist && \
cd /vt/dist && \
curl -sL http://www.carfab.com/apachesoftware/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz | tar -xz && \
mv apache-maven-3.3.3 maven
# Install etcd v2.0
RUN mkdir -p /go/src/github.com/coreos && \
cd /go/src/github.com/coreos && \
@ -41,7 +47,7 @@ ENV VTPORTSTART 15000
ENV PYTHONPATH $VTROOT/dist/py-mock-1.0.1/lib/python2.7/site-packages:$VTROOT/dist/py-cbson/lib/python2.7/site-packages:$VTROOT/dist/py-vt-bson-0.3.2/lib/python2.7/site-packages:$VTROOT/py-vtdb
ENV GOBIN $VTROOT/bin
ENV GOPATH $VTROOT
ENV PATH $VTROOT/bin:$PATH
ENV PATH $VTROOT/bin:$VTROOT/dist/maven/bin:$PATH
ENV VT_MYSQL_ROOT /usr
ENV PKG_CONFIG_PATH $VTROOT/lib
ENV CGO_CFLAGS -I$VTROOT/dist/vt-zookeeper-3.3.5/include/c-client-src
@ -57,7 +63,8 @@ RUN $VTTOP/travis/install_protobuf.sh
# Create vitess user
RUN groupadd -r vitess && useradd -r -g vitess vitess && \
mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt
mkdir -p /vt/vtdataroot /home/vitess && \
chown -R vitess:vitess /vt /home/vitess
# Create mount point for actual data (e.g. MySQL data dir)
VOLUME /vt/vtdataroot

Просмотреть файл

@ -22,9 +22,14 @@ fi
# Mirror permissions to "other" from the owning group (for which we assume it has at least rX permissions).
chmod -R o=g .
args="$args --rm -e USER=vitess -v /dev/log:/dev/log"
args="$args -e USER=vitess -v /dev/log:/dev/log"
args="$args -v $PWD:/tmp/src"
# Share maven dependency cache so they don't have to be redownloaded every time.
mkdir -p /tmp/mavencache
chmod 777 /tmp/mavencache
args="$args -v /tmp/mavencache:/home/vitess/.m2"
# Mount in host VTDATAROOT if one exists, since it might be a RAM disk or SSD.
if [[ -n "$VTDATAROOT" ]]; then
hostdir=`mktemp -d --tmpdir=$VTDATAROOT test-XXX`
@ -49,7 +54,7 @@ if tty -s; then
exitcode=$?
else
# non-interactive shell (kill child on signal)
trap 'docker rm -f $testid 2>/dev/null' SIGTERM SIGINT
trap 'docker kill $testid &>/dev/null' SIGTERM SIGINT
docker run $args vitess/bootstrap:$flavor bash -c "$bashcmd" &
wait $!
exitcode=$?
@ -58,8 +63,11 @@ fi
# Clean up host dir mounted VTDATAROOT
if [[ -n "$hostdir" ]]; then
# Use Docker user to clean up first, to avoid permission errors.
docker run $args vitess/bootstrap:$flavor bash -c 'rm -rf /vt/vtdataroot/*'
docker run --rm -v $hostdir:/vt/vtdataroot vitess/bootstrap:$flavor bash -c 'rm -rf /vt/vtdataroot/*'
rm -rf $hostdir
fi
# Delete the container
docker rm -f $testid &>/dev/null
exit $exitcode

Просмотреть файл

@ -36,6 +36,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>

Просмотреть файл

@ -3,6 +3,9 @@
"unit": {
"Command": "godep go test ./go/..."
},
"java_vtgate_client": {
"Command": "make build java_vtgate_client_test"
},
"queryservice_vtocc": {
"File": "queryservice_test.py",
"Args": "-m -e vtocc"