Raiders of the lost testing env

The search for a reproducible vm testing environment

Who's this guy?

Creating test scenarios

Test legacy applications

Support DevOps flows (test configuration management code)

OS-coupled applications

Load balancing and clustering

Embrace continuous integration, test each commit

Virtualizing everything

Goals

  • Ability to create complex environments (multi-VM, multi-net)
  • Run in a standard laptop (lightweight)
  • No external dependencies (isolated)
  • Easy to use
  • Fast enough to run before pushing
  • Allow nested virtualization

*Logo under active development, any ideas are welcome

What is lago?

Ad-hoc virtual testing environment framework

AdHoc

In-place, on demand environments

Virtual

Simulates the complete real environment

Testing

Made to run tests, on your own development laptop

Environment

Prepares the everything you need, hosts, network, disks, repositories

Framework

Provides the basic tools to create your own flow, and extend it to adapt to your needs

  • kvm/libvirt based
    • oVirt heavily usesĀ  the nested virtualization capabilities
  • Pluggable infrastructure
  • CLI as main entry point
    • Language agnostic
  • python-nose api for better integration

Detailed implementation

Detailed implementation

Libguestfs

+

python-nose

Lago

Features

Defining the environment:

  • Single json file "init.json"
  • Easy to integrate with cvs
  • Easy to manipulate
  • Infrastructure as code

Defining the environment:

Domains

"domains": {
    "test1": {
        "memory": "4096",
        "nics": [
            {"net": "lago"}
        ],
        "disks": [
            {
                "template_name": "fc23-base",
                "type": "template",
                "name": "root",
                "dev": "vda",
                "format": "qcow2"
            }
        ],
        "metadata": {
            "ovirt-scripts": ["../setup.sh"]
        }
    }
}

Defining the environment:

Nets

"nets":{
    "lago": {
        "type": "nat",
        "dhcp": {
            "start": 100,
            "end": 254
        },
        "management": true
    }
}

Creating the environment

Start-shell-stop

Copy files in and out of a VM

Vm image sources

  • Remote templates repository
  • Local templates
  • Remote images
  • Local images
  • Empty image

Snapshots

oVirt plugin: Custom host setup scripts

oVirt plugin: local yum repo

oVirt plugin: log collection

Currently working on

Layered image templates

Pumped up plugin infrastructure

Glance source images

Generic log collection

Generic yum repository local cache

Serial console capture

Things to keep an eye on

Disk image recipes hub

Containers/chroot/other VM provider plugins

Java, ruby, go, clojure, pytest, ...

Debian/arch/... packaging

Current status

Alpha status (not production ready)

Early development phase

Actively used for oVirt system tests

Actively developed

Get involved, every idea is welcome!

Mailing list - lago-devel@ovirt.org

Pull requests - https://github.com/lago-project/lago

Bugs/feature requests - https://github.com/lago-project/lago/issues

Twitter - @lago-project