##Start Docker
docker-kill-last
dpsa
docker run -d -h server.ambari.com --dns 127.0.0.1 --name ambari sequenceiq/ambari
-d damon (background)
-h hostname
--dns get the DNS from the host
--name name
##Get the IP address
docker inspect -f "{{.NetworkSettings.IPAddress}}" $(docker ps -lq)
get the IP address (groovy)
docker inspect $(docker ps -ql)|grep IPA
###Check routing
sudo route add -net 172.21.0.0/16 192.168.59.103
netstat -nr
###Check Ambari
curl -u admin:admin 172.17.0.2:8080/api/v1/clusters, hosts, blueprints
###Start Ambari shell
java -jar ~/prj/ambari-shell/target/ambari-shell-1.0-SNAPSHOT.jar --ambari.host=172.17.0.2
###Shell commands
hello
blueprint list
blueprint defaults
blueprint list
blueprint show --id single-node-hdfs-yarn
cluster build --blueprint single-node-hdfs-yarn
cluster preview
cluster assign --hostGroup host_group_1 --host server.ambari.com
cluster preview
cluster create
tasks
###Run a script
script --file ./single.ash