Skip to content

Commit 93b07be

Browse files
sutaakaropenshift-merge-robot
authored andcommitted
Install CodeFlare tools from main branch
1 parent a038f86 commit 93b07be

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin/*

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ export PATH:=$(GOBIN):$(PATH)
33
SHELL := /bin/bash
44
OCI_RUNTIME ?= $(shell which podman || which docker)
55
CMD_DIR=./cmd/
6+
LOCALBIN ?= $(shell pwd)/bin
7+
$(LOCALBIN):
8+
mkdir -p $(LOCALBIN)
9+
10+
## Tool Binaries
11+
KUSTOMIZE ?= $(LOCALBIN)/kustomize
12+
13+
## Tool Versions
14+
KUSTOMIZE_VERSION ?= v4.5.4
615

716
.DEFAULT_GOAL := help
817

@@ -34,6 +43,8 @@ install-opendatahub-operator: ## Install OpenDataHub operator
3443
@echo -e "\n==> Installing OpenDataHub Operator \n"
3544
-oc create ns opendatahub
3645
oc create -f contrib/configuration/opendatahub-operator-subscription.yaml
46+
@echo Waiting for opendatahub-operator Subscription to be ready
47+
oc wait -n openshift-operators subscription/opendatahub-operator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
3748

3849
.PHONY: delete-opendatahub-operator
3950
delete-opendatahub-operator: ## Delete OpenDataHub operator
@@ -46,6 +57,8 @@ delete-opendatahub-operator: ## Delete OpenDataHub operator
4657
install-codeflare-operator: ## Install CodeFlare operator
4758
@echo -e "\n==> Installing CodeFlare Operator \n"
4859
oc create -f contrib/configuration/codeflare-operator-subscription.yaml
60+
@echo Waiting for codeflare-operator Subscription to be ready
61+
oc wait -n openshift-operators subscription/codeflare-operator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
4962

5063
.PHONY: delete-codeflare-operator
5164
delete-codeflare-operator: ## Delete CodeFlare operator
@@ -71,6 +84,21 @@ delete-codeflare: ## Delete CodeFlare
7184
-oc delete -f https://raw.githubusercontent.com/opendatahub-io/distributed-workloads/main/codeflare-stack-kfdef.yaml -n opendatahub
7285
-oc delete ns opendatahub
7386

87+
.PHONY: deploy-codeflare-from-filesystem
88+
deploy-codeflare-from-filesystem: kustomize ## Deploy CodeFlare from local file system
89+
@echo -e "\n==> Deploying CodeFlare \n"
90+
-oc create ns opendatahub
91+
@while [[ -z $$(oc get customresourcedefinition mcads.codeflare.codeflare.dev) ]]; do echo "."; sleep 10; done
92+
$(KUSTOMIZE) build ray/operator/base | oc apply --server-side=true -n opendatahub -f -
93+
$(KUSTOMIZE) build codeflare-stack/base | oc apply --server-side=true -n opendatahub -f -
94+
95+
.PHONY: delete-codeflare-from-filesystem
96+
delete-codeflare-from-filesystem: kustomize ## Delete CodeFlare deployed from local file system
97+
@echo -e "\n==> Deleteing CodeFlare \n"
98+
-$(KUSTOMIZE) build ray/operator/base | oc delete -n opendatahub -f -
99+
-$(KUSTOMIZE) build codeflare-stack/base | oc delete -n opendatahub -f -
100+
-oc delete ns opendatahub
101+
74102
##@ GPU Support
75103

76104
.PHONY: install-ndf-operator
@@ -101,4 +129,12 @@ delete-nvidia-operator: ## Delete nvidia operator
101129
oc delete clusterserviceversion $$CLUSTER_SERVICE_VERSION -n nvidia-gpu-operator
102130
-oc delete ns nvidia-gpu-operator
103131

132+
##@ Tool installations
133+
134+
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
135+
.PHONY: kustomize
136+
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
137+
$(KUSTOMIZE): $(LOCALBIN)
138+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
139+
104140
include .mk/observability.mk

0 commit comments

Comments
 (0)