diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 00000000..4643ecdc --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +function install { + echo_summary "Installing whitebox-tempest-plugin" + setup_dev_lib "whitebox-tempest-plugin" +} + +function configure { + echo_summary "Configuring whitebox-tempest-plugin options" + iniset $TEMPEST_CONFIG whitebox ctlplane_ssh_username $STACK_USER + iniset $TEMPEST_CONFIG whitebox ctlplane_ssh_private_key_path $WHITEBOX_PRIVKEY_PATH + + # This needs to come from Zuul, as devstack itself has no idea how many + # nodes are in the env + iniset $TEMPEST_CONFIG whitebox max_compute_nodes $MAX_COMPUTE_NODES + + iniset $TEMPEST_CONFIG whitebox-nova-compute config_path "$WHITEBOX_NOVA_COMPUTE_CONFIG_PATH" + iniset $TEMPEST_CONFIG whitebox-nova-compute restart_command "$WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND" + + iniset $TEMPEST_CONFIG whitebox-database user $DATABASE_USER + iniset $TEMPEST_CONFIG whitebox-database password $DATABASE_PASSWORD + iniset $TEMPEST_CONFIG whitebox-database host $DATABASE_HOST +} + +if [[ "$1" == "stack" ]]; then + if is_service_enabled tempest; then + if [[ "$2" == "install" ]]; then + install + elif [[ "$2" == "test-config" ]]; then + configure + fi + fi +fi diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 00000000..cb0b30ef --- /dev/null +++ b/devstack/settings @@ -0,0 +1,4 @@ +NOVA_FILTERS="$NOVA_FILTERS,NUMATopologyFilter" + +WHITEBOX_NOVA_COMPUTE_CONFIG_PATH=${WHITEBOX_NOVA_COMPUTE_CONFIG_PATH:-/etc/nova/nova-cpu.conf} +WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND=${WHITEBOX_NOVA_COMPUTE_RESTART_COMMAND:-'systemctl restart devstack@n-cpu'}