Github user paul-guo- commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/1073#discussion_r94380992
  
    --- Diff: contrib/hawq-docker/README.md ---
    @@ -0,0 +1,96 @@
    +# hawq-docker
    +
    +hawq-docker is based on *wangzw's* repo *hawq-devel-env*. It is the docker 
images and scripts to help developers of Apache HAWQ to setup building and 
testing environment with docker.
    +
    +Both CentOS 7 and CentOS 6 are supported.
    +Change variable **OS_VERSION** (:= centos7 OR centos6) in Makefile to 
switch between CentOS 7 and CentOS 6.
    +
    +Take CentOS 7 as an example below.
    +
    +# Install docker
    +* following the instructions to install docker.
    +https://docs.docker.com/
    +
    +# Setup build and test environment
    +* clone this repository
    +```
    +git clone https://github.com/guofengrichard/hawq-docker.git .
    +```
    +* Get the docker images
    +```
    +  cd hawq-docker
    +  make pull (recommended)
    +OR
    +  make build
    +``` 
    +* setup a 5 nodes virtual cluster for Apache HAWQ build and test.
    +```
    +make run
    +```
    +Now let's have a look about what we creted.
    +```
    +[root@localhost hawq-docker]# docker ps -a
    +CONTAINER ID        IMAGE                          COMMAND                
CREATED             STATUS              PORTS               NAMES
    +382b2b3360d1        hawq/hawq-test:centos7   "entrypoint.sh bash"   2 
minutes ago       Up 2 minutes                            centos7-datanode3
    +86513c331d45        hawq/hawq-test:centos7   "entrypoint.sh bash"   2 
minutes ago       Up 2 minutes                            centos7-datanode2
    +c0ab10e46e4a        hawq/hawq-test:centos7   "entrypoint.sh bash"   2 
minutes ago       Up 2 minutes                            centos7-datanode1
    +e27beea63953        hawq/hawq-test:centos7   "entrypoint.sh bash"   2 
minutes ago       Up 2 minutes                            centos7-namenode
    +1f986959bd04        hawq/hawq-dev:centos7    "/bin/true"            2 
minutes ago       Created                                 centos7-data
    +```
    +**centos7-data** is a data container and mounted to /data directory on all 
other containers to provide a shared storage for the cluster. 
    +
    +# Build and Test Apache HAWQ
    +* attach to namenode
    +```
    +docker exec -it centos7-namenode bash
    +```
    +* check if HDFS working well
    +```
    +sudo -u hdfs hdfs dfsadmin -report
    +```
    +* clone Apache HAWQ code to /data direcotry
    +```
    +git clone https://github.com/apache/incubator-hawq.git /data/hawq
    +```
    +* build Apache HAWQ
    +```
    +cd /data/hawq
    +./configure --prefix=/data/hawq-dev
    +make
    +make install
    +```
    +(When you are using CentOS 6, run command `scl enable devtoolset-2 bash` 
before
    +configuring hawq and run command `exit` after installing hawq.) 
    --- End diff --
    
    Why "exit" command is needed? exit the container?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to