Skip to main content

a set of xRally plugins for Docker platform.

Project description

xrally-docker

xRally plugins for Docker engine.

What is it?!

Originally, it was created as a quick proof-of-concept to show ability of Rally to test platforms other than OpenStack. After the first preview, it became obvious that it should be developed as a complete package.

xrally_docker is a pack of xRally plugins for execution different workloads at the top of Docker Engine. Such workloads can be used as like for testing environments with Docker or testing behaviour of specified docker image.

How to use?!

Install package

xrally_docker package is configured to be auto-discovered by Rally. Since rally package is a dependency of xrally_docker , so to start using xrally_docker you need to install just one package:

pip install xrally_docker

Specify entry-point of docker engine to use

The next step is to specify entry-point to docker, i.e. create rally environment. There are 2 way to do it:

  1. Specify environment specification manually. For a simple case (no cert, tls, etc), it looks like {"docker@existing": {}}.
  2. Create environment specification from system environment variables (supported by Rally >= 0.11.2) using rally env create --name example --from-sysenv command. An expected system variables are the same as native docker client supports.

Check that Rally can access the docker

First of all try to execute rally env check command. It checks all platforms of the environment to be available. If it does not show any errors for communicating with docker, go and execute any task against docker. If is fails, try to execute the command again with --detailed flag.

Also, you can use rally env info command for the same purpose. Unlike rally env check it will not only check the platforms, but print some information about them. In case of docker platform, it will print the similar to docker --version data.

Execute a workload against docker

Here is a simple workload:

---
  version: 2
  title: Simple task with only one workload
  subtasks:
    -
      title: a subtask with one workload
      description: This workload should run a container from "ubuntu" 
                   image and execute simple command.
      scenario:
        Docker.run_container:
          image_name: "ubuntu"
          command: "echo 'Hello world!'"
      runner:
        constant:
          times: 10
          concurrency: 2
      sla:
        failure_rate:
          max: 0

This task will download ubuntu image first, if it does not present in the system. Then, it will run 10 containers from the image with 2 concurrency and execute a simple command. The output of the command will be saved as TextArea and will be available via json and html reports.

See plugin references for the full list of available plugins for docker platform to combine workloads.

Known issues

This package works fine, but you need to install the proper version of Docker client which suits your Docker API version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xrally-docker-1.0.0.tar.gz (34.3 kB view details)

Uploaded Source

File details

Details for the file xrally-docker-1.0.0.tar.gz.

File metadata

File hashes

Hashes for xrally-docker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b786abfd7568cf79dc08953d53271c61c21058e1aac53f151e11cc0638fb909
MD5 8b3eed00220356295832ad13fbc9eb67
BLAKE2b-256 c300350554bcfa7d6dbe170c11cb579494f4ff2441b20cb7ab5c2109ba332023

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page