@@ -35,11 +35,16 @@ function attach_agent_iso() {
35
35
done
36
36
}
37
37
38
+ function get_node0_ip() {
39
+ node0_name=$( printf ${MASTER_HOSTNAME_FORMAT} 0)
40
+ node0_ip=$( sudo virsh net-dumpxml ostestbm | xmllint --xpath " string(//dns[*]/host/hostname[. = '${node0_name} ']/../@ip)" -)
41
+ echo " ${node0_ip} "
42
+ }
43
+
38
44
function force_mirror_disconnect() {
39
45
40
46
# Set a bogus entry in /etc/hosts on all masters to force the local mirror to be used
41
- node0_name=$( printf ${MASTER_HOSTNAME_FORMAT} 0)
42
- node0_ip=$( sudo virsh net-dumpxml ostestbm | xmllint --xpath " string(//dns[*]/host/hostname[. = '${node0_name} ']/../@ip)" -)
47
+ node0_ip=$( get_node0_ip)
43
48
ssh_opts=(-o ' StrictHostKeyChecking=no' -q core@${node0_ip} )
44
49
45
50
for (( n= 0 ; n< ${NUM_MASTERS} ; n++ ))
@@ -61,10 +66,22 @@ function force_mirror_disconnect() {
61
66
62
67
}
63
68
69
+ function enable_assisted_service_ui() {
70
+ node0_ip=$( get_node0_ip)
71
+ ssh_opts=(-o ' StrictHostKeyChecking=no' -o ' UserKnownHostsFile=/dev/null' -q core@${node0_ip} )
72
+
73
+ until ssh " ${ssh_opts[@]} " " [[ -f /run/assisted-service-pod.pod-id ]]"
74
+ do
75
+ echo " Waiting for node0"
76
+ sleep 5s;
77
+ done
78
+
79
+ ssh " ${ssh_opts[@]} " " sudo /usr/bin/podman run -d --name=assisted-ui --pod-id-file=/run/assisted-service-pod.pod-id quay.io/edge-infrastructure/assisted-installer-ui:latest"
80
+ }
81
+
64
82
function wait_for_cluster_ready() {
65
83
66
- node0_name=$( printf ${MASTER_HOSTNAME_FORMAT} 0)
67
- node0_ip=$( sudo virsh net-dumpxml ostestbm | xmllint --xpath " string(//dns[*]/host/hostname[. = '${node0_name} ']/../@ip)" -)
84
+ node0_ip=$( get_node0_ip)
68
85
ssh_opts=(-o ' StrictHostKeyChecking=no' -o ' UserKnownHostsFile=/dev/null' -q core@${node0_ip} )
69
86
70
87
local openshift_install=" $( realpath " ${OCP_DIR} /openshift-install" ) "
@@ -89,6 +106,11 @@ if [ ! -z "${MIRROR_IMAGES}" ]; then
89
106
force_mirror_disconnect
90
107
fi
91
108
109
+ if [ ! -z " ${AGENT_ENABLE_GUI:- } " ]; then
110
+ enable_assisted_service_ui
111
+ fi
112
+
113
+
92
114
wait_for_cluster_ready
93
115
# Temporary fix for the CI. To be removed once we'll
94
116
# be able to generate the cluster credentials
0 commit comments