-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contrib): add initial ray support
- Loading branch information
Showing
4 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024 Ho Kim ([email protected]). All rights reserved. | ||
# Use of this source code is governed by a GPL-3-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# Prehibit errors | ||
set -e -o pipefail | ||
# Verbose | ||
set -x | ||
|
||
########################################################### | ||
# Configuration # | ||
########################################################### | ||
|
||
# Configure default environment variables | ||
HELM_CHART_DEFAULT="https://ray-project.github.io/kuberay-helm/" | ||
NAMESPACE_DEFAULT="ai" | ||
|
||
# Set environment variables | ||
HELM_CHART="${HELM_CHART:-$HELM_CHART_DEFAULT}" | ||
NAMESPACE="${NAMESPACE:-$NAMESPACE_DEFAULT}" | ||
|
||
########################################################### | ||
# Configure Helm Channel # | ||
########################################################### | ||
|
||
echo "- Configuring Helm channel ... " | ||
|
||
helm repo add "${NAMESPACE}-kuberay" "${HELM_CHART}" | ||
|
||
########################################################### | ||
# Checking if Operator is already installed # | ||
########################################################### | ||
|
||
echo "- Checking Operator is already installed ... " | ||
if | ||
kubectl get namespace --no-headers "${NAMESPACE}" \ | ||
>/dev/null 2>/dev/null | ||
then | ||
IS_FIRST=0 | ||
else | ||
IS_FIRST=1 | ||
fi | ||
|
||
########################################################### | ||
# Install KubeRay Cluster # | ||
########################################################### | ||
|
||
echo "- Installing KubeRay Cluster ... " | ||
|
||
helm upgrade --install "ray-cluster" \ | ||
"${NAMESPACE}-kuberay/ray-cluster" \ | ||
--create-namespace \ | ||
--namespace "${NAMESPACE}" \ | ||
--values "./values-cluster.yaml" | ||
|
||
# Finished! | ||
echo "Installed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
head: | ||
headService: | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
labels: | ||
ark.ulagbulag.io/is-external: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2024 Ho Kim ([email protected]). All rights reserved. | ||
# Use of this source code is governed by a GPL-3-style license that can be | ||
# found in the LICENSE file. | ||
|
||
# Prehibit errors | ||
set -e -o pipefail | ||
# Verbose | ||
set -x | ||
|
||
########################################################### | ||
# Configuration # | ||
########################################################### | ||
|
||
# Configure default environment variables | ||
HELM_CHART_DEFAULT="https://ray-project.github.io/kuberay-helm/" | ||
NAMESPACE_DEFAULT="kuberay-operator" | ||
|
||
# Set environment variables | ||
HELM_CHART="${HELM_CHART:-$HELM_CHART_DEFAULT}" | ||
NAMESPACE="${NAMESPACE:-$NAMESPACE_DEFAULT}" | ||
|
||
########################################################### | ||
# Configure Helm Channel # | ||
########################################################### | ||
|
||
echo "- Configuring Helm channel ... " | ||
|
||
helm repo add "${NAMESPACE}" "${HELM_CHART}" | ||
|
||
########################################################### | ||
# Checking if Operator is already installed # | ||
########################################################### | ||
|
||
echo "- Checking Operator is already installed ... " | ||
if | ||
kubectl get namespace --no-headers "${NAMESPACE}" \ | ||
>/dev/null 2>/dev/null | ||
then | ||
IS_FIRST=0 | ||
else | ||
IS_FIRST=1 | ||
fi | ||
|
||
########################################################### | ||
# Install Operator # | ||
########################################################### | ||
|
||
echo "- Installing Operator ... " | ||
|
||
helm upgrade --install "kuberay-operator" \ | ||
"${NAMESPACE}/kuberay-operator" \ | ||
--create-namespace \ | ||
--namespace "${NAMESPACE}" \ | ||
--values "./values-operator.yaml" | ||
|
||
# Finished! | ||
echo "Installed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
env: | ||
# If not set or set to "", kuberay will pick up the default k8s cluster domain `cluster.local` | ||
# Otherwise, kuberay will use your custom domain | ||
- name: CLUSTER_DOMAIN | ||
value: ops.openark |