Skip to content
/ dcos-e2e Public

Spin up and manage DC/OS clusters in test environments

License

Notifications You must be signed in to change notification settings

dcos/dcos-e2e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions build status

Build Status

codecov

Library Documentation Status : Library

CLI Documentation Status : miniDC/OS

DC/OS E2E

DC/OS E2E is a tool for spinning up and managing DC/OS clusters in test environments. It includes a Python library and miniDC/OS CLI tools.

See the full documentation on Read the Docs for the library and miniDC/OS.

DC/OS E2E consists of a Python library and miniDC/OS.

See the full miniDC/OS documentation for CLI installation options.

To install the library, follow the library installation instructions.

Below is a small example of using DC/OS E2E as a Python library with a Docker backend. Other backends include AWS and Vagrant. See the library documentation for more details on these and other features.

from pathlib import Path

from dcos_e2e.backends import Docker
from dcos_e2e.cluster import Cluster

oss_installer = Path('/tmp/dcos_generate_config.sh')

cluster_backend = Docker()
with Cluster(cluster_backend=cluster_backend) as cluster:
    cluster.install_dcos_from_path(
        dcos_installer=oss_installer,
        dcos_config={
            **cluster.base_config,
            **{
                'check_time': True,
            },
        },
        ip_detect_path=cluster_backend.ip_detect_path,
    )
    (master, ) = cluster.masters
    result = master.run(args=['echo', '1'])
    print(result.stdout)
    cluster.wait_for_dcos_oss()
    cluster.run_with_test_environment(args=['pytest', '-x', 'test_tls.py'])

DC/OS E2E also provides multiple command line interface tools. These allow you to create, manage and destroy DC/OS clusters on various backends, such as Docker, Vagrant and AWS.

A typical CLI workflow with the minidcos docker CLI may look like this:

# Fix issues shown by ``minidcos docker doctor``
$ minidcos docker doctor
$ minidcos docker download-installer
$ minidcos docker create ./dcos_generate_config.sh --agents 0
default
$ minidcos docker wait
$ minidcos docker run --test-env --sync-dir /path/to/dcos/checkout pytest -k test_tls
...
# Get onto a node
$ minidcos docker run bash
[master-0]# exit
$ minidcos docker destroy

Each of these commands and more are described in detail in the full minidcos docker CLI documentation. Other CLI tools include minidcos aws and minidcos vagrant.

See the full miniDC/OS documentation for information on other CLI tools provided by DC/OS E2E.