forked from andypetrella/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Kubernetes Docker Spark ML
Chris Fregly edited this page Sep 27, 2016
·
28 revisions
https://www.docker.com/products/docker
- KUBERNETES_SERVER: IP Address of Container Cluster
- KUBERNETES_USERNAME: User of Container Cluster (ie. admin)
- KUBERNETES_PASSWORD: Password of Container Cluster
- KUBERNETES_NAMESPACE: Your Unique Namespace ID (ie. your username)
docker run -itd --name=kubernetes --privileged --net=host -e KUBERNETES_SERVER=[KUBERNETES_SERVER] -e KUBERNETES_NAMESPACE=[KUBERNETES_NAMESPACE] -e KUBERNETES_USERNAME=admin -e KUBERNETES_PASSWORD=[KUBERNETES_PASSWORD] fluxcapacitor/kubernetes
- Bash into Local Docker Container
docker exec -it kubernetes bash
kubectl create namespace $KUBERNETES_NAMESPACE
kubectl config set-context $KUBERNETES_NAMESPACE --user=demo --namespace=$KUBERNETES_NAMESPACE --cluster=demo
kubectl config use-context $KUBERNETES_NAMESPACE
kubectl config current-context
kubectl get nodes
kubectl cluster-info
kubectl get pod
kubectl get svc
https://[KUBERNETES-CLUSTER-IP]/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/#/workload
- Create Spark Master
git clone https://github.com/fluxcapacitor/master.ml.git
kubectl create -f master.ml/spark/2.0.1/master-spark-rc.yaml
- Verify Spark Master
kubectl get rc
kubectl get pod
- Check Logs of Spark Master
kubectl describe pod [POD-NAME]
kubectl logs -f [POD-NAME]
kubectl create -f master.ml/spark/2.0.1/master-spark-svc.yaml
kubectl get svc -w
http://[SPARK-MASTER-EXTERNAL-IP]:6060
- Clone the latest
worker.mlrepo
git clone https://github.com/fluxcapacitor/worker.ml.git
- Create Spark Worker
kubectl create -f worker.ml/spark/2.0.1/worker-spark-rc.yaml
- Verify Spark Worker
kubectl get rc
kubectl get pod
- Check Spark Worker Logs
kubectl describe pod [POD-NAME]
kubectl logs -f [POD-NAME]
kubectl scale --replicas=4 rc worker-spark-2-0-1
https://[KUBERNETES-CLUSTER-IP]/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/#/workload
- Perform the Rolling Update
kubectl rolling-update worker-spark-2-0-1 -f worker.ml/spark/2.0.1/worker-spark-rc-8.yaml
git clone https://github.com/fluxcapacitor/zeppelin.ml.git
kubectl create -f zeppelin.ml/zeppelin-rc.yaml
- Verify Zeppelin
kubectl get rc
kubectl get pod
- Check Logs of Zeppelin
kubectl logs -f [POD-NAME]
kubectl describe [POD-NAME]
kubectl create -f zeppelin.ml/zeppelin-svc.yaml
kubectl get svc -w
- Navigate Browser...
http://[ZEPPELIN-EXTERNAL-IP]:8080
- Change Interpreter's Spark Master URL (Upper right, Drop-down, Interpreter)
Change value to spark://[SPARK-MASTER-EXTERNAL-IP]:7077
- Run Example Notebooks!
Environment Setup
Demos
6. Serve Batch Recommendations
8. Streaming Probabilistic Algos
9. TensorFlow Image Classifier
Active Research (Unstable)
15. Kubernetes Docker Spark ML
Managing Environment
15. Stop and Start Environment