Skip to content

Commit

Permalink
ci: update docker
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Watkins <[email protected]>
  • Loading branch information
dotnwat committed Jan 11, 2016
1 parent 04b02f8 commit 7ea8d86
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
24 changes: 8 additions & 16 deletions docker/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,19 @@ MAINTAINER Noah Watkins <[email protected]>

RUN apt-get update && apt-get install -y git wget

# install ceph master development branch
# built ceph/rados bits
RUN wget -q -O- 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc' | sudo apt-key add -
RUN echo deb http://gitbuilder.ceph.com/ceph-deb-$(lsb_release -sc)-x86_64-basic/ref/master $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
RUN echo deb http://gitbuilder.ceph.com/ceph-deb-$(lsb_release -sc)-x86_64-basic/ref/jewel $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
RUN apt-get update && apt-get install -y --force-yes ceph librados-dev

# install ceph build dependencies and build zlog ceph plugin bits
# ceph dev deps
RUN mkdir /src && cd /src && \
git clone --recursive https://github.com/noahdesu/ceph.git && \
git clone --branch=jewel --recursive https://github.com/ceph/ceph.git && \
cd ceph && \
git checkout -b cls_zlog origin/cls_zlog && \
bash ./install-deps.sh && \
./autogen.sh && \
./configure && \
cd src && \
make libcls_zlog.la && \
make libcls_zlog_client.la && \
cp .libs/libcls_zlog.so* /usr/lib/rados-classes/ && \
cp .libs/libcls_zlog_client.so* /usr/lib/ && \
cp cls/zlog/cls_zlog_client.h /usr/include/rados/ && \
cd .. && \
make clean
bash ./install-deps.sh

# zlog dev deps
RUN apt-get install -y libprotobuf-dev protobuf-compiler

ADD micro-osd.sh /src/micro-osd.sh
ADD entrypoint.sh /entrypoint.sh
Expand Down
27 changes: 21 additions & 6 deletions docker/ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,34 @@
set -e
set -x

# checkout zlog ceph repo
pushd /src/ceph
git remote add nd https://github.com/noahdesu/ceph.git
git fetch nd
git checkout -b zlog/jewel nd/zlog/jewel
git submodule update --force --init --recursive
bash ./install-deps.sh

# build and install zlog object class and client
./autogen.sh
./configure
cd src
make libcls_zlog.la
make libcls_zlog_client.la
cp -a .libs/libcls_zlog.so* /usr/lib/rados-classes/
cp -a .libs/libcls_zlog_client.so* /usr/lib/
cp cls/zlog/cls_zlog_client.h /usr/include/rados/
popd

# startup a ceph cluster
mkdir /tmp/ceph
bash /src/micro-osd.sh /tmp/ceph

BRANCH=${branch:-master}

apt-get install -y libprotobuf-dev protobuf-compiler

# install zlog. this is done in the entry point so it will
# pull the latest zlog source each time the container is run
# build zlog
cd /src

ls -l

if [ ! -d /src/zlog ]; then
git clone --branch=$BRANCH https://github.com/noahdesu/zlog.git
fi
Expand All @@ -27,6 +41,7 @@ autoreconf -ivf
./configure
make

# run seqr and tests
cd /src/zlog/src
export CEPH_CONF=/tmp/ceph/ceph.conf
./zlog-seqr --port 5678 --daemon
Expand Down

0 comments on commit 7ea8d86

Please sign in to comment.