fuel-library/fuel_test
Sergey Vasilenko 27ba9db4dc Revert "my settings"
This reverts commit 0d017c751e.

Conflicts:
	fuel_test/settings.py
2013-07-18 15:21:10 +04:00
..
ci separate prepare for tempest 2013-06-18 15:44:03 +04:00
cobbler added timeout between end of deploy and creating snapshots 2013-07-18 14:25:37 +04:00
config Added skipped postfixes 2013-06-20 13:09:25 +04:00
__init__.py Re-import with 1-level submodule structure 2012-09-14 11:58:47 -07:00
astute.py fixes upon merge comments - allow iface undefinition; default domain 2013-05-23 20:08:02 +04:00
base_test_case.py Add astute run 2013-05-07 17:36:01 +04:00
config.py Merge branch 'master' of github.com:Mirantis/fuel into asdfasdf 2013-05-24 17:10:42 +04:00
helpers.py dhcp checksum fix 2013-05-29 22:57:49 +04:00
iso_master.py switch to puppet-2 by default 2013-05-27 18:45:35 +04:00
manifest.py additional parameters for quantum 2013-07-12 11:23:36 +04:00
node_roles.py Changes in generating of config.yaml + tests for manifest|config 2013-04-30 10:19:14 +04:00
pip-requires Add pipreqs for pyyaml psycopg2 ipaddr 2013-07-05 18:58:04 +04:00
prepare_tempest_ci.py separate prepare for tempest 2013-06-18 15:44:03 +04:00
prepare_tempest.py Change for network version 2013-07-04 17:09:42 +04:00
prepare.py separate prepare for tempest 2013-06-18 15:44:03 +04:00
README.rst Fix README for tests, add pip-req for prepare.py 2013-05-31 18:09:45 +03:00
root.py Generate some manifests at test start 2013-02-04 06:25:55 +04:00
settings.py Revert "my settings" 2013-07-18 15:21:10 +04:00
test_config.py Astute deployment in minimal, simple, full 2013-05-17 13:35:19 +04:00
test_manifest.py Astute deployment in minimal, simple, full 2013-05-17 13:35:19 +04:00

:

Grizzly CI TEMPEST parameterized job example

This is an example of grizzly TEMPEST job for CI cycle, i.e. commit & verify.

Quickstart

  • Copy job from the nearest-best-fitting-one, edit job name to match its environment

  • Set up SCM for repos needed and provide its local directories names (fuel & tempest is a minimum required)

  • Add parameters for job, f.e. test_name with values

    • fuel_test.cobbler.test_simple:SimpleTestCase.test_simple
    • fuel_test.cobbler.test_simple
    • fuel_test.cobbler.test_single
    • fuel_test.cobbler.test_full:FullTestCase.test_full
    • fuel_test.cobbler.test_compact:CompactTestCase.test_deploy_compact_quantum
    • fuel_test.cobbler.test_compact:CompactTestCase.test_deploy_compact_wo_quantum
    • fuel_test.cobbler.test_quantum_standalone_no_swift:QstTestCase.test_quantum_standalone_no_swift
    • fuel_test.cobbler.test_minimal:MinimalTestCase.test_minimal
    • fuel_test.cobbler.test_orchestration:CobblerCase.test_orchestrating_minimal
    • TEMPEST
    • tempest/tempest/tests/network/test_network_basic_ops.py
    • tempest/tempest/tests/compute/servers/test_create_server.py:ServersTestJSON.test_can_log_into_created_server
    • tempest/tempest/tests/compute/floating_ips

    and erase with values

    • false
    • true
  • Configure shell command to execute

  • Run the job

Shell env. varaibles used for job

Accepted values for test_name parameter are

  • TEMPEST = full tempest run onto lab was deployed before
  • tempest/tempest/tests/.../ModuleName.py:ClassName.MethodName = run single tempest test specified only, e.g. tempest/tempest/tests/compute/servers/test_create_server.py:ServersTestJSON.test_can_log_into_created_server
  • Any other = redeploy lab from 'nodes-deployed' snapshots have been made after BM by cobbler have finished (uncomented dos.py would cause full erase and redeploy with BM including vm networks recreation)

