-
-
Save jazzwang/c5d63460714d76823f89 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 + CDH 5.2 Docker instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
new) | |
echo "[INFO] Creating new CDH5 docker instances ..." | |
docker create -it --name CDH5 -h cdh5.etu.im -v ${PWD}:/vagrant caioquirino/docker-cloudera-quickstart /usr/bin/cdh_startup_script.sh | |
;; | |
start) | |
echo "[INFO] Starting CDH5 docker instances ..." | |
docker start CDH5 | |
;; | |
login) | |
docker exec -it CDH5 /bin/bash | |
;; | |
stop) | |
echo "[INFO] Stoping CDH5 docker instances ..." | |
docker stop CDH5 | |
;; | |
status) | |
docker ps -a | grep "CDH5 " | |
IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' CDH5) | |
echo "Please visit http://${IP}:8888 for Hue User Interface" | |
;; | |
log) | |
docker logs CDH5 | |
;; | |
rm) | |
echo "[INFO] Removing CDH5 docker instances ..." | |
docker rm CDH5 | |
;; | |
*) | |
echo "Usage: $0 [ new | start | login | stop | status | log | rm ]" | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment