Interface StreamDeployer

All Known Implementing Classes:
SkipperStreamDeployer

public interface StreamDeployer
SPI for handling deployment related operations on the apps in a stream.
Author:
Mark Pollack, Ilayaperumal Gopinathan, Christian Tzolov, Chris Bono
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo
     
    org.springframework.cloud.deployer.spi.app.AppStatus
    getAppStatus(String appDeploymentId)
    Gets runtime application status
    org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.app.AppStatus>
    getAppStatuses(org.springframework.data.domain.Pageable pageable)
    Returns application statuses of all deployed applications
    getFromActuator(String appId, String instanceId, String endpoint)
    Access an HTTP GET exposed actuator resource for a deployed app instance.
    org.springframework.cloud.skipper.domain.LogInfo
    getLog(String streamName)
    Returns the logs of all the applications of the stream identified by the stream name.
    org.springframework.cloud.skipper.domain.LogInfo
    getLog(String streamName, String appName)
    Returns the logs of a specific application in the stream identified by the stream name.
    getStreamInfo(String streamName)
    Get stream information (including the deployment properties) for the given stream name.
    Returns the list of stream names that correspond to the currently available skipper releases.
    List<org.springframework.cloud.deployer.spi.app.AppStatus>
    Returns the deployed application statuses part for the streamName stream.
    Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>>
    getStreamStatuses(String[] streamName)
    Returns the deployed application statuses part for the streamName streams.
    postToActuator(String appId, String instanceId, org.springframework.cloud.skipper.domain.ActuatorPostRequest actuatorPostRequest)
    Access an HTTP POST exposed actuator resource for a deployed app instance.
    void
    scale(String streamName, String appName, int count, Map<String,String> properties)
    For a selected stream scales the number of appName instances to count.
    Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState>
    streamsStates(List<StreamDefinition> streamDefinitions)
    Get the deployment states for a list of stream definitions
    org.springframework.cloud.deployer.spi.app.DeploymentState
    streamState(String streamName)
    Get the deployment state of a stream.
  • Method Details

    • streamState

      org.springframework.cloud.deployer.spi.app.DeploymentState streamState(String streamName)
      Get the deployment state of a stream. Stream state is computed from the deployment states of its apps.
      Parameters:
      streamName - stream name
      Returns:
      the deployment status
    • streamsStates

      Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> streamsStates(List<StreamDefinition> streamDefinitions)
      Get the deployment states for a list of stream definitions
      Parameters:
      streamDefinitions - list of stream definitions
      Returns:
      map of stream definition and its corresponding deployment state
    • getAppStatuses

      org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.app.AppStatus> getAppStatuses(org.springframework.data.domain.Pageable pageable)
      Returns application statuses of all deployed applications
      Parameters:
      pageable - Pagination information
      Returns:
      pagable list of all app statuses
    • getAppStatus

      org.springframework.cloud.deployer.spi.app.AppStatus getAppStatus(String appDeploymentId)
      Gets runtime application status
      Parameters:
      appDeploymentId - the id of the application instance running in the target runtime environment
      Returns:
      app status
    • getStreamStatuses

      List<org.springframework.cloud.deployer.spi.app.AppStatus> getStreamStatuses(String streamName)
      Returns the deployed application statuses part for the streamName stream.
      Parameters:
      streamName - Stream name to retrieve the runtime application statuses for
      Returns:
      List of runtime application statuses, part of the requested streamName.
    • getStreamStatuses

      Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>> getStreamStatuses(String[] streamName)
      Returns the deployed application statuses part for the streamName streams.
      Parameters:
      streamName - Stream names to retrieve the runtime application statuses for
      Returns:
      Map of runtime application statuses, part of the requested streamName.
    • environmentInfo

      org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo environmentInfo()
      Returns:
      the runtime environment info for deploying streams.
    • getStreamInfo

      StreamDeployment getStreamInfo(String streamName)
      Get stream information (including the deployment properties) for the given stream name.
      Parameters:
      streamName - the name of the stream
      Returns:
      stream deployment information
    • getLog

      org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName)
      Returns the logs of all the applications of the stream identified by the stream name.
      Parameters:
      streamName - the stream name
      Returns:
      the logs content
    • getLog

      org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName, String appName)
      Returns the logs of a specific application in the stream identified by the stream name.
      Parameters:
      streamName - the stream name
      appName - specific application name inside the stream
      Returns:
      the logs content
    • scale

      void scale(String streamName, String appName, int count, Map<String,String> properties)
      For a selected stream scales the number of appName instances to count.
      Parameters:
      streamName - the stream name
      appName - the app name
      count - the count
      properties - the properties
    • getStreams

      List<String> getStreams()
      Returns the list of stream names that correspond to the currently available skipper releases.
      Returns:
      list of string names currently available
    • getFromActuator

      String getFromActuator(String appId, String instanceId, String endpoint)
      Access an HTTP GET exposed actuator resource for a deployed app instance.
      Parameters:
      appId - the application id
      instanceId - the application instance id
      endpoint - the relative actuator path, e.g., /info
      Returns:
      the contents as JSON text
    • postToActuator

      Object postToActuator(String appId, String instanceId, org.springframework.cloud.skipper.domain.ActuatorPostRequest actuatorPostRequest)
      Access an HTTP POST exposed actuator resource for a deployed app instance.
      Parameters:
      appId - the deployer assigned guid of the app instance
      instanceId - the application instance id
      actuatorPostRequest - the request body containing the endpoint and data to pass to the endpoint
      Returns:
      the response from actuator.