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.backends._base_classes.
ClusterBackend
¶ Cluster backend base class.
-
cluster_cls
¶ Return the
ClusterManager
class to use to create and manage a cluster.Return type: Type
[ClusterManager
]
-
-
class
dcos_e2e.backends._base_classes.
ClusterManager
(masters, agents, public_agents, cluster_backend)¶ Create a DC/OS cluster with the given
cluster_backend
.Parameters: -
install_dcos_from_url_with_bootstrap_node
(build_artifact, dcos_config, ip_detect_path, log_output_live, files_to_copy_to_genconf_dir)¶ Install DC/OS from a URL with a bootstrap node.
If a method which implements this abstract method raises a
NotImplementedError
, users of the backend can still install DC/OS from a URL in an inefficient manner.Parameters: - build_artifact¶ – The URL string to a build artifact to install DC/OS from.
- dcos_config¶ – The DC/OS configuration to use.
- ip_detect_path¶ – The
ip-detect
script to use for installing DC/OS. - log_output_live¶ – If
True
, log output of the installation live. - files_to_copy_to_genconf_dir¶ – 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:
-
install_dcos_from_path_with_bootstrap_node
(build_artifact, dcos_config, ip_detect_path, log_output_live, files_to_copy_to_genconf_dir)¶ Install DC/OS from a build artifact passed as a file system Path.
If a method which implements this abstract method raises a
NotImplementedError
, users of the backend can still install DC/OS from a path in an inefficient manner.Parameters: - build_artifact¶ – The path to a build artifact to install DC/OS from.
- dcos_config¶ – The DC/OS configuration to use.
- ip_detect_path¶ – The
ip-detect
script to use for installing DC/OS. - log_output_live¶ – If
True
, log output of the installation live. - files_to_copy_to_genconf_dir¶ – 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:
-