Guest User

Untitled

a guest
Feb 25th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. # Manual creation
  2.  
  3. ## Creation of the docker images
  4.  
  5. ```bash
  6. eval (minikube docker-env) # Use VM built-in docker daemon
  7.  
  8. # Creation of spark base
  9. cd spark-2.2.0-k8s-0.5.0-bin-2.7.3
  10. docker build . -f Dockerfile -t spark-history:v1 # Build docker image for spark base
  11.  
  12. # Creation of spark history
  13. cd dockerfiles/history-service
  14. docker build . -f Dockerfile -t spark-history:v1 # Build docker image spark history derived from base
  15. ```
  16.  
  17. ## Running the produced history server image (with no localstorage)
  18.  
  19. ```bash
  20. kubectl run spark-history --image=spark-history:v1 --port=18080
  21. kubectl expose deployment spark-history --type=LoadBalancer
  22. ```
  23.  
  24. ## Access exposed history server
  25.  
  26. ```bash
  27. minikube service spark-history
  28. ```
  29.  
  30. # Automatic creation through deployment
  31.  
  32. ## Open points
  33.  
  34. - How to share read/write enabled storage between pods (they may run in different nodes)
  35. - Storage as a service with multiple simulteanous write access (ok each spark-submit writes to a
  36. different file)
  37. - Storage as a platform ceph ...
  38.  
  39. - For minikube hostPath might be enough since anyway we have only one node
  40. but this needs to be covered by the k8s Spark implement (request for hostpah typed storage in
  41. the API call ?)
  42. ```bash
  43. --conf spark.eventLog.enabled true \
  44. --conf spark.eventLog.dir file:///tmp/spark-events/
  45. ```
  46.  
  47. ## YAML Configuration
  48. ```yaml
  49. #
  50. # Creation of a spark server deployment for historization of Spark logs
  51. #
  52.  
  53. apiVersion: apps/v1
  54. kind: Deployment
  55. metadata:
  56. labels:
  57. name: spark-history
  58. spark-version: 2.2.0
  59. name: spark-history-deployment
  60. spec:
  61. selector:
  62. matchLabels:
  63. app: spark-history
  64. spark-version: 2.2.0
  65. template:
  66. metadata:
  67. labels:
  68. app: spark-history
  69. spark-version: 2.2.0
  70. spec:
  71. volumes:
  72. - name: temp-volume
  73. hostPath:
  74. path: '/tmp/spark-events'
  75. containers:
  76. - name: spark-history
  77. image: spark-history:v1
  78. imagePullPolicy: IfNotPresent
  79. ports:
  80. - containerPort: 18080
  81. volumeMounts:
  82. - mountPath: '/tmp/spark-events'
  83. name: temp-volume
  84. resources:
  85. requests:
  86. cpu: "1"
  87. limits:
  88. cpu: "1"
  89.  
  90. ```
  91.  
  92. # Shuffle service
  93.  
  94. ## Automatic deployment
  95.  
  96. ```bash
  97. kubectl create -f Downloads/spark-2.2.0-k8s-0.5.0-bin-2.7.3/conf/kubernetes-shuffle-service.yaml
  98. ```
Add Comment
Please, Sign In to add comment