chenyulin0719 commented on code in PR #441: URL: https://github.com/apache/yunikorn-site/pull/441#discussion_r1653208341
########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` + +## Setup a KubeRay operator +``` +helm repo add kuberay https://ray-project.github.io/kuberay-helm/ +helm repo update +helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1 +``` +- The result should be as shown below + + +## Create Ray Cluster +``` +helm install raycluster kuberay/ray-cluster --version 1.1.1 +``` +- Ray Cluster result +  +- YuniKorn UI +  +### Configure your Ray Cluster(optional) +If you disable admin controller, you need to add the schedulerName: yunikorn in [raycluster spec](https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/templates/raycluster-cluster.yaml#L40).By applicationId label, pods with same id are marked under same application or all pods from raycluster CRD share a application. Review Comment: "admin controller" -> "admission controller" ########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` + +## Setup a KubeRay operator +``` +helm repo add kuberay https://ray-project.github.io/kuberay-helm/ +helm repo update +helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1 +``` +- The result should be as shown below + + +## Create Ray Cluster +``` +helm install raycluster kuberay/ray-cluster --version 1.1.1 +``` +- Ray Cluster result +  +- YuniKorn UI +  +### Configure your Ray Cluster(optional) +If you disable admin controller, you need to add the schedulerName: yunikorn in [raycluster spec](https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/templates/raycluster-cluster.yaml#L40). +``` Review Comment: I'm not quite get this: "By applicationId label, pods with same id are marked under same application or all pods from raycluster CRD share a application. What does this mean? ########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` + +## Setup a KubeRay operator +``` +helm repo add kuberay https://ray-project.github.io/kuberay-helm/ +helm repo update +helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1 +``` +- The result should be as shown below + + +## Create Ray Cluster +``` +helm install raycluster kuberay/ray-cluster --version 1.1.1 +``` +- Ray Cluster result +  +- YuniKorn UI +  +### Configure your Ray Cluster(optional) +If you disable admin controller, you need to add the schedulerName: yunikorn in [raycluster spec](https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/templates/raycluster-cluster.yaml#L40). +``` Review Comment: Actually I think we can remove those optional steps. 1. "### Configure your Ray Cluster(optional)" 2. "### Configure your application(optional)" And just add note on the top of these pages: "This example relies on admission controller to configure the default applicationId and queue name." I can foresee there will be another PR after https://github.com/ray-project/enhancements/pull/53 is done, so no need to dig in too much detail here. @0yukali0 What do you think? ########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` Review Comment: How about skipping the step for helm installation? It's quite straighforward to me and I didn't see similar guide in helm-related examples: 1. http://localhost:3000/docs/next/#install 2. https://yunikorn.apache.org/docs/next/user_guide/workloads/run_nvidia PS: It's just a suggestion from me and not a strong request for changing. Please feel free to resolve this comment if you want to keep it. ########## docs/user_guide/workloads/run_ray_job.md: ########## @@ -0,0 +1,55 @@ +--- +id: run_ray_job +title: Run RayJob +description: How to run RayJobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Job](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/rayjob-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Setup a KubeRay operator +``` +helm repo add kuberay https://ray-project.github.io/kuberay-helm/ +helm repo update +helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1 +``` +### Configure your application(optional) +If you disable admin controller, you need to add the schedulerName: yunikorn in [operator spec](https://github.com/ray-project/kuberay/blob/master/helm-chart/kuberay-operator/templates/deployment.yaml#L31). + +## Run a RayJob +``` +kubectl apply -f https://raw.githubusercontent.com/ray-project/kuberay/v1.1.1/ray-operator/config/samples/ray-job.sample.yaml +``` + +- View the job status +  +- Ray Dashboard Review Comment: Could you add port-forward step before accessing the Ray Dashboard? Ex: - https://yunikorn.apache.org/docs/#access-the-web-ui ########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` Review Comment: How about skipping the step for helm installation? It's quite straighforward to me and I didn't see similar guide in helm-related docs: 1. http://localhost:3000/docs/next/#install 2. https://yunikorn.apache.org/docs/next/user_guide/workloads/run_nvidia PS: It's just a suggestion from me and not a strong request for changing. Please feel free to resolve this comment if you want to keep it. ########## docs/user_guide/workloads/run_ray_cluster.md: ########## @@ -0,0 +1,83 @@ +--- +id: run_ray_cluster +title: Run Ray Cluster +description: How to run Ray Cluster jobs with YuniKorn +keywords: + - Ray_crd +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +This example is how to setup [KubeRay](https://docs.ray.io/en/master/cluster/kubernetes/getting-started.html) and run [Ray Cluster](https://docs.ray.io/en/master/cluster/kubernetes/getting-started/raycluster-quick-start.html) with YuniKorn scheduler + +## Modify YuniKorn settings +Follow [YuniKorn install guide](https://yunikorn.apache.org/docs/) and modify YuniKorn configmap "yunikorn-defaults" to allow ray operator based on k8s service account. +``` +kubectl patch configmap yunikorn-defaults -n yunikorn --patch '{"data":{"admissionController.accessControl.systemUsers": "^system:serviceaccount:kube-system:,^system:serviceaccount:default:"}}' +``` + +## Install Helm +Follow commands to install the Helm ,or refer to the [Helm installation method](https://helm.sh/docs/intro/install/) +``` +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 \ + && chmod 700 get_helm.sh \ + && ./get_helm.sh +``` + +## Setup a KubeRay operator +``` +helm repo add kuberay https://ray-project.github.io/kuberay-helm/ +helm repo update +helm install kuberay-operator kuberay/kuberay-operator --version 1.1.1 +``` +- The result should be as shown below + + +## Create Ray Cluster +``` +helm install raycluster kuberay/ray-cluster --version 1.1.1 +``` +- Ray Cluster result +  +- YuniKorn UI +  +### Configure your Ray Cluster(optional) +If you disable admin controller, you need to add the schedulerName: yunikorn in [raycluster spec](https://github.com/ray-project/kuberay/blob/master/helm-chart/ray-cluster/templates/raycluster-cluster.yaml#L40). +``` Review Comment: I'm not quite getting this: "By applicationId label, pods with same id are marked under same application or all pods from raycluster CRD share a application. What does this mean? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
