Testing

Why?

  • Changes
  • Regression
  • Impact of outside events (Network, Storage)
  • Monitoring (over time)
  • Confidence (I have a working environment)
  • Recognition of potential problems (in advance)

Challenges

  • My specific configuration
  • My specific implementation / deployment / infra
  • Networking
  • Changes outside of my environment ( BGP, Storage, Object Storage, DNS)

Tempest

Install


Release Notes Tempest v45

# Install tempest on testing node                                           📋
sudo apt install build-essential python3.12-dev -y

python3 -m venv ~/venv/tempest
echo ""                                   >> ~/.profile
echo "source ~/venv/tempest/bin/activate" >> ~/.profile
source ~/.profile

pip install -U pip --proxy http://proxy.wrx.sckt.net:3128

pip install --proxy http://proxy.wrx.sckt.net:3128 -r \
  https://raw.githack.com/codecap/openstack-workshop/main/testing/tempest/requirements.txt

Tempest

Configuration

# Copy admin-openrc.sh file from deployment to testing node                 📋
scp ~/openstack/custom-config/wrx/admin-openrc.sh testing.mgmt:~/

# On testing node source your openr(credentials) file
source ~/admin-openrc.sh

# The configuration script
CONF_SCRIPT=https://raw.githack.com/codecap/openstack-workshop/main/testing/tempest/configure.sh

# Review
curl --proxy http://proxy.wrx.sckt.net:3128 -L $CONF_SCRIPT

# Run
curl --proxy http://proxy.wrx.sckt.net:3128 -L $CONF_SCRIPT | bash

# Review generated config
cd  ~/tempest-45
cat etc/tempest.conf

# Create a list of available tests
stestr list > tests-available.list
# Create a list of smoketests
cat tests-available.list | grep smoke > smoke-tests.list

# How to run
tempest run --load-list smoke-tests.list  --regex \
  tempest.api.network.test_security_groups.SecGroupTest.test_list_security_groups

Scripts

openstack-health-monitor

mkdir testing
git clone https://github.com/SovereignCloudStack/openstack-health-monitor.git

export IMG=ubuntu-24.04
export JHIMG=$IMG
export FLAVOR=m1.small
export JHFLAVOR=$FLAVOR
export ADDJHVOLSIZE=10

source ~/venv/ansible/bin/activate

source ~/automation-openrc.sh

Run

# -o    - translate nova/cinder/neutron/glance into openstack client commands
# -C    - full Connectivity check: Every VM pings every other
# -D    - create all VMs with one API call (implies -d -P)
# -n 1  - number of VMs to create
# -B    - measure TCP BW b/w VMs (iperf3)
# -T    - assign tags to resources; use to clean up floating IPs
# -s 10 - sends stats as well once per day (or every SH hours), not just alarms
# -W 45 - sets error wait (VM only): 0-inf seconds or neg value for interactive wait

./api_monitor.sh -o -C -D -n 1 -B -T -s 10 -W 45