Skip to content

Commit

Permalink
[release][4/N] Update Ray images / versions in kubectl plugin (ray-pr…
Browse files Browse the repository at this point in the history
…oject#2938)

Signed-off-by: kaihsun <kaihsun@anyscale.com>
  • Loading branch information
kevin85421 authored Feb 6, 2025
1 parent 7def628 commit 90c8dc9
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 37 deletions.
4 changes: 2 additions & 2 deletions kubectl-plugin/pkg/cmd/create/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
kubectl ray create cluster sample-cluster
# Creates Ray Cluster from flags input
kubectl ray create cluster sample-cluster --ray-version 2.39.0 --image rayproject/ray:2.39.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi
kubectl ray create cluster sample-cluster --ray-version 2.41.0 --image rayproject/ray:2.41.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi
`)
)

Expand Down Expand Up @@ -73,7 +73,7 @@ func NewCreateClusterCommand(streams genericclioptions.IOStreams) *cobra.Command
},
}

cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.39.0", "Ray Version to use in the Ray Cluster yaml. Default to 2.39.0")
cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.41.0", "Ray Version to use in the Ray Cluster yaml. Default to 2.41.0")
cmd.Flags().StringVar(&options.image, "image", options.image, "Ray image to use in the Ray Cluster yaml")
cmd.Flags().StringVar(&options.headCPU, "head-cpu", "2", "Number of CPU for the ray head. Default to 2")
cmd.Flags().StringVar(&options.headMemory, "head-memory", "4Gi", "Amount of memory to use for the ray head. Default to 4Gi")
Expand Down
4 changes: 2 additions & 2 deletions kubectl-plugin/pkg/cmd/create/create_workergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (

createWorkerGroupExample = templates.Examples(`
# Create a worker group in an existing RayCluster
kubectl ray create worker-group example-group --cluster sample-cluster --image rayproject/ray:2.39.0 --worker-cpu=2 --worker-memory=5Gi
kubectl ray create worker-group example-group --cluster sample-cluster --image rayproject/ray:2.41.0 --worker-cpu=2 --worker-memory=5Gi
`)
)

Expand Down Expand Up @@ -78,7 +78,7 @@ func NewCreateWorkerGroupCommand(streams genericclioptions.IOStreams) *cobra.Com
}

cmd.Flags().StringVar(&options.clusterName, "ray-cluster", "", "The name of the RayCluster to add a worker group.")
cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.39.0", "Ray Version to use in the Ray Cluster yaml. Default to 2.39.0")
cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.41.0", "Ray Version to use in the Ray Cluster yaml. Default to 2.41.0")
cmd.Flags().StringVar(&options.image, "image", options.image, "Ray image to use in the Ray Cluster yaml")
cmd.Flags().Int32Var(&options.workerReplicas, "worker-replicas", 1, "Number of the worker group replicas. Default of 1")
cmd.Flags().Int32Var(&options.workerMinReplicas, "worker-min-replicas", 1, "Number of the worker group replicas. Default of 10")
Expand Down
8 changes: 4 additions & 4 deletions kubectl-plugin/pkg/cmd/job/job_submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ var (
kubectl ray job submit --name rayjob-sample --working-dir /path/to/working-dir/ --runtime-env /runtimeEnv.yaml -- python my_script.py
# Generate Ray job with specifications and submit Ray job with runtime Env file and working directory
kubectl ray job submit --name rayjob-sample --ray-version 2.39.0 --image rayproject/ray:2.39.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi --runtime-env path/to/runtimeEnv.yaml -- python my_script.py
kubectl ray job submit --name rayjob-sample --ray-version 2.41.0 --image rayproject/ray:2.41.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi --runtime-env path/to/runtimeEnv.yaml -- python my_script.py
# Generate Ray job with specifications and print out the generated RayJob YAML
kubectl ray job submit --dry-run --name rayjob-sample --ray-version 2.39.0 --image rayproject/ray:2.39.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi --runtime-env path/to/runtimeEnv.yaml -- python my_script.py
kubectl ray job submit --dry-run --name rayjob-sample --ray-version 2.41.0 --image rayproject/ray:2.41.0 --head-cpu 1 --head-memory 5Gi --worker-replicas 3 --worker-cpu 1 --worker-memory 5Gi --runtime-env path/to/runtimeEnv.yaml -- python my_script.py
`)
)

Expand Down Expand Up @@ -149,8 +149,8 @@ func NewJobSubmitCommand(streams genericclioptions.IOStreams) *cobra.Command {
cmd.Flags().BoolVar(&options.noWait, "no-wait", options.noWait, "If present, will not stream logs and wait for job to finish")

cmd.Flags().StringVar(&options.rayjobName, "name", "", "Name of the Ray job that will be generated")
cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.39.0", "Ray Version to use in the Ray Cluster yaml.")
cmd.Flags().StringVar(&options.image, "image", "rayproject/ray:2.39.0", "Ray image to use in the Ray Cluster yaml")
cmd.Flags().StringVar(&options.rayVersion, "ray-version", "2.41.0", "Ray Version to use in the Ray Cluster yaml.")
cmd.Flags().StringVar(&options.image, "image", "rayproject/ray:2.41.0", "Ray image to use in the Ray Cluster yaml")
cmd.Flags().StringVar(&options.headCPU, "head-cpu", "2", "Number of CPU for the Ray head")
cmd.Flags().StringVar(&options.headMemory, "head-memory", "4Gi", "Amount of memory to use for the Ray head")
cmd.Flags().Int32Var(&options.workerReplicas, "worker-replicas", 1, "Number of the worker group replicas")
Expand Down
18 changes: 9 additions & 9 deletions kubectl-plugin/pkg/util/generation/generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ func TestGenerateRayCluterApplyConfig(t *testing.T) {
ClusterName: "test-ray-cluster",
Namespace: "default",
RayClusterSpecObject: RayClusterSpecObject{
RayVersion: "2.39.0",
Image: "rayproject/ray:2.39.0",
RayVersion: "2.41.0",
Image: "rayproject/ray:2.41.0",
HeadCPU: "1",
HeadMemory: "5Gi",
HeadGPU: "1",
Expand Down Expand Up @@ -51,8 +51,8 @@ func TestGenerateRayJobApplyConfig(t *testing.T) {
Namespace: "default",
SubmissionMode: "InteractiveMode",
RayClusterSpecObject: RayClusterSpecObject{
RayVersion: "2.39.0",
Image: "rayproject/ray:2.39.0",
RayVersion: "2.41.0",
Image: "rayproject/ray:2.41.0",
HeadCPU: "1",
HeadGPU: "1",
HeadMemory: "5Gi",
Expand Down Expand Up @@ -83,8 +83,8 @@ func TestConvertRayClusterApplyConfigToYaml(t *testing.T) {
ClusterName: "test-ray-cluster",
Namespace: "default",
RayClusterSpecObject: RayClusterSpecObject{
RayVersion: "2.39.0",
Image: "rayproject/ray:2.39.0",
RayVersion: "2.41.0",
Image: "rayproject/ray:2.41.0",
HeadCPU: "1",
HeadMemory: "5Gi",
HeadGPU: "1",
Expand All @@ -111,7 +111,7 @@ spec:
template:
spec:
containers:
- image: rayproject/ray:2.39.0
- image: rayproject/ray:2.41.0
name: ray-head
ports:
- containerPort: 6379
Expand All @@ -129,7 +129,7 @@ spec:
cpu: "1"
memory: 5Gi
nvidia.com/gpu: "1"
rayVersion: 2.39.0
rayVersion: 2.41.0
workerGroupSpecs:
- groupName: default-group
rayStartParams:
Expand All @@ -138,7 +138,7 @@ spec:
template:
spec:
containers:
- image: rayproject/ray:2.39.0
- image: rayproject/ray:2.41.0
name: ray-worker
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ metadata:
spec:
submissionMode: 'InteractiveMode'
rayClusterSpec:
rayVersion: '2.39.0'
rayVersion: '2.41.0'
headGroupSpec:
rayStartParams:
dashboard-host: '0.0.0.0'
rayStartParams: {}
template:
spec:
containers:
- name: ray-head
image: rayproject/ray:2.39.0
image: rayproject/ray:2.41.0
ports:
- containerPort: 6379
name: gcs-server
Expand All @@ -36,11 +35,7 @@ spec:
spec:
containers:
- name: ray-worker
image: rayproject/ray:2.39.0
lifecycle:
preStop:
exec:
command: [ "/bin/sh","-c","ray stop" ]
image: rayproject/ray:2.41.0
resources:
limits:
cpu: "1"
Expand Down
13 changes: 4 additions & 9 deletions kubectl-plugin/test/e2e/testdata/ray-job.interactive-mode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ spec:
another_env_var: "second_env_var"
rayClusterSpec:
rayVersion: '2.39.0' # should match the Ray version in the image of the containers
rayVersion: '2.41.0' # should match the Ray version in the image of the containers
headGroupSpec:
rayStartParams:
dashboard-host: '0.0.0.0'
rayStartParams: {}
template:
spec:
containers:
- name: ray-head
image: rayproject/ray:2.39.0
image: rayproject/ray:2.41.0
ports:
- containerPort: 6379
name: gcs-server
Expand All @@ -45,11 +44,7 @@ spec:
spec:
containers:
- name: ray-worker
image: rayproject/ray:2.39.0
lifecycle:
preStop:
exec:
command: [ "/bin/sh","-c","ray stop" ]
image: rayproject/ray:2.41.0
resources:
limits:
cpu: "1"
Expand Down
4 changes: 2 additions & 2 deletions ray-operator/config/samples/ray-cluster.auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
serviceAccountName: kube-rbac-proxy
containers:
- name: ray-head
image: rayproject/ray:2.39.0
image: rayproject/ray:2.41.0
ports:
- containerPort: 6379
name: gcs
Expand Down Expand Up @@ -125,7 +125,7 @@ spec:
spec:
containers:
- name: ray-worker
image: rayproject/ray:2.39.0
image: rayproject/ray:2.41.0
resources:
limits:
cpu: 1
Expand Down

0 comments on commit 90c8dc9

Please sign in to comment.