Skip to content

Instantly share code, notes, and snippets.

@ravindranathakila
Last active February 6, 2017 06:31
Show Gist options
  • Save ravindranathakila/a6d4a93d0620fb7f625668b57ee368df to your computer and use it in GitHub Desktop.
Save ravindranathakila/a6d4a93d0620fb7f625668b57ee368df to your computer and use it in GitHub Desktop.
# Runs Cloudera Quick Start image with commonly used Web UI ports. Perquisites: Cloudera Quickstart Image already pulled as cloudera
#!/usr/bin/env bash
_usage(){
grep "^[^_].\+(){$" $0 | while read line; do
local cmd=$(echo "$line" | sed "s/(){//g")
local info=$(grep -C0 -A0 -B1 "$cmd(){" $0 | sed "N;s/\n.*//g" )
printf " $0 %-20s %-40s\n" "$cmd" "$info" | grep "#"
done; echo "";
}
# Runs Cloudera Quick Start image with commonly used Web UI ports. Perquisites: Cloudera Quickstart Image already pulled as cloudera
run(){
docker run --hostname=quickstart.cloudera --privileged=true -t -p 8888:8888 -p 80:80 -p 7180:7180 -p 18080:18080 -p 18081:18081 -p 50111:50111 -p 19890:19890 -p 19888:19888 -p 8044:8044 -p 8042:8042 -p 8090:8090 -p 8088:8088 -p 11000:11000 -p 11443:11443 -p 11001:11001 --name cloudera cloudera/quickstart /usr/bin/docker-quickstart
}
# run arguments as commands if any, or show Usage
"$@"
if [ ${#1} == 0 ]; then echo "$CMDS" | echo "Usage: "; _usage; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment