64 Commits

Author SHA1 Message Date
Oded Le'Sage
b592dd9325 Enhance Shaker to support custom user options
Issue: Some of our more complex tests require injecting "custom" data
into the heat stacks in order to run correctly. For example in order to
run certain Contrail based tests we need to set "contrail-asn:(some
asn number)". The asn number varies between cloud deployments, so we
dynamically set this field in a Heat environment file. However this is
a very specific field that other Shaker users might not need or
understand it, so this commit allows for a more generic approach.

This commit aims to let the user specify "custom" user defined options
similar to the matrix config parameter. Since this opts is not
directly referenced anywhere in code it's main use is to inject data
into heat environment files. The YAML format allows flexibility for any
object the user might want to add during their scenario
run or it can be left blank without any issues.

Change-Id: I96b6e578eb59813e5e0c8a2fe7a14c5ecc369be7
2018-11-06 16:53:26 -06:00
Oded Le'Sage
abe9fbd877 Enhance Shaker to provide the ability to define support templates
Issue: At AT&T we have large complex test stacks that make putting
everything into a single heat template and environment file very
cumbersome. Large monolithic templates make it harder to debug failures,
maintain, extend, and organize these tests. In order to solve this issue
we have enhanced Shaker to support specifying support templates with
environment files.

This commit enhances Shaker to add the ability to define
support_templates with env_files in test definitions.

Support templates spin up "support type" resources before the actual
test stack is spun up. This could range from networks, to volumes, to
anything Heat can create. The support resources do not have any reliance
on resources created in the test stack, they set up a "foundation" for
the test stack. The test stack can then reference these resources by
name. (e.g. assume they exist by the time the test stack is spun up)

While the example provided with this commit is simple, and the support
networks that get created are not directly used in the test, it
shows the basic principles of how support templates work.

As a real-world example and to give an idea of the complexity this
enhancement is trying to solve, we have a test definition that looks
like this:

  support_templates:
  -
    Base:
      template: templates/module_1_base.yaml
      env_file: env/module_1_base.env
  -
   SI_L2:
      template: templates/module_2_si_l2.yaml
      env_file: env/module_2_si_l2.env
  -
   SI_L3:
      template: templates/module_3_si_l3.yaml
      env_file: env/module_3_si_l3.env

  template: templates/module_4_master_servant.yaml
  env_file: env/module_4_master_servant.env

The first support stack (module_1) sets up some "base" network
resources. This stack provides some network resources used by the SI_L2
and SI_L3 support stacks.

SI_L2 is a support stack with 2 VMs that do Contrail service chaining
on an L2 network.

SI_L3 is a support stack with 2 VMs that do Contrail service chaining
on an L3 network.

Then the test stack (module 4) gets spun up on N amount of computes and
runs traffic across the SI_L2 and SI_L3 service chained networks.

After the test run all stacks are cleaned up

Using the concept of support stacks allows us to beter organize and
maintain our complex tests and allows for faster debugging due to the
"layered" nature of the setup.

Support templates also allow us to spin up more Shaker test threads
that use the same support templates simultaneously to better simulate
real-world network traffic. It also reduces the set up time of certain
tests we have since the support stacks already exist.

This enhancement does not alter existing Shaker functionality and
is fully backwards compatible.

Change-Id: Ife51bc55874c6ec4faac221bab8f9f0eea175fdc
2018-11-05 11:12:14 -06:00
Ilya Shakhat
f5c3a09535 Do not list test scenarios in CLI help
Scenarios under `test/` subfolder are used for integration testing
or as samples. Skip them in CLI help and keep only production-ready.

Change-Id: I69a428480055c825aa3b590f02b4c09b346a6012
2018-11-05 16:05:32 +01:00
Oded Le'Sage
8b709324de Add ability to override AZ and compute_nodes via cfg or cli
Problem: We have large compute deployments (400+ computes) but different
groups are constantly working in the same lab/deployments so it becomes
unrealistic to try and run tests using all computes because the Shaker
tests could disrupt other work. I know the accomdation is set in test
definitions, and they can changed, but that is also cumbersome when
you're running a large number of tests in a single run.

This commit aims to solve the problem by allowing Shaker users to have
more control over the availaibity_zone and compute_nodes accommodation
by specifying the fields in either the cfg input file or as cli
arguments.

This change would allow Shaker to "override" what's been set in the test
definition and act like a "global" setting for all tests in a
single run to use a particular AZ and/or fixed number of computes_nodes
without having to alter N amount of tests.

Change-Id: I5459150a0eac9bed6a6a62a126bd9ec0648941fe
2018-10-19 11:19:03 -05:00
Oded Le'Sage
accb9a9d3b Add identity API v3 support for os-interface
At AT&T our Openstack Airship deployments use identity api v3, but
require the os-interface parameter to be passed, in order to correctly
authenticate.

This commit adds support for specifying and using os-interface in Shaker

Change-Id: Icad7fc823dc302632bebe5d18f5cfe34bcc00b06
2018-10-17 17:44:27 -05:00
Ilya Shakhat
157bf3700e Update generated docs for CLI tools and config template
Change-Id: If7633dbae76870674a05e0059fd0f063b3283f8b
2018-09-11 14:05:50 +02:00
Ilya Shakhat
6fc8d21b3b Add osprofiler support
OpenStack profiling can be enabled by setting parameter --os-profile.
The feature requires osprofiler library. If library is not present
a warning message is shown.

Change-Id: I2c1b0cbd99450236b3720e19700f99cfdc14e378
Closes-Bug: 1666585
2017-08-11 09:27:56 +02:00
Sai Sindhur Malleni
9f1b65464a Add support for CentOS7 through diskimage-builder
This commit adds image builder support for CentOS by generalizing the
image_elements using package-installs.yaml ad pkg-map. A few other
executables have been modified to ensure compatibility. Ubuntu is
kept as default.

Change-Id: I4122155d82ad64867efdb6d88536624f677c207d
2017-07-17 08:52:15 -04:00
Ilya Shakhat
ecbd683e27 Integrate diskimage-builder into shaker-image-builder
Shaker-image-builder can build images in one of two modes:
 * "heat" - classic approach with help of Heat, but it also
   requires Glance v1
 * "dib" - make local image using diskimage-builder and then
   upload into Glance
The mode can be selected automatically (falls to "dib" if no
Glance v1 present) or specified manually (--image-builder-mode).

Change-Id: Ibbcb99e85012ecab012612dccea38d40100625f5
2017-03-03 17:33:22 +04:00
Ilya Shakhat
c1a4260e1a Install pyshaker into images and make Xenial a default
* Deprecate pyshaker-agent and use full pyshaker package instead.
* Upgrade Ubuntu image to Xenial and remove Trusty-based

Change-Id: I01762f648a79cc5e90eb55e757975563ed1fc06d
2017-03-01 13:41:21 +04:00
Ilya Shakhat
2b739b2e9b Bump dependencies versions
Sync with the current OpenStack global requirements (Okata)

Change-Id: Icc6dd939fcf500a1a2442c0ad1f6904b5bd452f8
2017-03-01 11:29:34 +04:00
Ilya Shakhat
e05ea7d805 Add Ubuntu Xenial template for Shaker image builder
Change-Id: I92c96eb191298de6895be8ec62b52cf3f89ac4ff
2016-10-13 22:17:38 +03:00
Ilya Shakhat
9cf0b4610c Run multiple scenarios at once
Option --scenario now accepts list of scenarios. They are executed
one-by-one, results are aggregated and stored in a single json
file or report. New option --artifacts-dir allows to store individual
results as well.

Change-Id: If9b8f0650635a8e2534f757de158a24461f045ba
2016-08-18 19:18:38 +03:00
Ilya Shakhat
73c3995e77 Cleanup in option definition and the docs
Change-Id: Ifc3745f205fec406757c9892e02e2a503dc495e5
2016-08-04 19:37:11 +03:00
Ilya Shakhat
1f9c4d0a21 Pack Shaker into container
Now Shaker can be run in Docker container! The container
does the whole work: it creates image, runs the scenario
and cleans everything up.

Change-Id: I9cbcb7e79d08f9526cf1ee8f3ccafab34d3935c2
2016-08-04 15:36:41 +03:00
Artem Yasakov
0497eb2511 Saving output file with an empty output option
Output file will save to /tmp/shaker_<time_execution>.json by
default

Change-Id: Ifb159b77fa0bf4a42ea4d631f66d17633bad71dd
2016-07-05 12:42:24 +03:00
dongwenshuai
f56d38c07a Modify shaker.conf about some help message
Change-Id: I650c4835cf371ec215172e0a2624047cf0febe51
2016-07-01 05:15:07 -04:00
Jenkins
fc7597518d Merge "Make Shaker flavor parameters configurable" 2016-06-16 09:29:42 +00:00
Sai Sindhur Malleni
9506238888 Make DNS nameserver configurable
Currently the nameserver for the subnets is set by default to
Google Public DNS by the heat templates. This patch makes the
dns nameserver configurable keeping the defaults standard. All
the heat templates are fixed to reflect the same.

+ Implementing Ilya's suggestions

Change-Id: I029e39407fccf528e164181539021978bd32c44b
Closes-Bug: #1591365
2016-06-14 11:46:06 -04:00
Ilya Shakhat
8d61e987aa Make Shaker flavor parameters configurable
The flavor can be configured by image builder:
 --flavor-ram - image RAM in MB
 --flavor-vcpus - number of cores
 --flavor-disk - disk size in GB

Change-Id: I243583ab8725d0a862ba66dae7828c23b9b20de0
2016-06-14 16:27:02 +03:00
Ilya Shakhat
039e436a94 Added QoS L2 scenario
Change-Id: Iff462b03c86d06309c6b3ffb5f16b9ff4a20e141
2016-05-27 17:34:19 +03:00
Ilya Shakhat
46216f0ad1 Work with OpenStack python client in a modern manner
* Replace all home-brewn code to work with OpenStack clients
  with os-client-config lib. No need to monitor token expiration
  for heat client anymore!
* Add 'os-project-name' parameter as it becomes standard
* Sync requirements to the latest

Closes-Bug: 1573504

Change-Id: I7520b9aed075074b4b47551eb22d18e568da83dd
2016-04-26 10:12:24 +03:00
Ilya Shakhat
51b9ca6393 Add ping scenario for shaker-spot
The scenario measures the latency to the remote host. It utilizes
flent for this.

Change-Id: I9354b98c18077e954fb4b0337ca3eea766668bbf
2016-04-20 18:50:16 +03:00
Ilya Shakhat
57a0d30925 Move scenarios from networking/ to openstack/
Rename location of all OpenStack scenarios from "networking"
to "openstack". The old name is deprecated, but is automatically
translated into the new one.

Change-Id: I59ab4b7659199216bfdddcf2c57c254ddb1a19c8
2016-04-18 11:57:14 +03:00
Ilya Shakhat
b791f37407 Add L3-North-South scenarios for external target host
Existing north-south scenarios actually do double path from tenant network
to external and then back. New scenarios allow to test against target host
located outside of the cloud. There are 2 options: instances with floating
IPs and without.

Change-Id: I91308465e9bbf261b0c919405b012d3d9b9f07da
2016-04-14 15:06:20 +03:00
Ilya Shakhat
b96e9df7a0 Re-generate auto-docs
Change-Id: I7c79f56779f01a512405dabea3f7b6fb551ae913
2016-03-15 21:23:48 +00:00
Ilya Shakhat
bdd41cde7e Generate report in ReST format
With new option --book Shaker is able to generate report
as book in ReST format. The report contains necessary data only.

Change-Id: I3bc575214da5cabb7ec9eee7f497a8d5cbb67097
2016-01-13 19:39:46 +03:00
Ilya Shakhat
f882160812 Update scenarios and documentation
Change-Id: I99556bf7143a04b712ebb6686061c05b5c39ebc3
2015-12-24 16:34:53 +03:00
Ilya Shakhat
0eea99ad93 Allow to override scenario parameters
A new CLI parameter --matrix is introduced. The parameter allows to override
values specified in test cases.

Change-Id: I384b5f8c8963d8704ef9d31ce6f209be3ec8e184
2015-12-22 17:36:47 +03:00
Ilya Shakhat
59723a8099 Implement agent-less execution mode (aka spot)
Added new entry-point shaker-spot, which allows to execute scenarios
from the local node. Example of such scenario is spot/tcp which uses
iperf3 to measure bandwidth against one of public hosts.

Change-Id: I9303785501c3af7212ca590b8de63218ca877cd6
2015-12-21 16:33:59 +03:00
Ilya Shakhat
58eea567bf Allow static host name in scenario
Now host name is not only taken from slave agent, but can
be specified directly in the test case. As example of usage
a new static agent networking scenario is added. The scenario
uses iperf3 to test connectivity to one of public iperf3 servers.

Change-Id: I660c91e1607a538217b81213abaaf9d57f4978a3
2015-12-17 17:55:55 +03:00
Artem Yasakov
62ff4a7ff7 Added option disable validation via a certifying authority
When using SSL in connections to the registry server, do not require
validation via a certifying authority. This is the registry's
equivalent of specifying --insecure on the command line using
Openstack clients for the API.

Change-Id: Id8164ccc5c8eee6e2da179c7552a667e10e61215
2015-12-09 18:35:33 +03:00
Ilya Shakhat
6c88dcabb7 Add ability to run scenarios across availability zones
Use case: as a user, I would like to run networking tests when
master nodes are in one AZ and slave nodes in the other.

This patch removes hardcoded AZ name from config files, allows
to specify list of active AZs and enable cross AZ testing (for
case of 2 AZs). A new example of scenario is added into
networking/cross_az/full_l2.

