-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·45 lines (31 loc) · 1.47 KB
/
bootstrap.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
LANG=C
SLEEP_SECONDS=30
# echo ""
# echo "Installing RHACM Operator."
# kustomize build github.com/redhat-cop/gitops-catalog/advanced-cluster-management/operator/overlays/release-2.10 | oc apply -f -
# echo "Pause $SLEEP_SECONDS seconds for the creation of the rhacm-operator..."
# sleep $SLEEP_SECONDS
# echo "Waiting for operator to start"
# until oc get deployment multiclusterhub-operator -n open-cluster-management
# do
# sleep 10;
# done
# echo "Installing the MultiClusterHub"
# kustomize build github.com/redhat-cop/gitops-catalog/advanced-cluster-management/instance/base | oc apply -f -
# echo "Waiting for hub to be installed"
# until [[ $(oc get multiclusterhub multiclusterhub -n open-cluster-management -o jsonpath='{.status.phase}') == 'Running' ]]
# do
# echo "Waiting for hub, current status:"
# oc get multiclusterhub multiclusterhub -n open-cluster-management
# sleep 10
# done
echo "Installing policies and initial secrets"
kustomize build bootstrap/secrets/base | oc apply -f -
kustomize build bootstrap/policies/overlays/default --enable-alpha-plugins | oc apply -f -
echo "Labeling cluster with 'gitops: local.home'"
oc label managedcluster local-cluster gitops=local.hub --overwrite=true
echo "Check policy compliance with the following command:"
echo " oc get policy -A"
# echo "Once GitOps configuration is complete you may need to run the following to fix Unknown status\n"
# echo " oc delete secret local-cluster-import -n local-cluster\n"