Skip to content

Commit 8e02ff8

Browse files
AGENT-1207: automate OVE cluster installation
Automates OVE cluster installation using the Go-based library `go-rod` in headless mode. The workflow fills in cluster details, captures screenshots for each step, downloads credentials, and triggers the install action without requiring a visible browser. Verification steps include: - Confirming cluster installation completion - Running `oc get nodes` and `oc get co` - Ensuring the number of nodes matches values defined in dev-scripts
1 parent cfc7a38 commit 8e02ff8

File tree

3,985 files changed

+1315642
-39
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,985 files changed

+1315642
-39
lines changed

agent/06_agent_create_cluster.sh

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -639,41 +639,21 @@ case "${AGENT_E2E_TEST_BOOT_MODE}" in
639639

640640
check_assisted_install_UI
641641

642-
# Temporarily create a dummy kubeconfig and kubeadmin-password file for the CI
643-
auth_dir=$SCRIPTDIR/$OCP_DIR/auth
644-
mkdir -p $auth_dir
645-
cfg=$auth_dir/kubeconfig
646-
cat << EOF >> ${cfg}
647-
clusters:
648-
- cluster:
649-
certificate-authority-data: LS0tLS1CRUdJTiBGSUNBVLS0tLQo=
650-
server: https://api.test.redhat.com:6443
651-
name: test
652-
contexts:
653-
- context:
654-
cluster: test
655-
user: admin
656-
name: admin
657-
current-context: admin
658-
preferences: {}
659-
users:
660-
- name: admin
661-
user:
662-
client-certificate-data: LS0tLS1CRUdJTiBNBVEUtLS0tLQo=
663-
client-key-data: LS0tLS1CRUdJTiURSBVktLS0tLQo=
664-
EOF
665-
echo "dummy-kubeadmin-password" > $auth_dir/kubeadmin-password
642+
go get github.com/go-rod/rod \
643+
github.com/go-resty/resty/v2 \
644+
github.com/go-rod/rod/lib/launcher \
645+
github.com/go-rod/rod/lib/proto \
646+
github.com/go-rod/rod/lib/utils
647+
648+
mkdir -p $OCP_DIR/auth
649+
rendezvousIP=$(getRendezvousIP)
650+
get_vips
651+
# Simulate user actions as done on the webUI and start cluster installation
652+
RENDEZVOUS_IP=$rendezvousIP OCP_DIR=$OCP_DIR INGRESS_VIP=$INGRESS_VIPS API_VIP=$API_VIPS go run agent/isobuilder/ui_driven_cluster_installation.go
653+
exit 0
666654
;;
667655
esac
668656

669-
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
670-
# Current goal is to only verify if the nodes are booted fine,
671-
# TUI sets the rendezvous IP correctly and UI is accessible.
672-
# The next goal is to simulate adding the cluster details via UI
673-
# and complete the cluster installation.
674-
exit 0
675-
fi
676-
677657
if [ ! -z "${AGENT_TEST_CASES:-}" ]; then
678658
run_agent_test_cases
679659
fi

agent/agent_post_install_validation.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
55

66
source $SCRIPTDIR/common.sh
77

8-
# Temp code skip the execution flow as cluster is not really installed
9-
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
10-
exit 0
11-
fi
12-
138
installed_control_plane_nodes=$(oc get nodes --selector=node-role.kubernetes.io/master | grep -v AGE | wc -l)
149

1510
oc get nodes

0 commit comments

Comments
 (0)