Prep K8s operator for the Ray 1.11.0 release. (#22264)

For consistency and safety, we fix an explicit 6379 port for all default and example configs for Ray on K8s.
Documentation is updated to recommend matching Ray versions in operator and Ray cluster.
This commit is contained in:
Dmitri Gekhtman 2022-02-09 18:59:50 -08:00 committed by GitHub
parent 495eb14179
commit f51566e622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 19 deletions

View file

@ -51,7 +51,7 @@ spec:
- name: RAY_gcs_server_rpc_server_thread_num - name: RAY_gcs_server_rpc_server_thread_num
value: "1" value: "1"
ports: ports:
- containerPort: 6379 # Redis port - containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0.
- containerPort: 10001 # Used by Ray Client - containerPort: 10001 # Used by Ray Client
- containerPort: 8265 # Used by Ray Dashboard - containerPort: 8265 # Used by Ray Dashboard
- containerPort: 8000 # Used by Ray Serve - containerPort: 8000 # Used by Ray Serve
@ -92,7 +92,7 @@ spec:
# Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward. # Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward.
headStartRayCommands: headStartRayCommands:
- ray stop - ray stop
- ulimit -n 65536; ray start --head --no-monitor --dashboard-host 0.0.0.0 - ulimit -n 65536; ray start --head --port=6379 --no-monitor --dashboard-host 0.0.0.0
# Commands to start Ray on worker nodes. You don't need to change this. # Commands to start Ray on worker nodes. You don't need to change this.
workerStartRayCommands: workerStartRayCommands:
- ray stop - ray stop

View file

@ -3,6 +3,8 @@
# RayCluster settings: # RayCluster settings:
# image is Ray image to use for the head and workers of this Ray cluster. # image is Ray image to use for the head and workers of this Ray cluster.
# It's recommended to build custom dependencies for your workload into this image,
# taking one of the offical `rayproject/ray` images as base.
image: rayproject/ray:latest image: rayproject/ray:latest
# headPodType is the podType used for the Ray head node (as configured below). # headPodType is the podType used for the Ray head node (as configured below).
headPodType: rayHeadType headPodType: rayHeadType
@ -96,11 +98,8 @@ namespacedOperator: false
# in which to launch the operator. # in which to launch the operator.
operatorNamespace: default operatorNamespace: default
# operatorImage - The image used in the operator deployment. # operatorImage - The image used in the operator deployment.
# It is recommended to use one of the official `rayproject/ray` images for the operator.
# It is recommended to use the same Ray version in the operator as in the Ray clusters managed
# by the operator. In other words, the images specified under the fields `operatorImage` and `image`
# should carry matching Ray versions.
operatorImage: rayproject/ray:latest operatorImage: rayproject/ray:latest
# `rayproject/ray:latest` contains the latest official release version of Ray.
# `rayproject/ray:nightly` runs the current master version of Ray.
# For a particular official release version of Ray, use `rayproject/ray:1.x.y`.
# For a specific master commit, use the first 6 characters of the commit SHA, e.g. `rayproject/ray:050a07`.
# The operator and Ray cluster can use different Ray versions, provided both versions are >= 1.2.0

View file

@ -54,7 +54,7 @@ spec:
command: ["/bin/bash", "-c", "--"] command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; touch /tmp/raylogs; tail -f /tmp/raylogs; sleep infinity & wait;"] args: ["trap : TERM INT; touch /tmp/raylogs; tail -f /tmp/raylogs; sleep infinity & wait;"]
ports: ports:
- containerPort: 6379 # Redis port - containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0.
- containerPort: 10001 # Used by Ray Client - containerPort: 10001 # Used by Ray Client
- containerPort: 8265 # Used by Ray Dashboard - containerPort: 8265 # Used by Ray Dashboard
- containerPort: 8000 # Used by Ray Serve - containerPort: 8000 # Used by Ray Serve
@ -129,7 +129,7 @@ spec:
# Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward. # Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward.
headStartRayCommands: headStartRayCommands:
- ray stop - ray stop
- ulimit -n 65536; ray start --head --no-monitor --dashboard-host 0.0.0.0 &> /tmp/raylogs - ulimit -n 65536; ray start --head --port=6379 --no-monitor --dashboard-host 0.0.0.0 &> /tmp/raylogs
# Commands to start Ray on worker nodes. You don't need to change this. # Commands to start Ray on worker nodes. You don't need to change this.
workerStartRayCommands: workerStartRayCommands:
- ray stop - ray stop

View file

@ -171,7 +171,7 @@ available_node_types:
command: ["/bin/bash", "-c", "--"] command: ["/bin/bash", "-c", "--"]
args: ['trap : TERM INT; sleep infinity & wait;'] args: ['trap : TERM INT; sleep infinity & wait;']
ports: ports:
- containerPort: 6379 # Redis port - containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0.
- containerPort: 10001 # Used by Ray Client - containerPort: 10001 # Used by Ray Client
- containerPort: 8265 # Used by Ray Dashboard - containerPort: 8265 # Used by Ray Dashboard
@ -200,7 +200,7 @@ available_node_types:
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward. # Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands: head_start_ray_commands:
- ray stop - ray stop
- ulimit -n 65536; ray start --head --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0 - ulimit -n 65536; ray start --head --port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0
# Command to start ray on worker nodes. You don't need to change this. # Command to start ray on worker nodes. You don't need to change this.
worker_start_ray_commands: worker_start_ray_commands:

View file

@ -137,7 +137,7 @@ head_node:
command: ["/bin/bash", "-c", "--"] command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; sleep infinity & wait;"] args: ["trap : TERM INT; sleep infinity & wait;"]
ports: ports:
- containerPort: 6379 # Redis port - containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0.
- containerPort: 10001 # Used by Ray Client - containerPort: 10001 # Used by Ray Client
- containerPort: 8265 # Used by Ray Dashboard - containerPort: 8265 # Used by Ray Dashboard
@ -253,7 +253,7 @@ worker_setup_commands: []
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward. # Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands: head_start_ray_commands:
- ray stop - ray stop
- ulimit -n 65536; ray start --head --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0 - ulimit -n 65536; ray start --head --port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0
# Command to start ray on worker nodes. You don't need to change this. # Command to start ray on worker nodes. You don't need to change this.
worker_start_ray_commands: worker_start_ray_commands:

View file

@ -205,7 +205,7 @@ available_node_types:
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward. # Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands: head_start_ray_commands:
- ray stop - ray stop
- ulimit -n 65536; ray start --head --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0 - ulimit -n 65536; ray start --head --port=6379 --autoscaling-config=~/ray_bootstrap_config.yaml --dashboard-host 0.0.0.0
# Command to start ray on worker nodes. You don't need to change this. # Command to start ray on worker nodes. You don't need to change this.
worker_start_ray_commands: worker_start_ray_commands:

View file

@ -152,9 +152,7 @@ head_node:
command: ["/bin/bash", "-c", "--"] command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; sleep infinity & wait;"] args: ["trap : TERM INT; sleep infinity & wait;"]
ports: ports:
- containerPort: 6379 # Redis port. - containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0
- containerPort: 6380 # Redis port.
- containerPort: 6381 # Redis port.
- containerPort: 22345 # Ray internal communication. - containerPort: 22345 # Ray internal communication.
- containerPort: 22346 # Ray internal communication. - containerPort: 22346 # Ray internal communication.