forked from konono/openshift-fast-install
-
Notifications
You must be signed in to change notification settings - Fork 1
/
12_check.sh
executable file
·67 lines (52 loc) · 1.54 KB
/
12_check.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
. ./setup.conf
SLEEP=30
retry_oc () {
CMDS=$*
echo "${CMDS}"
${CMDS}
STAT=$?
while [ ${STAT} -ne 0 ]
do
echo sleeping ${SLEEP} sec...
sleep ${SLEEP}
./approve_csr.sh
echo "${CMDS} - again"
${CMDS}
STAT=$?
done
echo
date
echo
}
export KUBECONFIG=$(find . -name kubeconfig | fgrep /bare-metal/)
retry_oc oc whoami
retry_oc oc get nodes
echo retry_oc oc patch configs.imageregistry.operator.openshift.io/cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
retry_oc oc patch configs.imageregistry.operator.openshift.io/cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
RESULT=/tmp/oc_get_clusteroperators.out
STAT=0
while [ $STAT -ne 1 ]
do
./approve_csr.sh
retry_oc oc get clusteroperators > $RESULT
cat $RESULT
cat $RESULT | egrep "True|False|Unknown" | grep -v "True False False"
STAT=$?
echo sleeping ${SLEEP} sec...
sleep ${SLEEP}
echo
done
if [[ x$DEBUG_INSTALL == xY ]]; then
LOG_LEVEL="--log-level=debug"
else
LOG_LEVEL="--log-level=error"
fi
retry_oc sudo ./openshift-install --dir=bare-metal wait-for install-complete $LOG_LEVEL
./approve_csr.sh
retry_oc oc get nodes
retry_oc oc get csr
echo try access https://console-openshift-console.apps.test.lab.local using browser.
echo "About username and passwd, you can find out the the last openshift-install command output"
./show_kubeadmin_password.sh
oc patch --type=merge --patch='{"spec":{"mastersSchedulable": false}}' schedulers.config.openshift.io cluster