You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crail.apache.org by pe...@apache.org on 2018/08/14 11:21:19 UTC

[2/2] incubator-crail git commit: Docker: fix cache hugepage requirement

Docker: fix cache hugepage requirement

Allow users to use the Crail shell without providing
hugepages via a volume mount to Docker.

Signed-off-by: Jonas Pfefferle <pe...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-crail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crail/commit/86f1bd35
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crail/tree/86f1bd35
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crail/diff/86f1bd35

Branch: refs/heads/master
Commit: 86f1bd350a69811e3329f949ea0f93e72b1e56f2
Parents: 31be5fe
Author: Jonas Pfefferle <pe...@apache.org>
Authored: Fri Aug 3 10:36:57 2018 +0200
Committer: Jonas Pfefferle <pe...@apache.org>
Committed: Tue Aug 14 13:19:24 2018 +0200

----------------------------------------------------------------------
 docker/Dockerfile            | 9 ++++-----
 docker/start-crail-docker.sh | 6 ++++++
 2 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/86f1bd35/docker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 910dd81..e0b446d 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -17,7 +17,7 @@ FROM ubuntu:18.04
 MAINTAINER Apache Crail <de...@crail.apache.org>
 
 # TODO: automate update version on new release
-ARG GIT_COMMIT="v1.0"
+ARG GIT_COMMIT="master"
 ENV LOG_COMMIT=$GIT_COMMIT
 
 RUN echo "Crail-$LOG_COMMIT install openjdk8, git and envsubst" && \
@@ -41,8 +41,6 @@ RUN echo "Crail-$LOG_COMMIT clone & build Crail repo" && \
 ENV CRAIL_HOME /incubator-crail/assembly/target/crail-1.0-bin
 ENV PATH=${PATH}:${CRAIL_HOME}/bin
 
-RUN echo "Crail-$LOG_COMMIT update crail script to update core-site.xml" && \
-    sed -i '$ienvsubst < $CRAIL_HOME/conf/core-site.xml > $CRAIL_HOME/conf/core-site.xml' $CRAIL_HOME/bin/crail
 
 ENV NAMENODE_HOST=localhost
 ENV NAMENODE_PORT=9060
@@ -50,10 +48,11 @@ ENV INTERFACE=eth0
 ENV DATAPATH=/dev/hugepages/data
 ENV STORAGELIMIT=1073741824
 ENV CACHEPATH=/dev/hugepages/cache
-ENV CACHELIMIT=1073741824
+ENV CACHELIMIT=0
 
+COPY ./start-crail-docker.sh $CRAIL_HOME/bin
 COPY ./crail-env.sh $CRAIL_HOME/conf
 COPY ./core-site.xml $CRAIL_HOME/conf
 COPY ./crail-site.conf $CRAIL_HOME/conf
 
-ENTRYPOINT ["crail"]
+ENTRYPOINT ["start-crail-docker.sh"]

http://git-wip-us.apache.org/repos/asf/incubator-crail/blob/86f1bd35/docker/start-crail-docker.sh
----------------------------------------------------------------------
diff --git a/docker/start-crail-docker.sh b/docker/start-crail-docker.sh
new file mode 100755
index 0000000..f2b6639
--- /dev/null
+++ b/docker/start-crail-docker.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# substitude env variables in core-site.xml
+envsubst < $CRAIL_HOME/conf/core-site.xml > $CRAIL_HOME/conf/core-site.xml
+
+crail $@