Skip to content

Commit

Permalink
Prep K8s operator for the Ray 1.11.0 release. (#22264)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DmitriGekhtman authored Feb 10, 2022
1 parent 495eb14 commit f51566e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
4 changes: 2 additions & 2 deletions deploy/charts/ray/templates/raycluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
- name: RAY_gcs_server_rpc_server_thread_num
value: "1"
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: 8265 # Used by Ray Dashboard
- containerPort: 8000 # Used by Ray Serve
Expand Down Expand Up @@ -92,7 +92,7 @@ spec:
# Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward.
headStartRayCommands:
- 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.
workerStartRayCommands:
- ray stop
Expand Down
13 changes: 6 additions & 7 deletions deploy/charts/ray/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# RayCluster settings:

# 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
# headPodType is the podType used for the Ray head node (as configured below).
headPodType: rayHeadType
Expand Down Expand Up @@ -96,11 +98,8 @@ namespacedOperator: false
# in which to launch the operator.
operatorNamespace: default
# 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
# `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


4 changes: 2 additions & 2 deletions deploy/components/example_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; touch /tmp/raylogs; tail -f /tmp/raylogs; sleep infinity & wait;"]
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: 8265 # Used by Ray Dashboard
- containerPort: 8000 # Used by Ray Serve
Expand Down Expand Up @@ -129,7 +129,7 @@ spec:
# Note dashboard-host is set to 0.0.0.0 so that Kubernetes can port forward.
headStartRayCommands:
- 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.
workerStartRayCommands:
- ray stop
Expand Down
4 changes: 2 additions & 2 deletions python/ray/autoscaler/kubernetes/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ available_node_types:
command: ["/bin/bash", "-c", "--"]
args: ['trap : TERM INT; sleep infinity & wait;']
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: 8265 # Used by Ray Dashboard

Expand Down Expand Up @@ -200,7 +200,7 @@ available_node_types:
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands:
- 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.
worker_start_ray_commands:
Expand Down
4 changes: 2 additions & 2 deletions python/ray/autoscaler/kubernetes/example-full-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ head_node:
command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; sleep infinity & wait;"]
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: 8265 # Used by Ray Dashboard

Expand Down Expand Up @@ -253,7 +253,7 @@ worker_setup_commands: []
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands:
- 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.
worker_start_ray_commands:
Expand Down
2 changes: 1 addition & 1 deletion python/ray/autoscaler/kubernetes/example-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ available_node_types:
# Note dashboard-host is set to 0.0.0.0 so that kubernetes can port forward.
head_start_ray_commands:
- 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.
worker_start_ray_commands:
Expand Down
4 changes: 1 addition & 3 deletions python/ray/autoscaler/kubernetes/example-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ head_node:
command: ["/bin/bash", "-c", "--"]
args: ["trap : TERM INT; sleep infinity & wait;"]
ports:
- containerPort: 6379 # Redis port.
- containerPort: 6380 # Redis port.
- containerPort: 6381 # Redis port.
- containerPort: 6379 # Redis port for Ray <= 1.10.0. GCS server port for Ray >= 1.11.0
- containerPort: 22345 # Ray internal communication.
- containerPort: 22346 # Ray internal communication.

Expand Down

0 comments on commit f51566e

Please sign in to comment.