Package com.morpheusdata.core.providers
Interface ClusterProvider
- All Superinterfaces:
PluginProvider
Represents a definition for a
ComputeServerGroupType so that custom cluster types can
be created. This could be an EKS Cluster from Amazon or a GKE Cluster from Google, or even a KVM Cluster.
TODO: In Development- Since:
- 0.15.3
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.morpheusdata.core.providers.PluginProvider
PluginProvider.EventSubscriberFacet<E extends Event> -
Method Summary
Modifier and TypeMethodDescriptiondefault BooleanIndicates whether this cluster type can delete virtual images associated with the cluster.Converts a discovered cluster to a managed clusterdeleteCluster(ComputeServerGroup cluster) Called when a cluster is being deleted.deleteServer(ComputeServer server) Called when a server is being deleted.default ServiceResponsefinalizeLinuxComputeServer(ComputeServerGroup cluster, ComputeServer server, Map opts) Hook for finalizing any configuration on a linux compute server before it is saved, defaults to no-opdefault Collection<BackupProvider>Grabs available backup providers related to the target cluster plugin.Grabs available provisioning providers related to the target Cloud Plugin.Returns the circular Cluster Type logo for display when a user needs to view or add this cluster.Provides a Collection of ComputeTypes that can be controllers on this ClusterProviderProvides a Collection ofDatastoreTyperelated to this ClusterProvidergetDefaultNamespace(ComputeServerGroup cluster) Provides the default namespace (should be aCloudPool) for this clusterdefault StringBy default, the cluster will use the plugin deploy service, if you'd like to use the built-in kubernetes deploy service, set this to "kubernetesDeployTargetService"Grabs the description for the Cluster Typedefault IacResourceMappingProviderIf the cloud supports IaC based provisioning, return the mapping provider here and implement theProvisionProvider.IacResourceFacetin your ProvisionProvidergetIcon()Returns the Cluster Type logo for display when a user needs to view or add this cluster.Provides a Collection ofNetworkTyperelated to this ClusterProviderProvides a Collection of OptionType inputs that define the required input fields for defining a cloud integrationReturns the provider type for this cluster provider, such as "kubernetes", "docker", "kvm", etc.getProvisionProvider(String providerCode) Grabs the singleton instance of the provisioning provider based on the code defined in its implementation.default Collection<String>A list of supported NetworkProviders that can be used for networking services on this clouddefault ClusterTabListProvides a Collection of ComputeTypes that can be workers on this ClusterProviderdefault BooleanIndicates whether this cluster type supports affinity groupsdefault BooleanIndicates whether this cluster type supports cluster storagedefault BooleanIndicates whether this cluster type supports datastore storagedefault BooleanIndicates whether this cluster type supports a default data diskdefault BooleanIndicates whether this cluster type supports master nodesdefault BooleanIndicates whether this cluster type supports pricingdefault BooleanIndicates whether this cluster type supports worker nodesdefault booleanisRefreshable(ComputeServerGroup cluster) Checks if the cluster can be refreshed by Morpheus.refresh(ComputeServerGroup cluster) Clusters are refreshed periodically by the Morpheus Environment.refreshDaily(ComputeServerGroup cluster) Clusters are refreshed periodically by the Morpheus Environment.default BooleanIndicates whether this cluster type supports cloud scaling (e.g.default BooleanIndicates whether this cluster type supports custom layoutsdefault BooleanIndicates whether this cluster type should use kubectl locallyvalidateServerGroup(ComputeServerGroup cluster) Validates the server group for a given cluster.validateServerGroupConfig(ComputeServerGroupType clusterType, Map config) Validates the server group configuration for a given cluster type.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
Method Details
-
getDescription
String getDescription()Grabs the description for the Cluster Type- Returns:
- String
-
getIcon
Icon getIcon()Returns the Cluster Type logo for display when a user needs to view or add this cluster. SVGs are preferred.- Returns:
- Icon representation of assets stored in the src/assets of the project.
- Since:
- 0.13.0
-
getCircularIcon
Icon getCircularIcon()Returns the circular Cluster Type logo for display when a user needs to view or add this cluster. SVGs are preferred.- Returns:
- Icon
- Since:
- 1.2.12
-
refresh
Clusters are refreshed periodically by the Morpheus Environment. This includes things like caching of brownfield environments and resources such as Networks, Datastores, Resource Pools, etc.- Parameters:
cluster- the cluster details
-
deleteCluster
Called when a cluster is being deleted. This is a chance to clean up any external resources associated with the cluster- Parameters:
cluster- the cluster details- Since:
- 1.2.12
-
deleteServer
Called when a server is being deleted. This is a chance to clean up any external resources associated with the server- Parameters:
server- the server details- Since:
- 1.2.13
-
refreshDaily
Clusters are refreshed periodically by the Morpheus Environment. This includes things like caching of brownfield environments and resources such as Networks, Datastores, Resource Pools, etc. This represents the long term sync method that happens daily instead of every 5-10 minute cycle- Parameters:
cluster- the cluster details
-
validateServerGroupConfig
Validates the server group configuration for a given cluster type.- Parameters:
clusterType- the ComputeServerGroupTypeconfig- the configuration map for the server group- Returns:
- ServiceResponse containing validation results
- Since:
- 1.2.12
-
validateServerGroup
Validates the server group for a given cluster.- Parameters:
cluster- the ComputeServerGroup- Returns:
- ServiceResponse containing validation results
- Since:
- 1.2.12
-
isRefreshable
Checks if the cluster can be refreshed by Morpheus. May return false if the cluster is in a bad state or has no credentials- Parameters:
cluster- the ComputeServerGroup to check- Returns:
- true if the cluster is syncable, false otherwise
- Since:
- 1.2.12
-
getOptionTypes
Collection<OptionType> getOptionTypes()Provides a Collection of OptionType inputs that define the required input fields for defining a cloud integration- Returns:
- Collection of OptionType
- Since:
- 1.2.12
-
getAvailableProvisionProviders
Collection<ProvisionProvider> getAvailableProvisionProviders()Grabs available provisioning providers related to the target Cloud Plugin. Some clouds have multiple provisioning providers or some clouds allow for service based providers on top like (Docker or Kubernetes).- Returns:
- Collection of ProvisionProvider
- Since:
- 1.2.12
-
getProvisionProvider
Grabs the singleton instance of the provisioning provider based on the code defined in its implementation. Typically Providers are singleton and instanced in thePluginclass- Parameters:
providerCode- String representation of the provider short code- Returns:
- the ProvisionProvider requested
- Since:
- 1.2.12
-
getNetworkTypes
Collection<NetworkType> getNetworkTypes()Provides a Collection ofNetworkTyperelated to this ClusterProvider- Returns:
- Collection of NetworkType
- Since:
- 1.2.12
-
getSupportedNetworkProviderCodes
A list of supported NetworkProviders that can be used for networking services on this cloud- Returns:
- a list of codes for network providers from either this plugin or other plugins.
- Since:
- 1.2.12
-
getControllerTypes
Collection<ComputeType> getControllerTypes()Provides a Collection of ComputeTypes that can be controllers on this ClusterProvider- Returns:
- Collection of ComputeType
- Since:
- 1.2.12
-
getWorkerTypes
Collection<ComputeType> getWorkerTypes()Provides a Collection of ComputeTypes that can be workers on this ClusterProvider- Returns:
- Collection of ComputeType
- Since:
- 1.2.12
-
getDatastoreTypes
Collection<DatastoreType> getDatastoreTypes()Provides a Collection ofDatastoreTyperelated to this ClusterProvider- Returns:
- Collection of DatastoreType
- Since:
- 1.2.12
-
getDefaultNamespace
Provides the default namespace (should be aCloudPool) for this cluster- Returns:
- the default namespace for the cluster
- Since:
- 1.2.12
-
hasClusterStorage
Indicates whether this cluster type supports cluster storage- Returns:
- true if cluster storage is supported, false otherwise
- Since:
- 1.2.12
-
hasDatastoreStorage
Indicates whether this cluster type supports datastore storage- Returns:
- true if datastore storage is supported, false otherwise
- Since:
- 1.2.12
-
hasDefaultDataDisk
Indicates whether this cluster type supports a default data disk- Returns:
- true if a default data disk is supported, false otherwise
- Since:
- 1.2.12
-
hasMasters
Indicates whether this cluster type supports master nodes- Returns:
- true if master nodes are supported, false otherwise
- Since:
- 1.2.12
-
hasWorkers
Indicates whether this cluster type supports worker nodes- Returns:
- true if worker nodes are supported, false otherwise
- Since:
- 1.2.12
-
hasAffinityGroups
Indicates whether this cluster type supports affinity groups- Returns:
- true if affinity groups are supported, false otherwise
- Since:
- 1.2.12
-
useLocalKubeCtl
Indicates whether this cluster type should use kubectl locally- Returns:
- true if local kubectl should be used, false otherwise
- Since:
- 1.2.12
-
supportsCloudScaling
Indicates whether this cluster type supports cloud scaling (e.g. auto-scaling like EKS or GKE)- Returns:
- true if cloud scaling is supported, false otherwise
- Since:
- 1.2.12
-
canDeleteVirtualImages
Indicates whether this cluster type can delete virtual images associated with the cluster.- Returns:
- true if virtual images are supported, false otherwise
- Since:
- 1.2.12
-
supportsCustomLayouts
Indicates whether this cluster type supports custom layouts- Returns:
- true if custom layouts are supported, false otherwise
- Since:
- 1.2.12
-
hasPricing
Indicates whether this cluster type supports pricing- Returns:
- true if pricing is supported, false otherwise
- Since:
- 1.2.12
-
getDeployTargetService
By default, the cluster will use the plugin deploy service, if you'd like to use the built-in kubernetes deploy service, set this to "kubernetesDeployTargetService"- Returns:
- String name of the deploy target service
- Since:
- 1.2.12
-
getProviderType
String getProviderType()Returns the provider type for this cluster provider, such as "kubernetes", "docker", "kvm", etc. This is used in various places to manage default behaviors and configurations for the cluster type.- Returns:
- String representation of the provider type
- Since:
- 1.2.12
-
convertClusterToManaged
Converts a discovered cluster to a managed cluster- Parameters:
cluster- the ComputeServerGroup to convert- Returns:
- ServiceResponse indicating success or failure
- Since:
- 1.2.12
-
finalizeLinuxComputeServer
default ServiceResponse finalizeLinuxComputeServer(ComputeServerGroup cluster, ComputeServer server, Map opts) Hook for finalizing any configuration on a linux compute server before it is saved, defaults to no-op- Parameters:
cluster- the ComputeServerGroup the server belongs toserver- the ComputeServer to finalizeopts- additional options- Returns:
- ServiceResponse indicating success or failure
- Since:
- 1.2.12
-
getIacResourceMappingProvider
If the cloud supports IaC based provisioning, return the mapping provider here and implement theProvisionProvider.IacResourceFacetin your ProvisionProvider- Returns:
- an instance of a cloud specific IacResourceMappingProvider.
- Since:
- 1.2.13
-
getAvailableBackupProviders
Grabs available backup providers related to the target cluster plugin.- Returns:
- Collection of BackupProvider
- Since:
- 1.2.13
-
getTabList
-