Interface ClusterProvider

All Superinterfaces:
PluginProvider

public interface ClusterProvider extends 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
  • 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

      ServiceResponse deleteCluster(ComputeServerGroup cluster)
      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

      ServiceResponse deleteServer(ComputeServer server)
      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

      ServiceResponse refreshDaily(ComputeServerGroup cluster)
      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

      ServiceResponse validateServerGroupConfig(ComputeServerGroupType clusterType, Map config)
      Validates the server group configuration for a given cluster type.
      Parameters:
      clusterType - the ComputeServerGroupType
      config - the configuration map for the server group
      Returns:
      ServiceResponse containing validation results
      Since:
      1.2.12
    • validateServerGroup

      ServiceResponse validateServerGroup(ComputeServerGroup cluster)
      Validates the server group for a given cluster.
      Parameters:
      cluster - the ComputeServerGroup
      Returns:
      ServiceResponse containing validation results
      Since:
      1.2.12
    • isRefreshable

      default boolean isRefreshable(ComputeServerGroup cluster)
      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

      ProvisionProvider getProvisionProvider(String providerCode)
      Grabs the singleton instance of the provisioning provider based on the code defined in its implementation. Typically Providers are singleton and instanced in the Plugin class
      Parameters:
      providerCode - String representation of the provider short code
      Returns:
      the ProvisionProvider requested
      Since:
      1.2.12
    • getNetworkTypes

      Collection<NetworkType> getNetworkTypes()
      Provides a Collection of NetworkType related to this ClusterProvider
      Returns:
      Collection of NetworkType
      Since:
      1.2.12
    • getSupportedNetworkProviderCodes

      default Collection<String> 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 of DatastoreType related to this ClusterProvider
      Returns:
      Collection of DatastoreType
      Since:
      1.2.12
    • getDefaultNamespace

      CloudPool getDefaultNamespace(ComputeServerGroup cluster)
      Provides the default namespace (should be a CloudPool) for this cluster
      Returns:
      the default namespace for the cluster
      Since:
      1.2.12
    • hasClusterStorage

      default Boolean hasClusterStorage()
      Indicates whether this cluster type supports cluster storage
      Returns:
      true if cluster storage is supported, false otherwise
      Since:
      1.2.12
    • hasDatastoreStorage

      default Boolean hasDatastoreStorage()
      Indicates whether this cluster type supports datastore storage
      Returns:
      true if datastore storage is supported, false otherwise
      Since:
      1.2.12
    • hasDefaultDataDisk

      default Boolean 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

      default Boolean hasMasters()
      Indicates whether this cluster type supports master nodes
      Returns:
      true if master nodes are supported, false otherwise
      Since:
      1.2.12
    • hasWorkers

      default Boolean hasWorkers()
      Indicates whether this cluster type supports worker nodes
      Returns:
      true if worker nodes are supported, false otherwise
      Since:
      1.2.12
    • hasAffinityGroups

      default Boolean hasAffinityGroups()
      Indicates whether this cluster type supports affinity groups
      Returns:
      true if affinity groups are supported, false otherwise
      Since:
      1.2.12
    • useLocalKubeCtl

      default Boolean 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

      default Boolean 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

      default Boolean 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

      default Boolean supportsCustomLayouts()
      Indicates whether this cluster type supports custom layouts
      Returns:
      true if custom layouts are supported, false otherwise
      Since:
      1.2.12
    • hasPricing

      default Boolean hasPricing()
      Indicates whether this cluster type supports pricing
      Returns:
      true if pricing is supported, false otherwise
      Since:
      1.2.12
    • getDeployTargetService

      default String 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

      ServiceResponse convertClusterToManaged(ComputeServerGroup cluster)
      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 to
      server - the ComputeServer to finalize
      opts - additional options
      Returns:
      ServiceResponse indicating success or failure
      Since:
      1.2.12
    • getIacResourceMappingProvider

      default IacResourceMappingProvider getIacResourceMappingProvider()
      If the cloud supports IaC based provisioning, return the mapping provider here and implement the ProvisionProvider.IacResourceFacet in your ProvisionProvider
      Returns:
      an instance of a cloud specific IacResourceMappingProvider.
      Since:
      1.2.13
    • getAvailableBackupProviders

      default Collection<BackupProvider> getAvailableBackupProviders()
      Grabs available backup providers related to the target cluster plugin.
      Returns:
      Collection of BackupProvider
      Since:
      1.2.13
    • getTabList

      default ClusterTabList getTabList()