Change-Id: I416f0f790d859f046525084ddc307952cbcc41d8
2015-11-18 12:12:07 +00:00
Ilya Shakhat
95d71d6f0e Update from the global requirements
Note that in the latest oslo.log the default log level is changed
from WARN to INFO

Change-Id: Ib821328a5ece05d241943c645331f069c3a80276
2015-08-04 15:57:10 +03:00
Jenkins
2416e89032 Merge "Heat template for CentOs7 image" 2015-07-14 12:16:55 +00:00
root
63bf5ee307 Heat template for CentOs7 image
Added heat template for implementing centos target vms referenced by their alias.
Co-Authored-By: Joe Talerico <jtaleric@redhat.com>
Related-Bug: #1460726

Change-Id: I99c698506da36bd731951a58554f99701b49b4c9
2015-07-10 13:22:43 -04:00
Ilya Shakhat
760bcfc3a2 Split out UDP tests
UDP tests produce significant load on controllers, they should
be configured accordingly to scale of the cloud. This patch reduces
amount of UDP traffic in stock scenarios, tests with old values are
extracted to udp_* files.

Partial bug 1470892

Change-Id: I410bb3be0f7e267cd4aba4e95a3759e9ad6bc5c0
2015-07-09 10:55:42 +03:00
Chris Small
3ca4ef2198 Added support for TLS/SSL Openstack APIs
TLS/SSL support is enabled by adding os-cacert option to point
to a CA cert file. All Openstack client commands now pass
the cacert location as a parameter.

Change-Id: I72d9582d82381fd990e8d35b6320d0bea7cc203e
2015-06-24 13:02:17 +03:00
Ilya Shakhat
0a03164250 Refer to scenarios by alias name
Include all scenarios into the package and allow to refer to them
by alias.

Change-Id: I1c3cf81446c6db8e447ddd4541f41e3141197b0d
2015-06-19 13:45:41 +03:00
root
ae2fab4f5d Clean heat stack upon deployment failure
Cleans the heat stack in case of any error during scenario execution.
Configurable, with default action to clean the stack on any error

Closes-Bug: 1464315
Change-Id: I4a097ed92127b7eed6fdab1e80f3821002312bb3
2015-06-18 13:01:38 -04:00
Ilya Shakhat
366f92c98b Simplify selection of report template
Report template can be specified by full path or via alias.
List of available aliases can be found in the docs and CLI tools
help.

Change-Id: I22eb933d57a52b4eec24bba53b783e224a0a651b
2015-06-17 12:33:15 +03:00
Ilya Shakhat
67dca63fb6 Simplify the choice of image builder template
Now Shaker package can contain several templates for image builder. Users may
refer to these templates by short name (alias), no full path knowledge is required.
All available aliases are shown in help message and in the docs.

Added Debian-based template as an example.

Closes bug 1460726

Change-Id: I6109be99acfa802abc185f92b15f0540007935be
2015-06-16 13:35:26 +03:00
Ilya Shakhat
1e67f6ea2b Update docs with scenario definition details
Change-Id: I859af0deeb6d699ec2e79aeb35dacc278f3b53cd
2015-05-28 19:28:01 +03:00
Ilya Shakhat
5774c7106c Change style of docs to standard RTFD
Change-Id: Id8502e1b37d0c0f8396a6056331c7d34d7699c0f
2015-05-08 17:28:46 +03:00
Ilya Shakhat
f64813b681 Validate server-endpoint parameter via oslo.config
Change-Id: Id8ce875599d67040fb883445bcbd31b5049dc7f0
2015-04-21 15:42:47 +03:00
Ilya Shakhat
a17615a726 Use MAC as default agent id
Also do not allow to run 2 agents at the same host pointing to
the same server-endpoint

Change-Id: Id1ef2d5d78acdbb3bde12cf05c2fb9a474691ed1
2015-04-20 17:02:55 +03:00
Ilya Shakhat
4c286c011a Add parameter to skip report generation for failed scenarios
Change-Id: Idc3e36df34be643f984b5c53a10f8e818761737c
2015-04-08 16:13:01 +03:00
Ilya Shakhat
1a5108fb3c Refactor Quorum to dedup common code in wait_join and run
Change-Id: Iaffc4b7ef500d3e17d5ef0daed07854d29436537
2015-04-07 16:10:51 +03:00
Ilya Shakhat
ff11cd9e04 Detect lost agents
If during test execution some agent is not replied in expected time
it is marked as lost.

Change-Id: Idce887480518deb80f7722dac721991648e850f0
2015-04-07 14:01:14 +03:00
Jenkins
4914c361e6 Merge "Implement SLA support and subunit output" 2015-03-24 10:02:33 +00:00