Interface HostProvisionProvider

All Superinterfaces:
ComputeProvisionProvider, PluginProvider, ProvisionProvider
All Known Subinterfaces:
VmProvisionProvider

public interface HostProvisionProvider extends ComputeProvisionProvider
Provides methods for interacting with the provisioning engine of Morpheus for host and vms directly
Since:
0.15.3
  • Method Details

    • validateHost

      ServiceResponse validateHost(ComputeServer server, Map opts)
      Validate the provided provisioning options for a Docker host server. A return of success = false will halt the creation and display errors
      Parameters:
      server - the ComputeServer to validate
      opts - options
      Returns:
      Response from API
    • prepareHost

      ServiceResponse<PrepareHostResponse> prepareHost(ComputeServer server, HostRequest hostRequest, Map opts)
      This method is called before runHost and provides an opportunity to perform action or obtain configuration that will be needed in runHost. At the end of this method, if deploying a ComputeServer with a VirtualImage, the sourceImage on ComputeServer should be determined and saved.
      Parameters:
      server - the ComputeServer object we intend to provision along with some of the associated data needed to determine how best to provision the server
      hostRequest - the HostRequest object containing the various configurations that may be needed in running the server. This will be passed along into runHost
      opts - additional configuration options that may have been passed during provisioning
      Returns:
      Response from API
    • runHost

      ServiceResponse<ProvisionResponse> runHost(ComputeServer server, HostRequest hostRequest, Map opts)
      This method is called to provision a Host (i.e. Docker host). Information associated with the passed ComputeServer object is used to kick off the provision request. Implementations of this method should populate ProvisionResponse as complete as possible and as quickly as possible. Implementations may choose to save the externalId on the ComputeServer or pass it back in ProvisionResponse.
      Parameters:
      server - the ComputeServer object we intend to provision along with some of the associated data needed to determine how best to provision the server
      hostRequest - the HostRequest object containing the various configurations that may be needed in running the server.
      opts - additional configuration options that may have been passed during provisioning
      Returns:
      Response from API
    • waitForHost

      default ServiceResponse<ProvisionResponse> waitForHost(ComputeServer server)
      This method is called after runHost returns successfully and provides implementations a mechanism to wait for the ComputeServer to finish the creation process in the underlying Cloud. ProvisionResponse should be filled out as complete as possible.
      Parameters:
      server - the ComputeServer object to wait for
      Returns:
    • finalizeHost

      ServiceResponse finalizeHost(ComputeServer server)
      This method is called after successful completion of runHost and successful completion of waitForHost and provides an opportunity to perform some final actions during the provisioning process. For example, ejected CDs, cleanup actions, etc
      Parameters:
      server - the ComputeServer object that has been provisioned
      Returns:
      Response from the API