OpenStack-Charm-Testing about ===== This openstack-charm-testing (aka o-c-t) project contains reference juju deployer bundles, post-deployment configuration scripts, and other templates for Ubuntu OpenStack charm testing. For automated testing, the Ubuntu OpenStack CI engine (aka uosci) consumes the bundles and other templates provided herein. OpenStack package and charm developers also perform manual testing based on this collection of bundles and templates, as well as using the next.yaml and default.yaml bundles as a baseline for edge cases and special testing. Generally, these configurations are tuned for virtual deployments, ie. testing short-lived OpenStack overclouds on top of an OpenStack undercloud. Some pieces may be specific to Canonical Server Team's internal dev cloud ('serverstack'), but can be easily modified for bare metal or other environments. deploy ====== juju-deployer --bootstrap -c default.yaml -d trusty-juno targets exist for most combinations, e.g.: trusty-icehouse trusty-mitaka-proposed xenial-mitaka configure ========= To configure serverstack run: ./configure To configure profiles 'dellstack, stsstack, ppc64el, kernelstack, lxd, multihypervisor', run: ./configure <profile> These "configure" scripts: a) Add an extra port to the neutron-gateway service for OpenStack-on-OpenStack deployments (ie. serverstack, stsstack). b) Configure appropriate external networking c) Download and upload images from ~/images d) Create demo tenants e) Write a tempest configuration file and clone the tempest repository from upstream test - tempest smoke ==================== ``` juju action do heat/0 domain-setup # Manual action required to configure heat permissions cd tempest sudo apt-get install python-dev python-virtualenv libffi-dev libssl-dev libyaml-dev -y virtualenv .venv .venv/bin/pip install -r requirements.txt .venv/bin/pip install python-ceilometerclient python-cinderclient python-glanceclient python-heatclient \ python-keystoneclient python-neutronclient python-novaclient python-swiftclient python-openstackclient pytz # Pinned tempest branch may use old-style run_tempest.sh (ie. profiles/default) # Master tempest branch uses tox to run tests (ie. profiles/keystonev3) ./run_tempest.sh -V --smoke || tox -e smoke # Pinned tempest branch may use old-style run_tempest.sh ``` NOTES: * Some failures are to be expected, depending on deployment environment (firewall, proxy restrictions, capacity, etc.). test - tempest full =================== * Full tests include over 2000 exercises and may take several hours to execute. cd tempest sudo pip install -r requirements.txt ./run_tempest.sh -N -t destroy ======= juju destroy-environment <your-enviro-name> manual instance test example (tools usage) ========================================== * A common use for the bundles and tools might look like this. * See the tune-and-launch script as one common post-deployment time-saver. ``` # deploy a cloud juju-deployer --bootstrap -c default.yaml -d trusty-juno # configure the cloud and add images ./configure (or use configure-dellstack or configure-stsstack) # get overcloud credentials . novarc # check basic cloud and CLI functionality nova hypervisor-list && glance image-list && keystone token-get # shrink flavors just for testing ./tools/flavor_shrink.sh # bump up quotas to a ridiculous level ./tools/quota_million.sh # add security groups ./tools/sec_groups.sh # launch some amd64 instances ./tools/instance_launch.sh 2 cirros ./tools/instance_launch.sh 2 trusty ./tools/instance_launch.sh 2 xenial # optionally add ppc64el images ./tools/images_ppc64el.sh # optionally launch ppc64el instances ./tools/instance_launch.sh 2 trusty-ppc64el ./tools/instance_launch.sh 2 xenial-ppc64el # give floating IPs to all instances ./tools/float_all.sh # ssh to any of the new instances nova list ssh -i ~/testkey.pem <floating-ip-address> ```