moved to https://github.com/openshift/assisted-test-infra.git
This project deploys the OpenShift Assisted Installer in Minikube and spawns libvirt VMs that represent bare metal hosts.
export PULL_SECRET='<pull secret JSON>'
On the bare metal host:
dnf install -y git make
cd /home/test # don't do it on /root it will breaks build image mounts and fail to run
git clone https://github.com/tsorya/test-infra.git
When using this infra for the first time on a host, run:
make create_full_environment
This will install required packages, configure libvirt, pull relevant Docker images, and start Minikube.
There are different options to use test-infra, which can be found in the makefile.
The following is a list of stages that will be run:
Note: Please make sure no previous cluster is running before running a new one (it will rewrite its build files).
To run the full flow, including installation:
make run_full_flow_with_install
Or to run it together with create_full_environment (requires sudo password):
make all
To run the flow without the installation stage:
make run_full_flow
make deploy_nodes or make deploy_nodes_with_install
make redeploy_nodes or make redeploy_nodes_with_install
make redeploy_all or make redeploy_all_with_install
Cleaning test-infra environment.
make destroy
make destroy_nodes
Sometimes you may need to delete all libvirt resources
make delete_all_virsh_resources
Install cluster after nodes were deployed. Can take ClusterId as os env
make install_cluster
make download_iso
make download_iso_for_remote_use
make deploy_ui
make kill_all_port_forwardings
BMI_BRANCH bm-inventory branch to use, default: master
IMAGE path to ISO to spawn VM with, if set vms will be spawn with this iso without creating cluster
NUM_MASTERS number of VMs to spawn as masters, default: 3
WORKER_MEMORY memory for worker VM, default: 8892MB
MASTER_MEMORY memory for master VM, default: 16984MB
NUM_WORKERS number of VMs to spawn as workers, default: 0
SSH_PUB_KEY SSH public key to use for image generation, gives option to SSH to VMs, default: ssh_key/key_pub
PULL_SECRET pull secret to use for cluster installation command, no option to install cluster without it.
CLUSTER_NAME cluster name, used as prefix for virsh resources, default: test-infra-cluster
BASE_DOMAIN base domain, needed for DNS name, default: redhat.com
NETWORK_CIDR network cidr to use for virsh VM network, default: "192.168.126.0/24"
CLUSTER_ID cluster id , used for install_cluster command, default: the last spawned cluster
NETWORK_NAME virsh network name for VMs creation, default: test-infra-net
NETWORK_BRIDGE network bridge to use while creating virsh network, default: tt0
OPENSHIFT_VERSION OpenShift version to install, default: "4.4"
PROXY_URL: proxy URL that will be pass to live cd image
INVENTORY_URL: update bm-inventory config map INVENTORY_URL param with given URL
INVENTORY_PORT: update bm-inventory config map INVENTORY_PORT with given port
AGENT_DOCKER_IMAGE: agent docker image to use, will update bm-inventory config map with given value
INSTALLER_IMAGE: assisted-installer image to use, will update bm-inventory config map with given value
SERVICE: bm-inventory image to use
DEPLOY_TAG: the tag to be used for all images (bm-inventory, assisted-installer, agent, etc) this will override any other os params
make redeploy_all SERVICE=<image to test>
or
export PULL_SECRET='<pull secret JSON>'; make redeploy_all_with_install SERVICE=<image to test>
make redeploy_all AGENT_DOCKER_IMAGE=<image to test>
or
make redeploy_all_with_install AGENT_DOCKER_IMAGE=<image to test>
make redeploy_all INSTALLER_IMAGE=<image to test>
or
export PULL_SECRET='<pull secret JSON>'; make redeploy_all_with_install INSTALLER_IMAGE=<image to test>
make redeploy_all INSTALLER_IMAGE=<image to test> AGENT_DOCKER_IMAGE=<image to test> SERVICE=<image to test>
or
export PULL_SECRET='<pull secret JSON>'; make redeploy_all_with_install INSTALLER_IMAGE=<image to test> AGENT_DOCKER_IMAGE=<image to test> SERVICE=<image to test>
make build_and_push_image IMAGE_NAME=<your full image path> IMAGE_TAG=<default is latest>
make image_build IMAGE_NAME=<your image> IMAGE_TAG=<default is latest>