-
Notifications
You must be signed in to change notification settings - Fork 83
/
spark-metrics-template.yaml
133 lines (128 loc) · 3.04 KB
/
spark-metrics-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
kind: Template
apiVersion: v1
template: spark
metadata:
name: spark
objects:
- kind: Service
apiVersion: v1
metadata:
name: ${MASTER_NAME}-${SPARK_METRICS_ON}
labels:
name: ${MASTER_NAME}
spec:
ports:
- protocol: TCP
port: 7777
targetPort: 7777
selector:
name: ${MASTER_NAME}
- kind: Service
apiVersion: v1
metadata:
name: ${MASTER_NAME}
labels:
name: ${MASTER_NAME}
spec:
ports:
- protocol: TCP
port: 7077
targetPort: 7077
selector:
name: ${MASTER_NAME}
- kind: Service
apiVersion: v1
metadata:
name: ${MASTER_NAME}-webui
labels:
name: ${MASTER_NAME}
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
name: ${MASTER_NAME}
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: ${MASTER_NAME}
spec:
strategy:
type: Rolling
triggers:
- type: ConfigChange
replicas: 1
selector:
name: ${MASTER_NAME}
template:
metadata:
labels:
name: ${MASTER_NAME}
spec:
containers:
- name: ${MASTER_NAME}
image: ${SPARK_IMAGE}
env:
- name: SPARK_MASTER_PORT
value: "7077"
- name: SPARK_MASTER_WEBUI_PORT
value: "8080"
- name: SPARK_METRICS_ON
value: ${SPARK_METRICS_ON}
- name: SPARK_USER
value: admin
ports:
- containerPort: 7077
protocol: TCP
- containerPort: 7777
protocol: TCP
- containerPort: 8080
protocol: TCP
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: ${WORKER_NAME}
spec:
strategy:
type: Rolling
triggers:
- type: ConfigChange
replicas: 3
selector:
name: ${WORKER_NAME}
template:
metadata:
labels:
name: ${WORKER_NAME}
spec:
containers:
- name: ${WORKER_NAME}
image: ${SPARK_IMAGE}
env:
- name: SPARK_METRICS_ON
value: ${SPARK_METRICS_ON}
- name: SPARK_MASTER_ADDRESS
value: spark://${MASTER_NAME}:7077
- name: SPARK_MASTER_UI_ADDRESS
value: http://${MASTER_NAME}-webui:8080
- name: SPARK_USER
value: admin
parameters:
- name: SPARK_IMAGE
description: Name of the Spark master/worker image
value: radanalyticsio/openshift-spark:2.2-latest
- name: MASTER_NAME
description: Master name used as a service name and a selector
generate: expression
from: "spark-master-[a-z0-9]{4}"
required: true
- name: WORKER_NAME
description: Worker name used as a selector
generate: expression
from: "spark-worker-[a-z0-9]{4}"
required: true
- name: SPARK_METRICS_ON
description: Enable metrics services. The default value is "jolokia" (deprecated), consider setting to "prometheus" instead.
value: "jolokia"
required: true