Mirantis/tcp-qa

Name: tcp-qa

Owner: Mirantis Inc.

Description: null

Created: 2016-10-18 09:48:44.0

Updated: 2017-10-09 14:38:15.0

Pushed: 2018-01-15 17:56:45.0

Homepage: null

Size: 2120

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

tcp-qa

Contribute

Please send patches using gerrithub.io:

remote add gerrit ssh://review.gerrithub.io:29418/Mirantis/tcp-qa
review
Clone the repo
clone https://github.com/Mirantis/tcp-qa
/tcp-qa
Install requirements
install -r ./tcp_tests/requirements.txt
Get cloudinit image
 https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -O ./xenial-server-cloudimg-amd64.qcow2
Choose the name of the cluster model

LAB_CONFIG_NAME variable maps cluster name from the model repository with the set of templates in the ./tcp_tests/templates/ folder.

rt LAB_CONFIG_NAME=virtual-mcp-ocata-dvr  # OVS-DVR with ocata packages
rt LAB_CONFIG_NAME=virtual-mcp-ocata-ovs  # OVS-NO-DVR with ocata packages
rt LAB_CONFIG_NAME=virtual-mcp-ocata-cicd  # Operational Support System Tools
rt LAB_CONFIG_NAME=virtual-mcp11-dvr  # OVS-DVR with neutron packages
rt LAB_CONFIG_NAME=virtual-mcp11-ovs  # OVS-NO-DVR with neutron packages
rt LAB_CONFIG_NAME=virtual-mcp11-dpdk  # OVS-DPDK with neutron packages
Set packages repository

Note: The recommended repo is testing. Possible choices: stable, testing, nightly. Nightly contains latest packages.

rt REPOSITORY_SUITE=testing
Run deploy test
rt IMAGE_PATH1604=./xenial-server-cloudimg-amd64.qcow2
rt SHUTDOWN_ENV_ON_TEARDOWN=false  # Optional

LL=en_US.UTF-8  py.test -vvv -s -k test_tcp_install_default
Run deploy test and rally verify (tempest)
rt IMAGE_PATH1604=./xenial-server-cloudimg-amd64.qcow2
rt SHUTDOWN_ENV_ON_TEARDOWN=false  # Optional

LL=en_US.UTF-8  py.test -vvv -s -k test_tcp_install_run_rally
Run OSS deploy
rt IMAGE_PATH1604=./xenial-server-cloudimg-amd64.qcow2
rt SHUTDOWN_ENV_ON_TEARDOWN=false  # Optional

LL=en_US.UTF-8  py.test -vvv -s -k test_oss_install_default
Run deploy test for mk22-qa-lab01 (outdated)

Note: This lab is not finished yet. TBD: configure vsrx node

rt ENV_NAME=tcpcloud-mk22  # You can set any env name
rt LAB_CONFIG_NAME=mk22-qa-lab01  # Name of set of templates
rt VSRX_PATH=./vSRX.img           # /path/to/vSRX.img, or to ./xenial-server-cloudimg-amd64.qcow2 as a temporary workaround

LL=en_US.UTF-8  py.test -vvv -s -k test_tcp_install_default

, or as an alternative there is another test that use deploy scripts from models repository written on bash [2]:

LL=en_US.UTF-8  py.test -vvv -s -k test_tcp_install_with_scripts

Labs with names mk22-lab-basic and mk22-lab-avdanced are deprecated and not recommended to use.

Use HugePages for environments based on qemu-kvm VMs

To create VMs using HugePages, configure the server (see below) and then use the following variable:

rt DRIVER_USE_HUGEPAGES=true

Configure HugePages without reboot

This is a runtime-based steps. To make it persistent, you need to edit some configs.

  1. Remove apparmor

    ice apparmor stop
    ice apparmor teardown
    te-rc.d -f apparmor remove
    get remove apparmor
    
  2. Allocate memory for Hugepages

2Mb * 30000 = ~60Gb RAM will be used for HugePages. Suitable for CI servers with 64Gb RAM and no other heavy services except libvirt.

WARNING! Too high value will hang your server, be carefull and try lower values first.

 28000 | sudo  tee  /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
get install -y hugepages
adm --set-recommended-shmmax
/proc/meminfo | grep HugePages
  1. Mount hugetlbfs to use it with qemu-kvm

    r -p /mnt/hugepages2M
    t -t hugetlbfs hugetlbfs /mnt/hugepages2M
    
  2. Enable HugePages for libvirt

     "hugetlbfs_mount = '/mnt/hugepages2M'" > /etc/libvirt/qemu.conf
    ice libvirt-bin restart
    
Create and start the env for manual tests
py create-env ./tcp_tests/templates/underlay/mk22-lab-basic.yaml
py start "${ENV_NAME}"

Then, wait until cloud-init is finished and port 22 is open (~3-4 minutes), and login with root:r00tme

[1] https://github.com/openstack/fuel-devops/blob/master/doc/source/install.rst

[2] https://github.com/Mirantis/mk-lab-salt-model/tree/dash/scripts


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.