Set of internal tools for metal3 development
make setup-local-reposmake update-remote-reposFirst, make sure that hardware virtualization is enabled, then you need to source your Openstack credentials
source openstack.rcThen run
make run-dev-envIf the IP address of the newly created virtual machine is not shown, then run the following
virsh net-dhcp-leases defaultssh into the machine with the metal3ci user
ssh metal3ci@VM_IPWhen running make as described below, if you hit an issue about
the default network, saying that it is already in use by ens2, you need
to modify the file /etc/libvirt/qemu/networks/default.xml to
change the CIDR to not use the same CIDR as ens2 or any other interface.
Then run
sudo virsh net-define /etc/libvirt/qemu/networks/default.xml
sudo virsh net-start defaultThen you can set up the environment :
git clone https://github.com/metal3-io/metal3-dev-env.git
export CONTAINER_RUNTIME=docker
cd metal3-dev-env
makeAll the following actions take place in the container. Otherwise check you have installed everything properly (go 1.18, bazel, etc.)
If you want to run the metal3 tests, you first need to fetch the dependencies.
dep ensureThen for all repositories :
make testThis repository is mainly used for keeping scripts related to building node and host images (OS). Once, new changes are pushed related to node images, there is no way to test if those newly build images are going to work or not when running integration tests in metal3-dev-env repository. For that reason, and also to detect any possible issues early enough, we can run metal3-dev-tools integration tests on a PR in this repository which:
- Creates and pushes temporary node images to the artifactory from the changes on the PR;
- Pulls and uses those images while running integration tests on PR;
- Deletes those images from the artifactory at the the end of the integration tests.
To trigger metal3-dev-tools integration tests on a PR, please use the following phrases:
- /test-integration-metal3-dev-tools-ubuntu runs metal3-dev-tools integration tests on Ubuntu
- /test-integration-metal3-dev-tools-centos runs metal3-dev-tools integration tests on CentOS