VScaler: Using Tempest to validate the OpenStack deployment

From Define Wiki
Jump to navigation Jump to search

Run from within Kolla

Docker Images Exist?

Check and make sure the images are built for tempest and rally

[root@house-vscaler ~]# docker images | grep tempest
10.10.10.1:5000/kolla/centos-binary-tempest                       4.0.3               6b5ff759b887        8 weeks ago         667MB

Enable Tempest in the globals.yml file

enable_rally: "yes"
enable_tempest: "yes"

# then down towards the bottom

tempest_image_id: 9f3cae72-56b0-4957-9536-d2c01ce88d64 # (Image ID of cirros from: openstack image list)
tempest_flavor_ref_id: 3 # (openstack flavor list - medium)
tempest_public_network_id: 42eee1c7-475e-43a1-9c1a-3bc583a0cce8 # (openstack network list - public or ext-net)
tempest_floating_network_name: ext-net # name of publci net)

Reconfigure OpenStack

kolla-ansible -i ~/kolla-deploy/multinode reconfigure

# By the end - go to a controller node and check the container is there
[root@controller01-enp2s0 ~]# docker ps | grep temp
da12f9034786        10.10.10.1:4000/kolla/centos-binary-tempest:4.0.3                     "kolla_start"       6 minutes ago       Up 6 minutes                            tempest

Drop into the tempest container

# on the controller
docker exec -it -u root tempest bash
# edit the /etc/tempest/tempest.conf file 
tempest init

# once you have done the init you'll be dropped to the default run locaiton: /usr/share/openstack-tempest-*
(tempest)[root@controller01-enp2s0 openstack-tempest-*]# pwd
/usr/share/openstack-tempest-*
(tempest)[root@controller01-enp2s0 openstack-tempest-*]# ls
etc  logs  tempest_lock
(tempest)[root@controller01-enp2s0 openstack-tempest-*]# 

# Then for a full run
tempest run

Run the min requirements

From: https://www.openstack.org/brand/interop/

# Get the min tests list: 
curl -O  https://refstack.openstack.org/api/v1/guidelines/2016.08/tests?type=required
curl -O https://refstack.openstack.org/api/v1/guidelines/2020.06/tests?type=required

Running Manually

Notes from running within a Centos VM (on vScaler) pointed towards the external / public endpoints

# notes: https://github.com/openstack/refstack-client
#        
# If on a blank centos 7 system
yum -y install epel-release
yum -y install python-pip 
pip install cryptography
yum -y install python-subunit
yum -y install git 

# otherwise:
git clone https://git.openstack.org/openstack/refstack-client
yum -y install screen
cd refstack-client/
./setup_env 

mkdir -p /var/log/kolla/tempest/


wget https://refstack.openstack.org/api/v1/guidelines/2016.08/tests?type=required

# test system is working

./refstack-client test  -c ../tempest.conf -v -- --regex tempest.api.identity.v3.test_tokens.TokensV3Test.test_create_token

# Run the full suite of tests
./refstack-client test -c ../tempest.conf -v --test-list "https://refstack.openstack.org/api/v1/guidelines/2017.09/tests?target=platform&type=required&alias=true&flag=false"
./refstack-client test -c ./tempest.conf --test-list required-201608 


# If an individual tests fails, here's the command to run it again
./refstack-client test -c ../tempest.conf -v -- --regex tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON

# To populate the tempest file: you'll need
openstack image list # get the cirros uuid
openstack network list # get the public network uuid and name

mkdir /var/log/kolla/tempest -p

Sample tempest.conf file

# Sample tempest.conf
<tempest.conf>
[DEFAULT]
debug = False
log_file = tempest.log
use_stderr = False
log_dir = /var/log/kolla/tempest/

[auth]
use_dynamic_credentials=False
test_accounts_file=/root/refstack-client/accounts.yaml
admin_username = admin
admin_password = GeUknNJitWmmbye77E1W9kBNqWnuMRw0Bfk8gvki
admin_project_name = admin
admin_domain_name = default

[dashboard]
dashboard_url = http://185.93.31.98
dashboard_url = http://185.93.31.98/
login_url = http://185.93.31.98/auth/login/
login_url = http://185.93.31.98/auth/login

[service_available]
cinder = yes
neutron = yes
glance = yes
swift = no
nova = yes
heat = yes
horizon = yes
ceilometer = no


[compute]
max_microversion = latest
image_ref = 7461bf0e-c517-40fa-8ac9-da5f55941988
image_ref_alt = 7461bf0e-c517-40fa-8ac9-da5f55941988
flavor_ref = 2
flavor_ref_alt = 3
region = RegionOne

[identity]
disable_ssl_certificate_validation=True
region = RegionOne
auth_version = v3
uri = http://185.93.31.98:5000/v2.0
uri_v3 = http://185.93.31.98:5000/v3


[image]
region = RegionOne
http_image = http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

[network]
region = RegionOne
public_network_id = 901abec9-f6cb-49d5-8494-55caf576fc3a
floating_network_name = ext-net
project_networks_reachable = false

[network-feature-enabled]
ipv6 = false

[object-storage]
region = RegionOne

[orchestration]
region = RegionOne

[volume]
region = RegionOne

[volume-feature-enabled]
api_v1 = False

[validation]
image_ssh_user = cirros
image_ssh_password = cubswin:)

Sample accounts.yaml file

# sample accounts.yaml
<accounts.yaml>
[root@refstack refstack-client]# cat accounts.yaml
- username: 'vscaler'
  tenant_name: 'vscaler'
  password: 'sKlZgstuVt90YD53'

- username: 'david'
  tenant_name: 'david'
  password: 'B8ix0eGCBMX0uclK'

- username: 'admin'
  tenant_name: 'admin'
  password: 'GeUknNJitWmmbye77E1W9kBNqWnuMRw0Bfk8gvki'