Last active
December 24, 2015 09:49
-
-
Save sw00/6779815 to your computer and use it in GitHub Desktop.
Getting started with CloudCAFE, a testing framework for Openstack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You will first need to clone three repositories from github: | |
1. OpenCAFE: this is core driver for writing and running tests. It contains a lot of base classes and the `cafe-runner` script used to collect and run cloudcafe tests. | |
`git clone https://github.com/stackforge/opencafe.git` | |
2. CloudCAFE: the framework built on top of OpenCAFE. This consists of the API used to write tests and offers easy objects to access Openstack services. | |
`git clone https://github.com/stackforge/cloudcafe.git` | |
3. CloudRoast: the repository where the tests for Openstack are implemented. These make use of CloudCAFE as a framework and abstracts enough detail so you can focus on writing tests instead of Openstack internals. | |
`git clone https://github.com/stackforage/cloudroast.git` | |
## Installation | |
You will have to install the repositories, they depend on each other run tests and plug in quite nicely. `cd` into each folder and run `pip install .` | |
## Configuration | |
During the installation of CloudCafe, a hidden folder would've been created in `$HOME` directory called `.opencafe/`, this contains the logs and configuration that `cafe-runner` will use to run tests against your Openstack environment. There are example configuration files in the directory `~/.opencafe/configs/` with a subfolder for each Openstack product. | |
A configuration file for testing Openstack's Images Service (Glance) may look like this: | |
[marshalling] | |
serialize_format=json | |
deserialize_format=json | |
[user_auth_config] | |
endpoint=http://192.168.0.10:35357 | |
strategy=keystone | |
[user] | |
# This should not be an admin user | |
username=admin | |
password=ostackdemo | |
tenant_name=admin | |
[images] | |
base_url=http://192.168.0.100:9292 | |
api_version=v1 | |
primary_image=<image_id> | |
secondary_image=<different_image_id> | |
image_status_interval=15 | |
snapshot_timeout=900 | |
remote_image=http://example.com/some_image.iso | |
http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-arm-uec.targ.gz | |
## Running tests | |
To see how to run tests you can use the `cafe-runner` script that will have been added to your PATH when opencafe was installed. | |
* Usage: `cafe-runner <product> <config>` | |
or Just type `cafe-runner help` for more help. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment