tree: e14c4acbfe886e8462c6128f2f92715a5070b188 [path history] [tgz]
  1. centos6/
  2. centos7/
  3. common/
  4. docker/
  5. ubuntu16/
  6. README.md
dev-support/docker/README.md

how to build

docker build -t ambari/build ./dev-support/docker/docker

how to run

# bash
docker run --privileged -t -i -p 80:80 -p 5005:5005 -p 8080:8080 -h node1.mydomain.com --name ambari1 -v ${AMBARI_SRC:-$(pwd)}:/tmp/ambari ambari/build bash
# where 5005 is java debug port and 8080 is the default http port, if no --privileged ambari-server start fails due to access to /proc/??/exe
# -t is required otherwise, sudo commands do not run

# build, install ambari and deploy hadoop in container
cd {ambari src}
docker rm ambari1
docker run --privileged -t -p 80:80 -p 5005:5005 -p 8080:8080 -h node1.mydomain.com --name ambari1 -v ${AMBARI_SRC:-$(pwd)}:/tmp/ambari ambari/build /tmp/ambari-build-docker/bin/ambaribuild.py [test|server|agent|deploy] [-b] [-s [HDP|BIGTOP|PHD]] [-d] [-c]
where
test: mvn test
server: install and run ambari-server
agent: install and run ambari-server and ambari-agent
deploy: install and run ambari-server and ambari-agent, and deploy a hadoop
-b option to rebuild ambari
-d option to start ambari-server with --debug option
-c option to clean local git repo. "git clean -xdf"

how to run unit test

cd dev-support/docker/docker
python -m bin.test.ambaribuild_test