-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Spark Operator Blueprint update #359
Changes from 17 commits
b1318a4
9226a8c
bbdab83
7739b0c
ef76e52
d5daaf6
eae9f59
8430aea
6b7c5e9
ef32dfa
2b3628c
50bbaf9
c7677b4
1e4a7be
af99aeb
46ac20f
1c48b14
4ce70b4
51e7912
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,11 @@ kind: SparkApplication | |
metadata: | ||
name: tpcds-benchmark-3tb | ||
namespace: spark-team-a | ||
labels: | ||
app: "tpcds-benchmark" | ||
applicationId: "tpcds-benchmark-3t" | ||
# Assign the job to a Yunikorn Queue via label. | ||
queue: root.prod | ||
spec: | ||
type: Scala | ||
mode: cluster | ||
|
@@ -65,52 +70,32 @@ spec: | |
spark.kubernetes.driver.requestTimeout: "120000" | ||
# spark.kubernetes.allocation.batch.size: "20" # default 5 but adjust according to your cluster size | ||
# ----------------------------------------------------- | ||
volumes: | ||
- name: spark-local-dir-1 | ||
hostPath: | ||
path: /local1 | ||
driver: | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permission | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: ['sh', '-c', 'mkdir /ossdata1; chown -R 1000:1000 /ossdata1'] | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
cores: 4 | ||
Comment on lines
-68
to
74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add a comment stating that the NVMe SSD disks provided with c5d instances are automatically formatted and mounted by Karpenter, and subsequently integrated into the node as the primary storage volume. Therefore, it is unnecessary to employ hostPath in Spark jobs for mounting this volume to pods. Instead, Spark pods can effortlessly utilize the local NVMe SSD through the use of emptyDir(). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment block in the Karpenter Provisioner and Userdata in main.tf around NVMe and the volumes. Then added a callout on each of the pods around the node selectors. |
||
coreLimit: "4.1" | ||
memory: "5g" | ||
memoryOverhead: "1000" | ||
serviceAccount: spark-team-a | ||
# the c5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
provisioner: spark-compute-optimized | ||
tolerations: | ||
- key: "spark-compute-optimized" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
executor: | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permission | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: ['sh', '-c', 'mkdir /ossdata1; chown -R 1000:1000 /ossdata1'] | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
cores: 4 | ||
coreLimit: "4.3" | ||
memory: "6g" | ||
memoryOverhead: "2g" | ||
# 8 executors per node | ||
instances: 47 # changed from 47 to 20 for demo | ||
serviceAccount: spark-team-a | ||
# the c5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
provisioner: spark-compute-optimized | ||
tolerations: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ kind: SparkApplication | |
metadata: | ||
name: tpcds-data-generation-3t | ||
namespace: spark-team-a | ||
labels: | ||
app: "tpcds-data-generation" | ||
applicationId: "tpcds-data-generation-3t" | ||
# Assign the job to a Yunikorn Queue via label. | ||
queue: root.prod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
spec: | ||
type: Scala | ||
mode: cluster | ||
|
@@ -64,50 +69,30 @@ spec: | |
|
||
restartPolicy: | ||
type: Never | ||
volumes: | ||
- name: spark-local-dir-1 | ||
hostPath: | ||
path: /local1 | ||
driver: | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permission | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: ['sh', '-c', 'mkdir /ossdata1; chown -R 1000:1000 /ossdata1'] | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
Comment on lines
-67
to
-82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add a comment stating that the NVMe SSD disks provided with c5d instances are automatically formatted and mounted by Karpenter, and subsequently integrated into the node as the primary storage volume. Therefore, it is unnecessary to employ hostPath in Spark jobs for mounting this volume to pods. Instead, Spark pods can effortlessly utilize the local NVMe SSD through the use of emptyDir(). |
||
cores: 10 | ||
coreLimit: "10.1" | ||
memory: "10g" | ||
serviceAccount: spark-team-a | ||
# the c5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
provisioner: spark-compute-optimized | ||
tolerations: | ||
- key: "spark-compute-optimized" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
executor: | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permission | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: ['sh', '-c', 'mkdir /ossdata1; chown -R 1000:1000 /ossdata1'] | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /ossdata1 | ||
cores: 11 | ||
coreLimit: "11.1" | ||
memory: "15g" | ||
# 3 executors per node 9 nodes | ||
instances: 26 | ||
serviceAccount: spark-team-a | ||
# the c5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# the data generation can utilize a large amount of storage | ||
nodeSelector: | ||
provisioner: spark-compute-optimized | ||
tolerations: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,51 +79,24 @@ spec: | |
onFailureRetryInterval: 10 | ||
onSubmissionFailureRetries: 5 | ||
onSubmissionFailureRetryInterval: 20 | ||
volumes: # using NVMe instance storage mounted on /local1 | ||
- name: spark-local-dir-1 | ||
hostPath: | ||
path: /local1 | ||
type: Directory | ||
|
||
driver: | ||
volumeMounts: # Points to InstanceStore 150GB NVMe SSD for shuffle spill over from memory | ||
- name: spark-local-dir-1 | ||
mountPath: /data1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permissions | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: [ 'sh', '-c', 'chown -R 185 /local1' ] | ||
volumeMounts: | ||
- mountPath: "/local1" | ||
name: "spark-local-dir-1" | ||
Comment on lines
-82
to
-99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add a comment stating that the NVMe SSD disks provided with c5d instances are automatically formatted and mounted by Karpenter, and subsequently integrated into the node as the primary storage volume. Therefore, it is unnecessary to employ hostPath in Spark jobs for mounting this volume to pods. Instead, Spark pods can effortlessly utilize the local NVMe SSD through the use of emptyDir(). |
||
cores: 1 | ||
coreLimit: "1200m" | ||
memory: "4g" | ||
memoryOverhead: "4g" | ||
serviceAccount: spark-team-a | ||
labels: | ||
version: 3.2.1 | ||
# the r5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
NodeGroupType: "spark-on-demand-ca" | ||
tolerations: | ||
- key: "spark-on-demand-ca" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
executor: | ||
podSecurityContext: | ||
fsGroup: 185 | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /data1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permissions | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: [ 'sh', '-c', 'chown -R 185 /local1' ] | ||
volumeMounts: | ||
- mountPath: "/local1" | ||
name: "spark-local-dir-1" | ||
cores: 1 | ||
coreLimit: "1200m" | ||
instances: 4 | ||
|
@@ -132,6 +105,9 @@ spec: | |
serviceAccount: spark-team-a | ||
labels: | ||
version: 3.2.1 | ||
# the r5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
NodeGroupType: "spark-spot-ca" | ||
tolerations: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ metadata: | |
labels: | ||
app: "taxi-trip" | ||
applicationId: "taxi-trip-yunikorn" | ||
# Assign the job to a Yunikorn Queue via label. | ||
queue: root.test | ||
spec: | ||
# To create Ingress object for Spark driver. | ||
|
@@ -79,24 +80,7 @@ spec: | |
onFailureRetryInterval: 10 | ||
onSubmissionFailureRetries: 5 | ||
onSubmissionFailureRetryInterval: 20 | ||
volumes: # using NVMe instance storage mounted on /local1 | ||
- name: spark-local-dir-1 | ||
hostPath: | ||
path: /local1 | ||
type: Directory | ||
|
||
driver: | ||
volumeMounts: # Points to InstanceStore 150GB NVMe SSD for shuffle spill over from memory | ||
- name: spark-local-dir-1 | ||
mountPath: /data1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permissions | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: [ 'sh', '-c', 'chown -R 185 /local1' ] | ||
volumeMounts: | ||
- mountPath: "/local1" | ||
name: "spark-local-dir-1" | ||
Comment on lines
-82
to
-99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can add a comment stating that the NVMe SSD disks provided with c5d instances are automatically formatted and mounted by Karpenter/CA, and subsequently integrated into the node as the primary storage volume. Therefore, it is unnecessary to employ hostPath in Spark jobs for mounting this volume to pods. Instead, Spark pods can effortlessly utilize the local NVMe SSD through the use of emptyDir(). |
||
cores: 1 | ||
coreLimit: "1200m" | ||
memory: "4g" | ||
|
@@ -134,26 +118,16 @@ spec: | |
}, | ||
"tolerations": [{"key": "spark-spot-ca", "operator": "Exists", "effect": "NoSchedule"}] | ||
}] | ||
# the r5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
NodeGroupType: "spark-on-demand-ca" | ||
tolerations: | ||
- key: "spark-on-demand-ca" | ||
operator: "Exists" | ||
effect: "NoSchedule" | ||
executor: | ||
podSecurityContext: | ||
fsGroup: 185 | ||
volumeMounts: | ||
- name: spark-local-dir-1 | ||
mountPath: /data1 | ||
readOnly: false | ||
initContainers: | ||
- name: volume-permissions | ||
image: public.ecr.aws/y4g4v0z7/busybox | ||
command: [ 'sh', '-c', 'chown -R 185 /local1' ] | ||
volumeMounts: | ||
- mountPath: "/local1" | ||
name: "spark-local-dir-1" | ||
cores: 1 | ||
coreLimit: "1200m" | ||
instances: 4 | ||
|
@@ -164,6 +138,9 @@ spec: | |
version: 3.2.1 | ||
annotations: | ||
yunikorn.apache.org/task-group-name: "spark-executor" | ||
# the r5d instances that Karpenter will launch will have the NVMe storage preformatted and available to the pod | ||
# we do not need to leverage a hostPath mount or volume to leverage that storage. | ||
# ephemeral-storage requests and limits can be used to manage the storage utilization | ||
nodeSelector: | ||
NodeGroupType: "spark-spot-ca" | ||
tolerations: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment here saying "YuniKorn Queue"