-
Notifications
You must be signed in to change notification settings - Fork 822
[History Server] Poll Serve, placement group, and Ray Data endpoints by default #5093
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
54251e8
34e5a50
29d5088
df8f4bf
16f6b8a
bff31de
010acca
17626bc
697ed1c
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 |
|---|---|---|
| @@ -0,0 +1,126 @@ | ||
| apiVersion: ray.io/v1 | ||
| kind: RayJob | ||
| metadata: | ||
| name: rayjob-ray-data | ||
| spec: | ||
| # Self-contained: this RayJob brings up its own cluster instead of attaching to an | ||
| # existing one via clusterSelector, so it also exercises the collector's shutdown path. | ||
| shutdownAfterJobFinishes: true | ||
| # Keeps the cluster alive long enough for at least one polling cycle after the job | ||
| # succeeds. Without it the cluster is deleted immediately and the datasets would only | ||
| # be captured by the collector's best-effort final poll during shutdown. | ||
| ttlSecondsAfterFinished: 30 | ||
| entrypoint: | | ||
| python -c " | ||
| import ray | ||
| ray.init() | ||
|
|
||
| # materialize() is required: an unexecuted Dataset produces no stats, so | ||
| # /api/data/datasets/{job_id} would stay empty. | ||
| ds = ray.data.range(100).map_batches(lambda batch: batch).materialize() | ||
| print(f'Dataset rows: {ds.count()}') | ||
| " | ||
| rayClusterSpec: | ||
| # Head-only on purpose: worker collectors need the head Service FQDN in FQ_RAY_IP, | ||
| # which cannot be written here because KubeRay generates the cluster name. | ||
| headGroupSpec: | ||
| rayStartParams: | ||
| dashboard-host: 0.0.0.0 | ||
| serviceType: ClusterIP | ||
| template: | ||
| spec: | ||
| containers: | ||
| - env: | ||
| - name: RAY_TMP_ROOT | ||
| value: &rayTmpRoot /tmp/ray | ||
| - name: RAY_enable_ray_event | ||
| value: "true" | ||
| - name: RAY_enable_core_worker_ray_event_to_aggregator | ||
| value: "true" | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR | ||
| value: "http://localhost:8084/v1/events" | ||
| # in ray 2.52.0, we need to set RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES | ||
| # in ray 2.53.0 (noy yet done). we need to set RAY_DASHBOARD_AGGREGATOR_AGENT_PUBLISHER_HTTP_ENDPOINT_EXPOSABLE_EVENT_TYPES | ||
| - name: RAY_DASHBOARD_AGGREGATOR_AGENT_EXPOSABLE_EVENT_TYPES | ||
| value: "TASK_DEFINITION_EVENT,TASK_LIFECYCLE_EVENT,ACTOR_TASK_DEFINITION_EVENT, | ||
| TASK_PROFILE_EVENT,DRIVER_JOB_DEFINITION_EVENT,DRIVER_JOB_LIFECYCLE_EVENT, | ||
| ACTOR_DEFINITION_EVENT,ACTOR_LIFECYCLE_EVENT,NODE_DEFINITION_EVENT,NODE_LIFECYCLE_EVENT" | ||
|
Comment on lines
+40
to
+42
Collaborator
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. Let's update the ray image version to 2.56.0 and use "ALL" here |
||
| image: rayproject/ray:2.52.0 | ||
| imagePullPolicy: IfNotPresent | ||
| name: ray-head | ||
| securityContext: | ||
| allowPrivilegeEscalation: true | ||
| privileged: true | ||
| resources: | ||
| limits: | ||
| cpu: "5" | ||
| memory: 10G | ||
| requests: | ||
| cpu: "50m" | ||
| memory: 1G | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| - name: collector | ||
| image: collector:v0.1.0 | ||
| imagePullPolicy: IfNotPresent | ||
| env: | ||
| - name: POD_IP | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: status.podIP | ||
| # KubeRay generates the cluster name, so these are read back from the labels | ||
| # it stamps on the pod rather than hardcoded. | ||
| - name: RAY_CLUSTER_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.labels['ray.io/cluster'] | ||
| - name: RAY_CLUSTER_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| # Hardcoded, unlike the cluster name: KubeRay puts ray.io/originated-from-* | ||
| # on the RayCluster but not on the pod, so the downward API cannot read them. | ||
| # Must match metadata.name above. | ||
| - name: OWNER_KIND | ||
| value: "RayJob" | ||
| - name: OWNER_NAME | ||
| value: "rayjob-ray-data" | ||
| # Only used to look up this pod's Ray NodeID, and the dashboard is in this | ||
| # same pod. A worker collector would need the head Service FQDN instead. | ||
| - name: FQ_RAY_IP | ||
| value: "localhost" | ||
| - name: RAY_TMP_ROOT | ||
| value: *rayTmpRoot | ||
| # Shorter than the 30s default so a full cycle fits inside | ||
| # ttlSecondsAfterFinished above. | ||
| - name: RAY_COLLECTOR_POLL_INTERVAL | ||
| value: "5s" | ||
| - name: S3DISABLE_SSL | ||
| value: "true" | ||
| - name: AWS_ACCESS_KEY_ID | ||
| value: minioadmin | ||
| - name: AWS_SECRET_ACCESS_KEY | ||
| value: minioadmin | ||
| - name: AWS_SESSION_TOKEN | ||
| value: "" | ||
| - name: S3_BUCKET | ||
| value: "ray-historyserver" | ||
| - name: S3_ENDPOINT | ||
| value: "minio-service.minio-dev:9000" | ||
| - name: S3_REGION | ||
| value: "test" | ||
| - name: S3FORCE_PATH_STYLE | ||
| value: "true" | ||
| command: | ||
| - collector | ||
| - --role=Head | ||
| - --runtime-class-name=s3 | ||
| - --ray-root-dir=log | ||
| - --events-port=8084 | ||
| volumeMounts: | ||
| - name: historyserver | ||
| mountPath: *rayTmpRoot | ||
| volumes: | ||
| - name: historyserver | ||
| emptyDir: {} | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -60,6 +60,22 @@ spec: | |||
| value: raycluster-historyserver-head-svc.default.svc.cluster.local | ||||
| - name: RAY_TMP_ROOT | ||||
| value: *rayTmpRoot | ||||
| # RAY_DASHBOARD_ADDRESS points the head collector at the Ray Dashboard in the same | ||||
| # pod. Optional; defaults to http://localhost:8265. Uncomment only if the dashboard | ||||
| # listens on a non-default port. Worker collectors do not use it. | ||||
| # - name: RAY_DASHBOARD_ADDRESS | ||||
| # value: "http://localhost:9265" | ||||
| # RAY_COLLECTOR_POLL_INTERVAL sets how often the head collector polls the Ray | ||||
| # Dashboard endpoints. Optional; defaults to 30s. Accepts Go duration format. | ||||
| # - name: RAY_COLLECTOR_POLL_INTERVAL | ||||
| # value: "1m" | ||||
| # The head collector always polls its built-in endpoints (Serve applications, | ||||
| # placement groups, and per-job Ray Data datasets). RAY_COLLECTOR_ADDITIONAL_ENDPOINTS | ||||
| # is optional and adds more on top; uncomment to use it. Each comma-separated path | ||||
| # must match what the dashboard frontend requests, query string included, because | ||||
| # the storage key is derived from the request URI. | ||||
| # - name: RAY_COLLECTOR_ADDITIONAL_ENDPOINTS | ||||
| # value: "/nodes?view=summary" | ||||
|
Comment on lines
+69
to
+72
Member
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. I'm curious why the sample value is
|
||||
| # reference: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite#connect-to-the-emulator-by-using-the-azure-storage-explorer | ||||
| - name: AZURE_STORAGE_CONNECTION_STRING | ||||
| value: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite-service.azurite-dev.svc.cluster.local:10000/devstoreaccount1;" | ||||
|
|
||||
Uh oh!
There was an error while loading. Please reload this page.