[ARVADOS] created: 7847d584aadee5b5b91381b457ecddbd71a6d7a0
git at public.curoverse.com
git at public.curoverse.com
Mon Apr 7 10:05:46 EDT 2014
at 7847d584aadee5b5b91381b457ecddbd71a6d7a0 (commit)
commit 7847d584aadee5b5b91381b457ecddbd71a6d7a0
Author: Brett Smith <brett at curoverse.com>
Date: Fri Apr 4 12:00:57 2014 -0400
docker: Build base container for Crunch jobs.
diff --git a/docker/build_tools/Makefile b/docker/build_tools/Makefile
index 9eac2ec..82888ad 100644
--- a/docker/build_tools/Makefile
+++ b/docker/build_tools/Makefile
@@ -24,6 +24,8 @@ BUILD = build/.buildstamp
BASE_DEPS = base/Dockerfile $(BASE_GENERATED)
+JOBS_DEPS = jobs/Dockerfile
+
API_DEPS = api/Dockerfile $(API_GENERATED)
DOC_DEPS = doc/Dockerfile doc/apache2_vhost
@@ -86,6 +88,10 @@ $(BUILD):
mkdir -p build
rsync -rlp --exclude=docker/ --exclude='**/log/*' --exclude='**/tmp/*' \
--chmod=Da+rx,Fa+rX ../ build/
+ find build/ -name \*.gem -delete
+ cd build/sdk/python/ && ./build.sh
+ cd build/sdk/cli && gem build arvados-cli.gemspec
+ cd build/sdk/ruby && gem build arvados.gemspec
touch build/.buildstamp
$(BASE_GENERATED): config.yml $(BUILD)
@@ -125,6 +131,16 @@ doc-image: base-image $(BUILD) $(DOC_DEPS)
$(DOCKER_BUILD) -t arvados/doc doc
date >doc-image
+jobs-image: base-image $(BUILD) $(JOBS_DEPS)
+ $(DOCKER_BUILD) -t arvados/jobswofuse jobs
+ docker run --privileged --name jobsaddfuse --user root \
+ arvados/jobswofuse /bin/sh -c \
+ "/bin/mknod -m 0660 /dev/fuse c 10 229 && \
+ /bin/chown root:fuse /dev/fuse"
+ docker commit --run='{"User": "crunch"}' jobsaddfuse arvados/jobs
+ docker rm jobsaddfuse
+ date >jobs-image
+
workbench-image: passenger-image $(BUILD) $(WORKBENCH_DEPS)
mkdir -p workbench/generated
tar -czf workbench/generated/workbench.tar.gz -C build/apps workbench
diff --git a/docker/jobs/Dockerfile b/docker/jobs/Dockerfile
new file mode 100644
index 0000000..e3fdd18
--- /dev/null
+++ b/docker/jobs/Dockerfile
@@ -0,0 +1,22 @@
+# After you build this image, you should do a privileged run to make /dev/fuse.
+# See the jobs-image recipe in docker/build_tools/Makefile.
+
+FROM arvados/base
+MAINTAINER Brett Smith <brett at curoverse.com>
+
+# Install dependencies and set up system.
+RUN /usr/bin/apt-get install -q -y python-dev python-llfuse python-pip \
+ libio-socket-ssl-perl libjson-perl liburi-perl libwww-perl \
+ fuse libattr1-dev libfuse-dev && \
+ /usr/sbin/adduser --disabled-password \
+ --gecos 'Crunch execution user' crunch && \
+ /usr/sbin/adduser crunch fuse && \
+ /usr/bin/install -d -o crunch -g crunch -m 0700 /tmp/crunch-job && \
+ /bin/ln -s /proc/mounts /etc/mtab && \
+ /bin/ln -s /usr/src/arvados /usr/local/src/arvados
+
+# Install Arvados packages.
+RUN find /usr/src/arvados/sdk -name '*.gem' -print0 | \
+ xargs -0rn 1 gem install && \
+ cd /usr/src/arvados/sdk/python && \
+ python setup.py install
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list