The devtest scripts require access to the libvirt system URI. If running against a different libvirt URI you may encounter errors. Export LIBVIRT_DEFAULT_URI to prevent devtest using qemu:///system Check that the default libvirt connection for your user is qemu:///system. If it is not, set an environment variable to configure the connection. This configuration is necessary for consistency, as later steps assume qemu:///system is being used.
export LIBVIRT_DEFAULT_URI=${LIBVIRT_DEFAULT_URI:-"qemu:///system"}
The VMs created by devtest will use a virtio network device by default. This can be overridden to use a different network driver for interfaces instead, such as e1000 if required.
export LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"virtio"}
By default the node volumes will be created in a volume pool named ‘default’. This variable can be to used to specify a custome volume pool. This is useful in scenarios where the default volume pool cannot accommodate the storage requirements of the nodes.
Note that this variable only changes the volume pool for the nodes. Seed image will still end up in /var/lib/libvirt/images.
export LIBVIRT_VOL_POOL=${LIBVIRT_VOL_POOL:-"default"}
The tripleo-incubator tools must be available at $TRIPLEO_ROOT/tripleo-incubator. See the devtest documentation which describes how to set that up correctly.
Set the number of baremetal nodes to create in the virtual test environment.
# Node definitions are cheap but redeploying testenv's is not.
# Set NODE_CNT high enough for typical CI and Dev deployments for the
# forseeable future
export NODE_CNT=${NODE_CNT:-15}
Set size of root partition on our disk (GB). The remaining disk space will be used for the persistent ephemeral disk to store node state.
export ROOT_DISK=${ROOT_DISK:-10}
Set the disk bus type. The default value is ‘sata’. But if the VM is going to be migrated or saved to disk, then ‘scsi’ would be more appropriate for libvirt.
export LIBVIRT_DISK_BUS_TYPE=${LIBVIRT_DISK_BUS_TYPE:-"sata"}
Set number of compute, control and block storage nodes for the overcloud. Only a value of 1 for OVERCLOUD_CONTROLSCALE is currently supported.
export OVERCLOUD_COMPUTESCALE=${OVERCLOUD_COMPUTESCALE:-2}
export OVERCLOUD_CONTROLSCALE=${OVERCLOUD_CONTROLSCALE:-1}
export OVERCLOUD_BLOCKSTORAGESCALE=${OVERCLOUD_BLOCKSTORAGESCALE:-0}
These optional variables can be set to remove dead nodes. See the merge.py help for details of use. These example lines would remove Compute1 and Compute3, and Control2 and Control4.
export OVERCLOUD_COMPUTE_BLACKLIST=1,3
export OVERCLOUD_CONTROL_BLACKLIST=2,4
You need to make the tripleo image elements accessible to diskimage-builder:
export ELEMENTS_PATH=${ELEMENTS_PATH:-"$TRIPLEO_ROOT/tripleo-image-elements/elements"}
Set the datafile to use to describe the ‘hardware’ in the devtest environment. If this file already exists, you should skip running devtest_testenv.sh as it writes to the file
export TE_DATAFILE=${TE_DATAFILE:-"$TRIPLEO_ROOT/testenv.json"}
By default Percona XtraDB Cluster is used when installing MySQL database, set USE_MARIADB=1 if you want use MariaDB instead, MariaDB is used by default on Fedora based distributions because MariaDB packages are included directly in distribution
if [[ $NODE_DIST =~ .*(fedora|rhel|centos).* ]] ; then
export USE_MARIADB=${USE_MARIADB:-1}
else
export USE_MARIADB=0
fi