-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
26 lines (21 loc) · 1.38 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
git clone https://github.com/rhoai-mlops/deploy-lab.git
## Install GitOps Operator and Instance
helm upgrade --install ml500-gitops gitops --namespace ml500 --create-namespace
## Install Operators (this will be in an AppSet)
helm upgrade --install ml500-operators operators --namespace ml500 --create-namespace
## Install helm chart (this will be in an AppSet)
helm upgrade --install ml500-base charts/ --namespace ml500 --create-namespace
# Patch OAuth to point to ML500 htpasswd
oc patch --type=merge OAuth/cluster -p '{"spec": {"identityProviders": [{"name": "Students", "type": "HTPasswd", "mappingMethod": "claim", "htpasswd": {"fileData": {"name": "htpasswd-ml500"}}}, {"name": "htpasswd_provider", "type": "HTPasswd", "mappingMethod": "claim", "htpasswd": {"fileData": {"name": "htpasswd"}}}]}}'
# Patch Argo CD to be cluster level (for this training purposes)
attendees=`grep attendees charts/values.yaml | cut -d':' -f2`
for ((i=1; i<=$attendees; i++))
do
if [ $i -eq 1 ]; then
NS="user$i-mlops"
else
NS+="$var,user$i-mlops"
fi
done
oc -n openshift-gitops-operator patch subscriptions.operators.coreos.com/openshift-gitops-operator --type=json \
-p '[{"op":"'add'","path":"/spec/config/env", "value":[{"name": "DISABLE_DEFAULT_ARGOCD_INSTANCE", "value":"true"}] },{"op":"'add'","path":"/spec/config/env/1","value":{"name": "ARGOCD_CLUSTER_CONFIG_NAMESPACES", "value":"'${NS}'"}}]'