diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..37a12c94e4b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release + +on: + release: + types: [prereleased, released] + +jobs: + upload-helm-charts: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: azure/setup-helm@v1 + + - name: Package helm charts + run: for dir in ./*/; do helm package $dir; done + working-directory: deploy/charts/ + + - name: Rename helm chart archives + run: for filename in *.tgz; do mv "$filename" "helm-chart-$filename"; done + working-directory: deploy/charts/ + + - uses: softprops/action-gh-release@v1 + with: + files: deploy/charts/*.tgz diff --git a/deploy/charts/ray/Chart.yaml b/deploy/charts/ray/Chart.yaml index b2148b1ace24..f2d1a1dd44c4 100644 --- a/deploy/charts/ray/Chart.yaml +++ b/deploy/charts/ray/Chart.yaml @@ -4,7 +4,7 @@ description: A Helm chart for deployments of Ray on Kubernetes. type: application # Chart version. -version: 0.1.0 +version: 0.2.0 # Ray version. appVersion: "latest" diff --git a/deploy/charts/ray/templates/raycluster.yaml b/deploy/charts/ray/templates/raycluster.yaml index f24f60c70c9b..536a4cf8cbd5 100644 --- a/deploy/charts/ray/templates/raycluster.yaml +++ b/deploy/charts/ray/templates/raycluster.yaml @@ -42,7 +42,7 @@ spec: containers: - name: ray-node imagePullPolicy: Always - image: {{ $.Values.image }} + image: {{ $val.image | default $.Values.image }} # Do not change this command - it keeps the pod alive until it is # explicitly killed. command: ["/bin/bash", "-c", "--"] diff --git a/deploy/charts/ray/values.yaml b/deploy/charts/ray/values.yaml index 6c1416b5ff75..f1cf49cb097c 100644 --- a/deploy/charts/ray/values.yaml +++ b/deploy/charts/ray/values.yaml @@ -2,7 +2,8 @@ # RayCluster settings: -# image is Ray image to use for the head and workers of this Ray cluster. +# image is the default Ray image to use for the head and workers of this Ray cluster +# You can override image for specific podTypes, e.g. for GPU workers # 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 @@ -14,12 +15,13 @@ podTypes: # Since we set headPodType: rayHeadType, the Ray head pod will use the configuration # defined in this entry of podTypes: rayHeadType: + image: "" # CPU is the number of CPUs used by this pod type. # (Used for both requests and limits. Must be an integer, as Ray does not support fractional CPUs.) CPU: 1 # memory is the memory used by this Pod type. # (Used for both requests and limits.) - memory: 512Mi + memory: 1Gi # GPU is the number of NVIDIA GPUs used by this pod type. # (Optional, requires GPU nodes with appropriate setup. See https://docs.ray.io/en/master/cluster/kubernetes-gpu.html) GPU: 0 @@ -43,13 +45,14 @@ podTypes: # The key for each podType is a user-defined string. rayWorkerType: + image: "" # minWorkers is the minimum number of Ray workers of this pod type to keep running. minWorkers: 2 # maxWorkers is the maximum number of Ray workers of this pod type to which Ray will scale. maxWorkers: 3 # memory is the memory used by this Pod type. # (Used for both requests and limits.) - memory: 512Mi + memory: 1Gi # CPU is the number of CPUs used by this pod type. # (Used for both requests and limits. Must be an integer, as Ray does not support fractional CPUs.) CPU: 1 diff --git a/doc/source/cluster/kubernetes.rst b/doc/source/cluster/kubernetes.rst index 24b36b4002c4..cda2a51d9e4e 100644 --- a/doc/source/cluster/kubernetes.rst +++ b/doc/source/cluster/kubernetes.rst @@ -50,6 +50,7 @@ Installing the Ray Operator with Helm Ray provides a `Helm`_ chart to simplify deployment of the Ray Operator and Ray clusters. The `Ray Helm chart`_ is available as part of the Ray GitHub repository. +A URL to the packaged chart can be found under the `release assets`_. The chart will be published to a public Helm repository as part of a future Ray release. Preparation @@ -57,7 +58,7 @@ Preparation - Configure `kubectl`_ to access your Kubernetes cluster. - Install `Helm 3`_. -- Download the `Ray Helm chart`_. +- Download the `Ray Helm chart`_, or find the URL to the packaged Helm chart under `release assets`_. To run the default example in this document, make sure your Kubernetes cluster can accomodate additional resource requests of 4 CPU and 2.5Gi memory. @@ -66,6 +67,8 @@ Installation ~~~~~~~~~~~~ You can install a small Ray cluster with a single ``helm`` command. +You can either clone the project and point Helm to the local path, +or point Helm to the packaged chart by passing the URL found under `release assets`_. The default cluster configuration consists of a Ray head pod and two worker pods, with scaling allowed up to three workers. @@ -306,6 +309,7 @@ Questions or Issues? .. _`namespace`: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ .. _`Deployment`: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ .. _`Ray Helm chart`: https://github.com/ray-project/ray/tree/master/deploy/charts/ray/ +.. _`release assets`: https://github.com/ray-project/ray/releases/latest/ .. _`kubectl`: https://kubernetes.io/docs/tasks/tools/ .. _`Helm 3`: https://helm.sh/ .. _`Helm`: https://helm.sh/