Skip to content
Open
2 changes: 1 addition & 1 deletion historyserver/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Install Ray locally. Make sure to use at least Ray `v2.55`.

```bash
pip uninstall -y ray
pip install -U "ray[default]==2.55.0"
pip install -U "ray[default]==2.56.0"
```

Run the `ray start` command:
Expand Down
4 changes: 2 additions & 2 deletions historyserver/cmd/collector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func main() {
rayClusterNamespace := ""
rayRootDir := ""
logBatching := 1000
eventsPort := 8080
eventsPort := 8084
pushInterval := time.Minute
ownerKind := ""
ownerName := ""
Expand All @@ -53,7 +53,7 @@ func main() {
flag.StringVar(&rayClusterNamespace, "ray-cluster-namespace", "default", "")
flag.StringVar(&rayRootDir, "ray-root-dir", "", "")
flag.IntVar(&logBatching, "log-batching", 1000, "")
flag.IntVar(&eventsPort, "events-port", 8080, "")
flag.IntVar(&eventsPort, "events-port", 8084, "")
flag.StringVar(&runtimeClassConfigPath, "runtime-class-config-path", "", "")
flag.DurationVar(&pushInterval, "push-interval", time.Minute, "")
flag.StringVar(&ownerKind, "owner-kind", "", "")
Expand Down
4 changes: 4 additions & 0 deletions historyserver/cmd/historyserver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ func main() {
}
runtimeClassName = strings.ToLower(runtimeClassName)

if val := os.Getenv("RAY_ROOT_DIR"); val != "" {
rayRootDir = val
}

if qps <= 0 {
logrus.Fatalf("--kube-api-qps must be > 0, got %v", qps)
}
Expand Down
11 changes: 6 additions & 5 deletions historyserver/config/historyserver-gcs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Ensure that the env var GCS_BUCKET is set before applying
# Apply with envsubst to substitute environment variables:
# envsubst < historyserver/config/historyserver-gcs.yaml | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -37,12 +38,12 @@ spec:
env:
- name: GCS_BUCKET
value: "${GCS_BUCKET}"
- name: STORAGE_BACKEND
value: "gcs"
- name: RAY_ROOT_DIR
value: "storage-root"
image: ${HISTORY_SERVER_IMAGE}
imagePullPolicy: IfNotPresent
command:
- historyserver
- --runtime-class-name=gcs
- --ray-root-dir=log
ports:
- containerPort: 8080
resources:
Expand Down
10 changes: 6 additions & 4 deletions historyserver/config/historyserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@ spec:
value: "test"
- name: S3FORCE_PATH_STYLE
value: "true"
- name: STORAGE_BACKEND
value: "s3"
- name: RAY_ROOT_DIR
value: "log"
image: historyserver:v0.1.0
imagePullPolicy: IfNotPresent
command:
- historyserver
- --runtime-class-name=s3
- --ray-root-dir=log
# Enable proxying to live RayClusters with token authentication enabled.
# The history server reads the auth Secret and forwards requests with the
# appropriate authorization header. Requires the RBAC in
# service_account_auth_token_mode.yaml.
# command:
# - historyserver
# - --use-auth-token-mode=true
ports:
- containerPort: 8080
Expand Down
46 changes: 34 additions & 12 deletions historyserver/config/raycluster-azureblob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ spec:
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR
value: "http://localhost:8084/v1/events"
- 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"
image: rayproject/ray:2.52.0
value: "ALL"
image: rayproject/ray:2.56.0
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
Expand All @@ -52,20 +50,33 @@ spec:
image: collector:v0.1.0
imagePullPolicy: IfNotPresent

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use nightly, I think we need to set imagePullPolicy: Always, otherwise it will never pull the newest image. Also for other files.
Actually I think we can come back and update this after release to pin the specific version

env:
- name: RAY_CLUSTER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.labels['ray.io/cluster']
- name: RAY_CLUSTER_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FQ_RAY_IP
value: raycluster-historyserver-head-svc.default.svc.cluster.local
value: $(RAY_CLUSTER_NAME)-head-svc.$(RAY_CLUSTER_NAMESPACE).svc.cluster.local
- name: RAY_TMP_ROOT
value: *rayTmpRoot
- name: RAY_ROLE
value: "Head"
- name: STORAGE_BACKEND
value: "azureblob"
- name: RAY_ROOT_DIR
value: "log"
# 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;"
- name: AZURE_STORAGE_CONTAINER
value: ray-historyserver
command: [collector, --role=Head, --runtime-class-name=azureblob, --ray-cluster-name=raycluster-historyserver, --ray-root-dir=log, --events-port=8084]
volumeMounts:
- name: historyserver
mountPath: *rayTmpRoot
Expand Down Expand Up @@ -100,10 +111,8 @@ spec:
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR
value: "http://localhost:8084/v1/events"
- 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"
image: rayproject/ray:2.52.0
value: "ALL"
image: rayproject/ray:2.56.0
imagePullPolicy: IfNotPresent
name: ray-worker
securityContext:
Expand All @@ -123,20 +132,33 @@ spec:
image: collector:v0.1.0
imagePullPolicy: IfNotPresent
env:
- name: RAY_CLUSTER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.labels['ray.io/cluster']
- name: RAY_CLUSTER_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FQ_RAY_IP
value: raycluster-historyserver-head-svc.default.svc.cluster.local
value: $(RAY_CLUSTER_NAME)-head-svc.$(RAY_CLUSTER_NAMESPACE).svc.cluster.local
- name: RAY_TMP_ROOT
value: *rayTmpRoot
- name: RAY_ROLE
value: "Worker"
- name: STORAGE_BACKEND
value: "azureblob"
- name: RAY_ROOT_DIR
value: "log"
# 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;"
- name: AZURE_STORAGE_CONTAINER
value: ray-historyserver
command: [collector, --role=Worker, --runtime-class-name=azureblob, --ray-cluster-name=raycluster-historyserver, --ray-root-dir=log, --events-port=8084]
volumeMounts:
- name: historyserver
mountPath: *rayTmpRoot
Expand Down
68 changes: 44 additions & 24 deletions historyserver/config/raycluster-gcs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Apply with envsubst to substitute environment variables:
# envsubst < historyserver/config/raycluster-gcs.yaml | kubectl apply -f -
apiVersion: ray.io/v1
kind: RayCluster
metadata:
Expand Down Expand Up @@ -30,10 +32,10 @@ spec:
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR
value: "http://localhost:8084/v1/events"
- 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"
image: rayproject/ray:2.52.0
value: "ALL"
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_PUBLISHER_HTTP_ENDPOINT_EXPOSABLE_EVENT_TYPES
value: "ALL"
image: rayproject/ray:2.56.0
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
Expand All @@ -53,12 +55,20 @@ spec:
image: ${COLLECTOR_IMAGE}
Comment thread
chiayi marked this conversation as resolved.
imagePullPolicy: IfNotPresent
env:
- name: RAY_CLUSTER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.labels['ray.io/cluster']
- name: RAY_CLUSTER_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FQ_RAY_IP
value: raycluster-historyserver-head-svc.default.svc.cluster.local
value: $(RAY_CLUSTER_NAME)-head-svc.$(RAY_CLUSTER_NAMESPACE).svc.cluster.local
- name: RAY_TMP_ROOT
value: *rayTmpRoot
- name: GCS_BUCKET
Expand All @@ -84,13 +94,14 @@ spec:
# endpoints above. Accepts Go duration format (e.g., "30s", "1m", "5m").
- name: RAY_COLLECTOR_POLL_INTERVAL
value: "30s"
command:
- collector
- --role=Head
- --runtime-class-name=gcs
- --ray-cluster-name=${RAY_CLUSTER}
- --ray-root-dir=log
- --events-port=8084
- name: RAY_ROLE
value: "Head"
- name: STORAGE_BACKEND
value: "gcs"
- name: RAY_ROOT_DIR
value: "storage-root"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's mismatch in ray root dir. Here we use storage-root but in other places (e.g. historyserver/config/raycluster-azureblob.yaml) we use log

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The log is actually hard coded in the e2e tests for azure and s3 and did not want to add to this PR even more. And I updated the raycluster-gcs because it is used in the ray doc/guide and did not want to cause confusion when users view them.

What we could do is when we open a RAY_ROOT_DIR fast followup change to STORAGE_ROOT_DIR, we can also make the changes to the e2e test as well? So no change here for the time being to avoid confusion.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SG

- name: EVENTS_PORT
value: "8084"
volumeMounts:
- name: historyserver
mountPath: *rayTmpRoot
Expand Down Expand Up @@ -125,10 +136,10 @@ spec:
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_EVENTS_EXPORT_ADDR
value: "http://localhost:8084/v1/events"
- 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"
image: rayproject/ray:2.52.0
value: "ALL"
- name: RAY_DASHBOARD_AGGREGATOR_AGENT_PUBLISHER_HTTP_ENDPOINT_EXPOSABLE_EVENT_TYPES
value: "ALL"
image: rayproject/ray:2.56.0
imagePullPolicy: IfNotPresent
name: ray-worker
securityContext:
Expand All @@ -148,23 +159,32 @@ spec:
image: ${COLLECTOR_IMAGE}
imagePullPolicy: IfNotPresent
env:
- name: RAY_CLUSTER_NAME
valueFrom:
fieldRef:
fieldPath: metadata.labels['ray.io/cluster']
- name: RAY_CLUSTER_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FQ_RAY_IP
value: raycluster-historyserver-head-svc.default.svc.cluster.local
value: $(RAY_CLUSTER_NAME)-head-svc.$(RAY_CLUSTER_NAMESPACE).svc.cluster.local
- name: RAY_TMP_ROOT
value: *rayTmpRoot
- name: GCS_BUCKET
value: "${GCS_BUCKET}"
command:
- collector
- --role=Worker
- --runtime-class-name=gcs
- --ray-cluster-name=${RAY_CLUSTER}
- --ray-root-dir=log
- --events-port=8084
- name: RAY_ROLE
value: "Worker"
- name: STORAGE_BACKEND
value: "gcs"
- name: RAY_ROOT_DIR
value: "storage-root"
- name: EVENTS_PORT
value: "8084"
volumeMounts:
- name: historyserver
mountPath: *rayTmpRoot
Expand Down
Loading
Loading