Set of internal tools for metal3 development
make setup-local-repos
make update-remote-repos
First, make sure that hardware virtualization is enabled, then you need to source your Openstack credentials
source openstack.rc
Then run
make run-dev-env
If the IP address of the newly created virtual machine is not shown, then run the following
virsh net-dhcp-leases default
ssh into the machine with the metal3ci user
ssh metal3ci@VM_IP
When 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 default
Then 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
make
All 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 ensure
Then for all repositories :
make test
This 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