6.2 KiB
KloudBuster Git Quick Start Guide
This is the default installation method for code development.
It is recommended to run KloudBuster inside a virtual environment. However, it can be skipped if installed in a dedicated VM.
1. Install Dependencies and Clone Git Repository
Quick installation on Ubuntu/Debian
$ sudo apt-get install python-dev python-virtualenv git git-review qemu-utils
$ # create a virtual environment
$ virtualenv ./vkb
$ source ./vkb/bin/activate
$ git clone https://github.com/openstack/kloudbuster.git
$ cd kloudbuster
$ pip install -r requirements-dev.txt
Quick installation on RHEL/Fedora/CentOS
$ sudo yum install python-devel python-virtualenv git qemu-img
$ # create a virtual environment
$ virtualenv ./vkb
$ source ./vkb/bin/activate
$ git clone https://github.com/openstack/kloudbuster.git
$ cd kloudbuster
$ pip install -r requirements-dev.txt
Quick installation on MacOSX
KloudBuster can run natively on MacOSX.
First, download XCode from App Store, then execute below commands:
$ # Download the XCode command line tools
$ xcode-select --install
$ # Install pip
$ sudo easy_install pip
$ # Install python virtualenv
$ sudo pip install virtualenv
$ # create a virtual environment
$ virtualenv ./vkb
$ source ./vkb/bin/activate
$ git clone https://github.com/openstack/kloudbuster.git
$ cd kloudbuster
$ pip install -r requirements-dev.txt
If you need to run the KloudBuster Web UI you need to install coreutils (you can skip this step if you do not run the KloudBuster Web server):
$ # If you need to run KloudBuster Web UI,
$ # coreutils needs to be installed using Homebrew.
$ # Refer here for the steps to install Homebrew on Mac:
$ # http://brew.sh/
$ brew install coreutils
$ # Follow instructions to add the new directory in the path
$ export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
$ # Verify that you have stdbuf working
$ stdbuf --help
Usage: stdbuf OPTION... COMMAND
Run COMMAND, with modified buffering operations for its standard streams.
Mandatory arguments to long options are mandatory for short options too.
-i, --input=MODE adjust standard input stream buffering
-o, --output=MODE adjust standard output stream buffering
-e, --error=MODE adjust standard error stream buffering
--help display this help and exit
--version output version information and exit
If MODE is 'L' the corresponding stream will be line buffered.
This option is invalid with standard input.
If MODE is '0' the corresponding stream will be unbuffered.
Otherwise MODE is a number which may be followed by one of the following:
KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.
In this case the corresponding stream will be fully buffered with the buffer
size set to MODE bytes.
NOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does
for example) then that will override corresponding changes by 'stdbuf'.
Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O,
and are thus unaffected by 'stdbuf' settings.
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/stdbuf>
or available locally via: info '(coreutils) stdbuf invocation'
Verify installation
To verify kloudbuster is installed, from the root of the kloudbuster repository type:
$ python kloudbuster/kloudbuster.py --help
2. Upload the KloudBuster VM image
Follow the steps <upload_kb_image>
to upload the
KloudBuster VM image to the OpenStack cloud under test.
3. Download the openrc file
Using the Horizon dashboard, download the openrc file (ProjectAPI Access then click on "Download OpenStack RC File"). It is best to use the admin user to run KloudBuster as much as possible (otherwise there are restrictions on what you can do). The examples below assume the openrc file is saved at the root of the kloudbuster git repository with the name "admin-openrc.sh" and the password is "admin".
4. Running the KloudBuster CLI
Run the default HTTP data plane scale test
The default HTTP scale test is described here <default_http_scale>
.
python kloudbuster/kloudbuster.py --tested-rc admin-openrc.sh --tested-passwd admin
Run the default storage scale test
The default storage scale test is described here <default_storage_scale>
.
python kloudbuster/kloudbuster.py --tested-rc admin-openrc.sh --tested-passwd admin --storage
Run KloudBuster with a custom configuration
The default KloudBuster configuration file is in cfg.scale.yaml. You can make a copy of it in "kb.cfg":
cp kloudbuster/cfg.scale.yaml kb.cfg
You can then edit kb.cfg and modify it appropriately. To run KloudBuster with the custom configuration:
python kloudbuster/kloudbuster.py --tested-rc admin-openrc.sh --tested-passwd admin --config kb.cfg
5. Running KloudBuster as a WebUI/REST Server
python kloudbuster/start_server.py&
You should see a message similar to the one below, which indicates the server is up running:
Starting server in PID 27873
serving on 0.0.0.0:8080, view at http://127.0.0.1:8080
By default KloudbBuster will listen on port 8080.
How to use the Web UI <webui_usage>
How to use the REST interface <rest_usage>
To terminate the server, simply use the kill command on the server pid.