Skip to content

Commit 3c99b3a

Browse files
Review suggestions
1 parent 8f28b0d commit 3c99b3a

7 files changed

+39
-52
lines changed

Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ agent_plus_add_node: agent agent_add_extraworker_nodes
1717
# enabling cluster installation in disconnected environments without requiring a registry.
1818
# TODO: Enhance agent_create_cluster to programmatically interact with the UI to initiate cluster installation.
1919
# Currently, agent_create_cluster boots the agent OVE ISO, configures the rendezvousIP and verifies if UI is running.
20-
agent_iso_no_registry: agent_requirements requirements configure agent_clone_agent_installer_utils agent_configure agent_create_cluster
20+
agent_iso_no_registry: agent_requirements requirements configure agent_configure agent_create_cluster
2121

2222
agent_requirements:
2323
./agent/01_agent_requirements.sh
@@ -52,8 +52,6 @@ agent_remove_extraworker_nodes:
5252
agent_post_install_validation:
5353
./agent/agent_post_install_validation.sh
5454

55-
agent_clone_agent_installer_utils:
56-
./agent/08_agent_clone_agent_installer_utils.sh
5755

5856
redeploy: ocp_cleanup ironic_cleanup build_installer ironic install_config ocp_run bell
5957

agent/01_agent_requirements.sh

+20-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ set -o pipefail
44

55
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
66

7+
LOGDIR=${SCRIPTDIR}/logs
8+
source $SCRIPTDIR/logging.sh
79
source $SCRIPTDIR/common.sh
810
source $SCRIPTDIR/agent/common.sh
911
source $SCRIPTDIR/utils.sh
12+
source $SCRIPTDIR/ocp_install_env.sh
1013
source $SCRIPTDIR/validation.sh
1114

1215
early_deploy_validation
1316

17+
function clone_agent_installer_utils() {
18+
# Clone repo, if not already present
19+
if [[ ! -d $OPENSHIFT_AGENT_INSTALER_UTILS_PATH ]]; then
20+
sync_repo_and_patch go/src/github.com/openshift/agent-installer-utils https://github.com/openshift/agent-installer-utils.git
21+
fi
22+
}
23+
1424
if [[ -z ${AGENT_E2E_TEST_SCENARIO} ]]; then
1525
printf "\nAGENT_E2E_TEST_SCENARIO is missing or empty. Did you forget to set the AGENT_E2E_TEST_SCENARIO env var in the config_<USER>.sh file?"
1626
invalidAgentValue
@@ -52,5 +62,14 @@ if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISCSI" ]]; then
5262
fi
5363

5464
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" == "ISO_NO_REGISTRY" ]]; then
55-
sudo dnf -y install xorriso coreos-installer
65+
sudo dnf -y install xorriso coreos-installer syslinux
66+
67+
early_deploy_validation
68+
69+
write_pull_secret
70+
71+
# Extract an updated client tools from the release image
72+
extract_oc "${OPENSHIFT_RELEASE_IMAGE}"
73+
74+
clone_agent_installer_utils
5675
fi

agent/05_agent_configure.sh

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source $SCRIPTDIR/agent/common.sh
1414
source $SCRIPTDIR/oc_mirror.sh
1515

1616
early_deploy_validation
17+
mkdir -p $OCP_DIR
1718

1819
export CLUSTER_NAMESPACE=${CLUSTER_NAMESPACE:-"cluster0"}
1920

agent/06_agent_create_cluster.sh

+15-19
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function attach_agent_iso_no_registry() {
177177
sudo virt-xml ${name} --edit target=sdc --disk="boot_order=2" --start
178178
echo "Waiting for 3 mins to arrive at agent-tui screen"
179179
sleep 180
180-
./agent/e2e/agent-tui/test-no-registry-agent-tui.sh $name
180+
./agent/e2e/agent-tui/automate-no-registry-agent-tui.sh $name
181181
echo "Finished configuring the rendezvousIP via agent-tui for $name"
182182
done
183183
}
@@ -551,19 +551,22 @@ case "${AGENT_E2E_TEST_BOOT_MODE}" in
551551
asset_dir=$SCRIPTDIR/$OCP_DIR/iso_builder
552552
mkdir -p ${asset_dir}
553553
create_agent_iso_no_registry ${asset_dir}
554-
554+
555555
attach_agent_iso_no_registry master $NUM_MASTERS
556556
attach_agent_iso_no_registry worker $NUM_WORKERS
557557

558-
# In case of SNO, wait for additional 3 minutes for the node
559-
# to finish booting up and make sure UI is up
560-
if [[ "${NUM_MASTERS}" == "1" ]]; then
561-
sleep 180
562-
fi
563558
check_assisted_install_UI
564559
;;
565560
esac
566561

562+
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" != "ISO_NO_REGISTRY" ]]; then
563+
# Current goal is to only verify if the nodes are booted fine,
564+
# TUI sets the rendezvous IP correctly and UI is accessible.
565+
# The next goal is to simulate adding the cluster details via UI
566+
# and complete the cluster installation.
567+
exit 0
568+
fi
569+
567570
if [ ! -z "${AGENT_TEST_CASES:-}" ]; then
568571
run_agent_test_cases
569572
fi
@@ -591,24 +594,17 @@ if [[ ! -z $AGENT_OPERATORS ]]; then
591594
put_operator_file
592595
fi
593596

594-
# Current goal is to only verify if the nodes are booted fine,
595-
# TUI sets the rendezvous IP correctly and UI is accessible.
596-
# The next goal is to simulate adding the cluster details via UI
597-
# and complete the cluster installation.
598-
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" != "ISO_NO_REGISTRY" ]]; then
599-
wait_for_cluster_ready
600-
fi
597+
598+
wait_for_cluster_ready
601599

602600
if [ ! -z "${AGENT_DEPLOY_MCE}" ]; then
603601
mce_complete_deployment
604602
fi
605603

606604
# e2e test configuration
607-
if [[ "${AGENT_E2E_TEST_BOOT_MODE}" != "ISO_NO_REGISTRY" ]]; then
608-
# Configure storage for the image registry
609-
oc patch configs.imageregistry.operator.openshift.io \
610-
cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}},"managementState":"Managed"}}'
611-
fi
605+
# Configure storage for the image registry
606+
oc patch configs.imageregistry.operator.openshift.io \
607+
cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}},"managementState":"Managed"}}'
612608

613609
if [[ ! -z "${ENABLE_LOCAL_REGISTRY}" ]]; then
614610
# Configure tools image registry and cluster samples operator

agent/08_agent_clone_agent_installer_utils.sh

-28
This file was deleted.

config_example.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@ set -x
795795
# The default value for AGENT_E2E_TEST_BOOT_MODE is 'ISO'.
796796
# For the openshift-appliance flow, set the boot mode to 'DISKIMAGE'.
797797
# To generate PXE assets, set the boot mode to 'PXE'.
798-
# To generate an ISO without registry a.k.a. OVE ISO, set the boot mode to 'ISO_NO_REGISTRY'.
798+
# To generate an ISO that can be used in a disconnected environment
799+
# without using a registry a.k.a. OVE ISO, set the boot mode to 'ISO_NO_REGISTRY'.
799800
# AGENT_E2E_TEST_BOOT_MODE=ISO
800801

801802
# Uncomment and set the following value to "true" to enable a test scenario

0 commit comments

Comments
 (0)