The point is to get the Hadoop cluster with needed components, running as docker container at Kubernetes cluster.
Files: Dockerfile
ambari.repo
bp.json
map.json
start.sh
must be placed at accessible from hub.docker.com git repository.
1.1 Register at hub.docker.com and link your account to your git repository while creating Automated Build
Register at hub.docker.com and link account to github, Create Automated Build, setting git repo smaryn/hdpkub as a "Source Repository"
The build may take a while and should be finished successfully, you can always check the build status at Build Details tab
wget -c https://storage.googleapis.com/kubernetes-release/release/v1.1.8/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl
wget -c https://storage.googleapis.com/kubernetes-release/release/v1.1.8/bin/darwin/amd64/kubectl -O /usr/local/bin/kubectl
kubectl config set-cluster ubuntu --server=http://198.18.8.161:8080 --insecure-skip-tls-verify=true
kubectl config set-context ubuntu --cluster=ubuntu --user=ubuntu
kubectl config set-credentials ubuntu --username=admin --password=HAKlQaGHHmU6W0W
kubectl config use-context ubuntu
kubectl config view
kubectl get nodes
3.1 Create Kubernetes pod for Hadoop container(s) using hdp.yaml:
kubectl create -f kube/hdp.yaml
3.2 Create Kubernetes service for Hadoop using hdp-service.yaml
At this stage in the command output you should notice the TCP port which is assigned for Ambari server management:
kubectl create -f kube/hdp-service.yaml
kubectl logs hdpkub
Open web browser and type Kubernetes node IP address and TCP port noticed at 2.3 stage. Use default username and password (admin) to see how cluster is deployed.
kubectl delete -f kube/hdp-service.yaml
kubectl delete -f kube/hdp.yaml
List all containers:
docker ps -a
Delete unused containers by ID:
docker rm -f <ID1> <ID2> <...>
List all images:
docker images
Delete uneeded images by ID:
docker rmi -f <ID1> <ID2> <...>