Accepted values for erase parameter are

  • false = do not erase existing virtual nodes and networks before nosetests execution
  • true = run dos.py script to erase and recreate virtual networks and nodes for lab, next run the nosetests (note: always use true if public_pool have changed)

Other shell script keys

  • DOMAIN_NAME = domain name to use for nodes (default .your-domain-name.com), note: this option is broken
  • OS_FAMILY = OS type for nodes, cetnos or ubuntu (default centos)
  • CURRENT_PROFILE = centos64_x86_64 or ubuntu_1204_x86_64 - cobbler ks profile to use (default depends on OS_FAMILY)
  • CONTROLLERS,COMPUTES,STORAGES,PROXIES = number of nodes of corresponding role type to deploy (defaults 3,3,3,2)
  • PARENT_PROXY = parent-proxy server for squid at master node (172.18.67.168 Saratov, 172.18.3.14 Moscow) (default none)
  • CIRROS_IMAGE = cirros url (default http://srv08-srt.srt.mirantis.net/cirros-0.3.0-x86_64-disk.img)
  • ISO_IMAGE = Fuel iso image to use for master node (default ~/fuel-centos-6.4-x86_64.iso)
  • USE_ISO = use ISO for deployment (default True), note: this option is broken
  • ASTUTE_USE = use astute addon for mcollective to deploy nodes (default True)
  • PUPPET_GEN = puppet generation (2,3) to use, i.e. 2 => v2.x.x, 3 => v3.x.x (default 2)
  • PUPPET_AGENT_COMMAND = command to run puppet agents (default puppet agent -tvd -evaltrace 2>&1)
  • CLEAN = clean exitsting dirty state, will revert nodes to snapshot nodes-deployed, if any (default True)
  • CREATE_SNAPSHOTS = make openstack snapshots after lab have deployed or openstack-upgraded in case of upgrade (default False)
  • UPGRADE = tell jenkins to revert nodes to openstack snapshots while cleaning (default False)
  • PUBLIC_POOL = use custom IP allocation pool for public & ext networking (use with dos.py only). See also: fuel_test/settings.py, note: this option is broken
  • PUBLIC_FORWARD = nat or route forwarding mode for public pool, use route for custom forwarded pools (default nat)

Shell script example

. ~/work/venv/bin/activate
export ENV_NAME=$JOB_NAME
export PUPPET_AGENT_COMMAND='puppet agent -t 2>&1'
export CREATE_SNAPSHOTS=true
export UPGRADE=false
export CLEAN=true
export PUPPET_GEN=2
export ASTUTE_USE=false

export PARENT_PROXY=172.18.67.168
export CIRROS_IMAGE=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img
export ISO=/var/lib/libvirt/images/fuel-centos-6.3-x86_64.iso

export CONTROLLERS=1
export COMPUTES=3
export STORAGES=0
export PROXIES=0

export OS_FAMILY=centos
export CURRENT_PROFILE=centos64_x86_64

if [ "$test_name" == "TEMPEST" ] || [ "$(echo $test_name | cut -d"/" -f1)" == "tempest" ]; then
   export run_tests=tempest/tempest/tests
   [ "$test_name" != "TEMPEST" ] && export run_tests="-v $test_name"
   pushd fuel
       pip install -r fuel_test/pip-requires
       PYTHONPATH=. python fuel_test/prepare.py || true
   popd
   deactivate
   cp tempest.conf $WORKSPACE/tempest/etc/
   virtualenv venv --no-site-packages
   . venv/bin/activate
   pip install -r tempest/tools/pip-requires
   nosetests $run_tests --with-xunit -d -l DEBUG || echo ignore error code
   deactivate
else
   [ "$erase" == "true" ] && dos.py erase $ENV_NAME
   nosetests -w $fuel_release $test_name --with-xunit -s -d -l DEBUG || echo ignore exit code
fi