Modify docker module errors and deploy docker image on openjdk#288
Modify docker module errors and deploy docker image on openjdk#288carsonwang merged 11 commits intoIntel-bigdata:masterfrom zybing:master
Conversation
modify some error in opensource-docker module1.modify opensource-docker/Dockerfile errorin line 67, 68. copy directory(/root) is error , change it as follow: 2.change spark vesion in hibench-docker.confIn this mirror(http://mirror.reverse.net/pub/apache/spark/) , the minimum spark version is 1.5.2. 3.In base/base-core file, adopt build-all.sh to compile hibench project/bin/build-all.sh can be used to built hibench for all known Spark and MR versions 4.set opensource docker and cdh docker different nameby this way , opensource-docker module and cdh-docker module can be built to different docker image. |
| ENV PATH $PATH:/usr/local/apache-maven/bin | ||
| # copy local maven repository to docker image | ||
| #RUN rm -rf /root/.m2 | ||
| #ADD .m2 /root/.m2 |
There was a problem hiding this comment.
These three lines are not used? Remove them?
There was a problem hiding this comment.
originally , I think these three lines will provide some hints for users who don't have good network environment. Because downloading maven repositories is a time-consuming process. Maybe you are right, It's not meaningful enough. I can remove these.
|
Thanks for the work, @zybing . I just left some comments. Can we remove |
|
@carsonwang .Thanks for your advice. I have added detailed line notes below your questions. For the license header , I use the original files's license header. When I clone this repository, the licence header is already in the config and shell files. should I do some modification? |
|
Ok, let's keep the license header for now. Can you please update the PR by removing some "#!bin/bash" as you mentioned? I'll merge it then. |
|
@carsonwang . I remove the |
|
Thanks @zybing ! |
Modify docker module errors
1.move
#!bin/bashto the first line for all shell script files.2.add comment for the license information of xml files.
without the
<!--..-->comment, the xml file will not be parsed correctly.3.modify the scripts/gen_base_dockerfile.sh error
in line 58 ,the
sedstatment doesn't work because of syntax error4.when maven compiles storm benchmark ,the error of lacking of thrift be throwed.
To resolve the problem, add
RUN apt-get update && apt-get install -y thrift-compilerto the base/base-core file5.modify cdh-docker/Dockerfile file
the last line in cdh-docker/Dockerfile is
CMD bash -C '/usr/bin/restart-hadoop-spark.sh'; 'bash'. But it is not a good solution to run docker container in Dockerfile. I delete this line and write a new runexample.sh to replace it.6.add cdh-docker/scripts/runexample.sh file
using this file to run docker container,the content as follow:
#modify etc/hosts file to avoid connection errorcp /etc/hosts /etc/hostsbaksed -i 's/::1/#::1/' /etc/hostsbakcat /etc/hostsbak > /etc/hostsrm -rf /etc/hostsbak#run wordcount example/usr/bin/restart-hadoop-spark.sh${HIBENCH_HOME}/workloads/wordcount/prepare/prepare.sh${HIBENCH_HOME}/workloads/wordcount/mapreduce/bin/run.sh7.modify script/run_container.sh file
modify the last line. modify the run docker container method
8.modify opensource-docker module
it is similar with cdh-docker module
9.change the default maven version to 3.0.5 in hibench-docker.conf file
Deploy docker image on openjdk
1.modify base/base-core file. change the oracle-jdk installation to openjdk installation. code as follow:
# Install JavaRUN \apt-get update && \apt-get install -y openjdk-${JDK_VERSION}-jdk# Define commonly used JAVA_HOME variableENV JAVA_HOME /usr/lib/jvm/java-${JDK_VERSION}-openjdk-amd64ENV PATH $PATH:$JAVA_HOME/bin2.modify cdh-docker(opensource-docker)/scripts/hadoop-env.sh file. code as follow:
export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"