Custom Backends¶
DC/OS E2E supports pluggable backends. You may wish to create a new backend to support a new cloud provider for example.
How to Create a Custom Backend¶
To create a cluster Cluster backend, you need to create two classes.
You need to create a ClusterManager and a ClusterBackend.
A ClusterBackend may take custom parameters and is useful for storing backend-specific options.
A ClusterManager implements the nuts and bolts of cluster management for a particular backend.
This implements things like creating nodes and installing DC/OS on those nodes.
Please consider contributing your backend to this repository if it is stable and could be of value to a wider audience.
References¶
-
class
dcos_e2e.base_classes.ClusterBackend¶ Cluster backend base class.
-
abstract property
cluster_cls¶ Return the
ClusterManagerclass to use to create and manage a cluster.- Return type
-
abstract property
ip_detect_path¶ Return the path to a backend specific
ip-detectscript.- Return type
-
abstract property
-
class
dcos_e2e.base_classes.ClusterManager(masters, agents, public_agents, cluster_backend)¶ Create a DC/OS cluster with the given
cluster_backend.- Parameters
-
abstract
install_dcos_from_url(dcos_installer, dcos_config, ip_detect_path, output, files_to_copy_to_genconf_dir)¶ Install DC/OS from a URL.
- Parameters
dcos_installer¶ (
str) – The URL string to an installer to install DC/OS from.dcos_config¶ (
Dict[str,Any]) – The DC/OS configuration to use.ip_detect_path¶ (
Path) – Theip-detectscript to use for installing DC/OS.files_to_copy_to_genconf_dir¶ (
Iterable[Tuple[Path,Path]]) – Pairs of host paths to paths on the installer node. These are files to copy from the host to the installer node before installing DC/OS.
- Return type
None
-
abstract
install_dcos_from_path(dcos_installer, dcos_config, ip_detect_path, output, files_to_copy_to_genconf_dir)¶ Install DC/OS from an installer passed as a file system
Path.- Parameters
dcos_installer¶ (
Path) – The path to an installer to install DC/OS from.dcos_config¶ (
Dict[str,Any]) – The DC/OS configuration to use.ip_detect_path¶ (
Path) – Theip-detectscript to use for installing DC/OS.files_to_copy_to_genconf_dir¶ (
Iterable[Tuple[Path,Path]]) – Pairs of host paths to paths on the installer node. These are files to copy from the host to the installer node before installing DC/OS.
- Return type
None
-
abstract
destroy_node(node)¶ Destroy a node in the cluster.
- Return type
None
-
abstract
destroy()¶ Destroy all nodes in the cluster.
- Return type
None