devtest_variablesΒΆ

  1. 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"}
  2. 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"}
  3. 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"}
  4. The tripleo-incubator tools must be available at $TRIPLEO_ROOT/tripleo-incubator. See the devtest documentation which describes how to set that up correctly.

    export PATH=$TRIPLEO_ROOT/tripleo-incubator/scripts:$TRIPLEO_ROOT/dib-utils/bin:$PATH
  5. It’s posible to deploy the Undercloud without a UI and its dependent elements. The dependent image elements in Undercloud are Horizon, Tuskar-UI (not included yet, Tuskar UI element is not finished) and Ceilometer. In Overcloud it is SNMPd image element on every node.

    export USE_UNDERCLOUD_UI=${USE_UNDERCLOUD_UI:-1}
  6. Ironic is used as the default baremetal deployment layer. To use the deprecated Nova-Baremetal deployment layer set USE_IRONIC=0. Note however that as Nova-Baremetal is deprecated in Nova and TripleO support for it will be removed once it is removed from Nova.

    export USE_IRONIC=${USE_IRONIC:-1}
    
    if [ 0 -eq "$USE_IRONIC" ]; then
        echo "Nova-baremetal is deprecated, please migrate to Ironic ASAP." >&2
    fi
  7. Set a list of image elements that should be included in all image builds. Note that stackuser is only for debugging support - it is not suitable for a production network. This is also the place to include elements such as pip-cache or pypi-openstack if you intend to use them.

    export DIB_COMMON_ELEMENTS=${DIB_COMMON_ELEMENTS:-"stackuser common-venv"}
  8. If you have a specific Ubuntu mirror you want to use when building images.

    # export DIB_COMMON_ELEMENTS="${DIB_COMMON_ELEMENTS} apt-sources"
    # export DIB_APT_SOURCES=/path/to/a/sources.list to use.
    
  9. These elements are required for tripleo in all images we build.

    export DIB_COMMON_ELEMENTS="${DIB_COMMON_ELEMENTS} use-ephemeral"
  10. Choose the deploy image element to be used. deploy-kexec will relieve you of the need to wait for long hardware POST times, however it has known stability issues (please see https://bugs.launchpad.net/diskimage-builder/+bug/1240933). If stability is preferred over speed, use the deploy-baremetal image element (default) or deploy-ironic if using ironic.

    if [ $USE_IRONIC -eq 0 ]; then
        # nova baremetal
        export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-baremetal}
        export DEPLOY_NAME=deploy-ramdisk
    else
        # Ironic
        export DEPLOY_IMAGE_ELEMENT=${DEPLOY_IMAGE_ELEMENT:-deploy-ironic}
        export DEPLOY_NAME=deploy-ramdisk-ironic
    fi
  11. A messaging backend is required for the seed, undercloud, and overcloud control node. It is not required for overcloud computes. The backend is set through the *EXTRA_ARGS. rabbitmq-server is enabled by default. Another option is qpidd. For overclouds we also use *EXTRA_ARGS to set the cinder backend. cinder-tgt is enabled by default. Another option is cinder-lio.

    export SEED_DIB_EXTRA_ARGS=${SEED_DIB_EXTRA_ARGS:-"rabbitmq-server"}
    export UNDERCLOUD_DIB_EXTRA_ARGS=${UNDERCLOUD_DIB_EXTRA_ARGS:-"rabbitmq-server"}
    export OVERCLOUD_CONTROL_DIB_EXTRA_ARGS=${OVERCLOUD_CONTROL_DIB_EXTRA_ARGS:-'rabbitmq-server cinder-tgt'}
  12. Set distribution used for VMs (fedora, opensuse, ubuntu). If unset, this will match TRIPLEO_OS_DISTRO, which is automatically gathered by devtest and represent your build host distro (where the devtest code runs).

    For Fedora, set SELinux permissive mode(currently the default when using Fedora):

    export NODE_DIST="fedora selinux-permissive"

    For openSUSE, use:

    export NODE_DIST="opensuse"

    For Ubuntu, use:

    export NODE_DIST="ubuntu"
  13. 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}
  14. 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}
  15. 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"}
  16. 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}
  17. You need to make the tripleo image elements accessible to diskimage-builder:

    export ELEMENTS_PATH=${ELEMENTS_PATH:-"$TRIPLEO_ROOT/tripleo-image-elements/elements"}
  18. 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"}
  19. 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

Previous topic

devtest

Next topic

devtest_setup

This Page