Skip to content

Plugins for Docker

Processed releases: xrally-docker 1.0.0 - 1.0.0

Environment Component

Platform

existing [Platform]

Default plugin for Docker.

Platform: docker

The input of this plugin should be valid to the following JSONSchema
{
    "type": "object", 
    "properties": {
        "cert_path": {
            "type": "string", 
            "description": "A path to a directory containing TLS certificates to use when connecting to the Docker host."
        }, 
        "host": {
            "type": "string", 
            "description": "The URL to the Docker host"
        }, 
        "ssl_version": {
            "type": "integer", 
            "description": "A valid SSL version (see https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1)"
        }, 
        "timeout": {
            "type": "number", 
            "description": "Default timeout for API calls, in seconds.", 
            "minimum": 0
        }, 
        "tls_verify": {
            "type": "boolean", 
            "description": "Verify the host against a CA certificate."
        }, 
        "version": {
            "type": "string", 
            "description": "The version of the API to use. Defaults to ``auto`` whichmeans automatically detection of the server's version."
        }
    }, 
    "additionalProperties": false
}

Module: xrally_docker.env.platforms.existing


Task Component

Context

images [Context]

Pull new images or load existing ones.

Platform: docker

The input of this plugin should be valid to the following JSONSchema
{
    "type": "object", 
    "properties": {
        "existing": {
            "type": "boolean", 
            "description": "Load all existing images"
        }, 
        "names": {
            "type": "array", 
            "description": "Pull images from the list.", 
            "items": {
                "type": "string", 
                "description": "The image to pull. (if the tag of image is not specified, 'latest' will be used)."
            }
        }
    }, 
    "additionalProperties": false
}

Module: xrally_docker.task.contexts.images


networks [Context]

Create one or several docker networks.

Platform: docker

The input of this plugin should be valid to the following JSONSchema
{
    "oneOf": [
        {
            "description": "Create a single network", 
            "$ref": "#/definitions/single-network"
        }, 
        {
            "type": "array", 
            "description": "Create several networks.", 
            "items": {
                "$ref": "#/definitions/single-network"
            }, 
            "minItems": 1
        }
    ], 
    "definitions": {
        "ipam": {
            "type": "object", 
            "description": "Custom IP scheme for the network", 
            "properties": {
                "Config": {
                    "type": "array", 
                    "description": "A list of IPAM Pool configurations.", 
                    "items": {
                        "type": "object", 
                        "properties": {
                            "aux_addresses": {
                                "type": "object", 
                                "description": "A dictionary of ``key -> ip_address``relationships specifying auxiliary addresses that need to be allocated by the IPAM driver."
                            }, 
                            "gateway": {
                                "type": "string", 
                                "description": "Custom IP address for the pool's gateway."
                            }, 
                            "iprange": {
                                "type": "string", 
                                "description": "Custom IP range for endpoints in this IPAM pool using the CIDR notation."
                            }, 
                            "subnet": {
                                "type": "string", 
                                "description": "Custom subnet for this IPAM pool using the CIDR notation."
                            }
                        }, 
                        "additionalProperties": false
                    }
                }, 
                "Driver": {
                    "type": "string", 
                    "description": "The name of the driver"
                }, 
                "Options": {
                    "type": "object", 
                    "description": "Driver options.", 
                    "additionalProperties": true
                }
            }, 
            "additionalProperties": false, 
            "required": [
                "Driver"
            ]
        }, 
        "single-network": {
            "type": "object", 
            "properties": {
                "attachable": {
                    "type": "boolean", 
                    "description": "If enabled, and the network is in the global scope,  non-service containers on worker nodes will be able to connect to the network."
                }, 
                "driver": {
                    "type": "string", 
                    "description": "Name of the driver used to create the network"
                }, 
                "enable_ipv6": {
                    "type": "boolean", 
                    "description": "Enable IPv6 on the network."
                }, 
                "ingress": {
                    "type": "boolean", 
                    "description": "If set, create an ingress network which provides the routing-mesh in swarm mode."
                }, 
                "internal": {
                    "type": "boolean", 
                    "description": "Restrict external access to the network."
                }, 
                "ipam": {
                    "$ref": "#/definitions/ipam"
                }, 
                "labels": {
                    "type": "array", 
                    "description": "A list of labels to apply to the network", 
                    "items": {
                        "type": "string", 
                        "description": "A label to apply."
                    }
                }, 
                "options": {
                    "type": "object", 
                    "description": "Driver options."
                }, 
                "scope": {
                    "description": "The network's scope", 
                    "enum": [
                        "local", 
                        "global", 
                        "swarm"
                    ]
                }
            }, 
            "additionalProperties": false
        }
    }
}

Module: xrally_docker.task.contexts.networks


Scenario

This is base class for any scenario.

All Scenario Plugins should be subclass of this class.

Docker.create_and_delete_network [Scenario]

Create and delete docker network.

Platform: docker

Parameters
Argument Description
driver [ref] Name of the driver used to create the network
options [ref] Driver options as a key-value dictionary
ipam [ref] Optional custom IP scheme for the network.
check_duplicate [ref] Request daemon to check for networks with same name.
internal [ref] Restrict external access to the network.
labels [ref] Map of labels to set on the network.
enable_ipv6 [ref] Enable IPv6 on the network.
attachable [ref] If enabled, and the network is in the global scope, non-service containers on worker nodes will be able to connect to the network.
scope [ref] Specify the network's scope (``local``, ``global`` or ``swarm``)
ingress [ref] If set, create an ingress network which provides the routing-mesh in swarm mode.

Module: xrally_docker.task.scenarios.networks


Docker.list_networks [Scenario]

List docker networks.

Platform: docker

Parameters
Argument Description
driver [ref] a network driver to match
label [ref] label to match
ntype [ref] Filters networks by type.
detailed [ref] Grep detailed information about networks (aka greedy)

Module: xrally_docker.task.scenarios.networks


Docker.run_container [Scenario]

Run a docker container from image and execute a command in it.

Platform: docker

Parameters
Argument Description
image_name [ref] The name of image to start
command [ref] The command to launch in container

Module: xrally_docker.task.scenarios.container


Validator

A base class for all validators.

check_cleanup_resources [Validator]

Validates that docker resource managers exist.

Platform: docker

Module: xrally_docker.task.contexts.cleanup


required_docker_platform [Validator]

Check for docker platform in selected environment.

Platform: docker

Module: xrally_docker.task.validators