testing

Revision 2 as of 2016-03-28 14:52:58

Clear message

Deployment Test Guide

The document walks you through doing headless installs and using our testing tools to verify our installer is in top notch shape.

Base system

Testing is done on Ubuntu and using a release of Trusty or later.

Install OpenStack Installer from the PPA

First, the ppas:

$ sudo apt-add-repository ppa:juju/stable
$ sudo apt-add-repository ppa:maas-maintainers/stable
$ sudo apt-add-repository ppa:cloud-installer/experimental
$ sudo apt-get update

Next, needed packages:

$ sudo apt-get install openstack python3-pytest git

Now, grab the tests:

$ git clone https://github.com/Ubuntu-Solutions-Engineering/openstack-tests.git ~/openstack-tests
$ cd ~/openstack-tests
$ py.test -q tests/

Testing the single install path

A sample configuration file to use with the Single install path, save this as config-single.yaml:

headless: true
install_type: Single
openstack_password: pass

We're ready to start our tests:

$ sudo openstack-install -c config-single.yaml
$ py.test -d tests/test_single.py

Testing the multi install path

A sample configuration file for Multi install path, save this as config-multi.yaml:

headless: true
install_type: Multi
maascreds:
  api_host: 172.16.0.1
  api_key: y55mPM2zBzE5wsR9CF:pk7PQ563tZ6AupgZ2y:vMk3qFLuANBJ8dZ6yqHnU8yuMF883HXW
openstack_password: pass

Run the tests:

$ JUJU_BOOTSTRAP_TO=juju-bootstrap-node-1.maas sudo -E openstack-install -c ../config-multi.yaml
$ py.test -d tests/test_multi.py

Testing the Landscape OpenStack Autopilot path

A sample Landscape OpenStack Autopilot config, save this as config-landscape.yaml:

headless: true
install_type: Autopilot
landscapecreds:
  admin_email: foo@bar.com
  admin_name: foo ey bar
  maas_apikey: y55mPM2zBzE5wsR9CF:pk7PQ563tZ6AupgZ2y:vMk3qFLuANBJ8dZ6yqHnU8yuMF883HXW
  maas_server: 172.16.0.1
  system_email: ayo@foo.bar.com
maascreds:
  api_host: 172.16.0.1
  api_key: y55mPM2zBzE5wsR9CF:pk7PQ563tZ6AupgZ2y:vMk3qFLuANBJ8dZ6yqHnU8yuMF883HXW
openstack_password: pass

Run the tests:

$ JUJU_BOOTSTRAP_TO=juju-bootstrap-node-1.maas sudo -E openstack-install -c ../config-landscape.yaml
$ py.test -d tests/test_landscape.py