Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 7 additions & 6 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}"
image: ${HISTORY_SERVER_IMAGE}
- name: STORAGE_BACKEND
value: "gcs"
- name: RAY_ROOT_DIR
value: "root"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think "root" will work either? Is RAY_ROOT_DIR referring to Ray's root directory or the root directory used in storage? If it's storage, this variable name is confusing.

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.

It's referring to the root directory in storage. So maybe STORAGE_ROOT_DIR instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah I would rename to STORAGE_ROOT_DIR. Also when it's empty it should just use the specified bucket's root dir

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@chiayi please fix this in a fast follow-up

image: historyserver:v0.1.0
imagePullPolicy: IfNotPresent
command:
- historyserver
- --runtime-class-name=gcs
- --ray-root-dir=log
ports:
- containerPort: 8080
resources:
Expand Down
13 changes: 4 additions & 9 deletions historyserver/config/historyserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,12 @@ 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.
# - --use-auth-token-mode=true
Comment thread
machichima marked this conversation as resolved.
ports:
- containerPort: 8080
resources:
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
177 changes: 0 additions & 177 deletions historyserver/config/raycluster-gcs.yaml

This file was deleted.

Loading
Loading