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
Jan 4, 2021
Feb 25, 2021
Nov 9, 2018
Feb 15, 2021
Mar 21, 2021
Feb 25, 2021
Feb 25, 2021
Feb 17, 2018
Jun 19, 2018
Feb 25, 2021
Jan 4, 2021
Nov 25, 2018
Feb 25, 2021
Aug 19, 2017
Dec 1, 2018
Jun 11, 2020
Dec 16, 2020
Feb 6, 2018
Feb 25, 2021
Jun 8, 2019
Nov 25, 2018
Feb 25, 2021
May 22, 2020
Apr 24, 2019
Nov 30, 2020
May 5, 2019
Oct 25, 2020
Oct 25, 2020
Feb 17, 2018

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.