public class SkipperStreamDeployer extends Object implements StreamDeployer
Constructor and Description |
---|
SkipperStreamDeployer(org.springframework.cloud.skipper.client.SkipperClient skipperClient,
StreamDefinitionRepository streamDefinitionRepository,
AppRegistryService appRegistryService,
ForkJoinPool forkJoinPool,
StreamDefinitionService streamDefinitionService) |
Modifier and Type | Method and Description |
---|---|
org.springframework.cloud.skipper.domain.Release |
deployStream(StreamDeploymentRequest streamDeploymentRequest) |
static List<org.springframework.cloud.deployer.spi.app.AppStatus> |
deserializeAppStatus(String platformStatus) |
org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo |
environmentInfo() |
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
|
String |
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.
|
StreamDeployment |
getStreamInfo(String streamName)
Get stream information (including the deployment properties) for the given stream name.
|
List<String> |
getStreams()
Returns the list of stream names that correspond to the currently available skipper releases.
|
List<org.springframework.cloud.deployer.spi.app.AppStatus> |
getStreamStatuses(String streamName)
Returns the deployed application statuses part for the streamName stream.
|
Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>> |
getStreamStatuses(String[] streamNames)
Returns the deployed application statuses part for the streamName streams.
|
Collection<org.springframework.cloud.skipper.domain.Release> |
history(String releaseName) |
String |
manifest(String name) |
String |
manifest(String name,
int version) |
Collection<org.springframework.cloud.skipper.domain.Deployer> |
platformList() |
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.
|
org.springframework.cloud.skipper.domain.Release |
rollbackStream(String streamName,
int releaseVersion)
Rollback the stream to a specific version
|
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.
|
void |
undeployStream(String streamName) |
org.springframework.cloud.skipper.domain.Release |
upgradeStream(String streamName,
org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier,
String configYml,
boolean force,
List<String> appNames)
Update the stream identified by the PackageIdentifier and runtime configuration values.
|
void |
validateAppVersionIsRegistered(StreamDefinition streamDefinition,
org.springframework.cloud.deployer.spi.core.AppDeploymentRequest appDeploymentRequest,
String appVersion) |
public SkipperStreamDeployer(org.springframework.cloud.skipper.client.SkipperClient skipperClient, StreamDefinitionRepository streamDefinitionRepository, AppRegistryService appRegistryService, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService)
public static List<org.springframework.cloud.deployer.spi.app.AppStatus> deserializeAppStatus(String platformStatus)
public org.springframework.cloud.deployer.spi.app.DeploymentState streamState(String streamName)
StreamDeployer
streamState
in interface StreamDeployer
streamName
- stream namepublic Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> streamsStates(List<StreamDefinition> streamDefinitions)
StreamDeployer
streamsStates
in interface StreamDeployer
streamDefinitions
- list of stream definitionspublic void scale(String streamName, String appName, int count, Map<String,String> properties)
StreamDeployer
scale
in interface StreamDeployer
streamName
- the stream nameappName
- the app namecount
- the countproperties
- the propertiespublic org.springframework.cloud.skipper.domain.Release deployStream(StreamDeploymentRequest streamDeploymentRequest)
public void validateAppVersionIsRegistered(StreamDefinition streamDefinition, org.springframework.cloud.deployer.spi.core.AppDeploymentRequest appDeploymentRequest, String appVersion)
public void undeployStream(String streamName)
public org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.app.AppStatus> getAppStatuses(org.springframework.data.domain.Pageable pageable)
StreamDeployer
getAppStatuses
in interface StreamDeployer
pageable
- Pagination informationpublic org.springframework.cloud.deployer.spi.app.AppStatus getAppStatus(String appDeploymentId)
StreamDeployer
getAppStatus
in interface StreamDeployer
appDeploymentId
- the id of the application instance running in the target runtime environmentpublic List<org.springframework.cloud.deployer.spi.app.AppStatus> getStreamStatuses(String streamName)
StreamDeployer
getStreamStatuses
in interface StreamDeployer
streamName
- Stream name to retrieve the runtime application statuses forpublic Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>> getStreamStatuses(String[] streamNames)
StreamDeployer
getStreamStatuses
in interface StreamDeployer
streamNames
- Stream names to retrieve the runtime application statuses forpublic org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName)
StreamDeployer
getLog
in interface StreamDeployer
streamName
- the stream namepublic org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName, String appName)
StreamDeployer
getLog
in interface StreamDeployer
streamName
- the stream nameappName
- specific application name inside the streampublic org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo environmentInfo()
environmentInfo
in interface StreamDeployer
public StreamDeployment getStreamInfo(String streamName)
StreamDeployer
getStreamInfo
in interface StreamDeployer
streamName
- the name of the streampublic List<String> getStreams()
StreamDeployer
getStreams
in interface StreamDeployer
public String getFromActuator(String appId, String instanceId, String endpoint)
StreamDeployer
getFromActuator
in interface StreamDeployer
appId
- the application idinstanceId
- the application instance idendpoint
- the relative actuator path, e.g., /info
public Object postToActuator(String appId, String instanceId, org.springframework.cloud.skipper.domain.ActuatorPostRequest actuatorPostRequest)
StreamDeployer
postToActuator
in interface StreamDeployer
appId
- the deployer assigned guid of the app instanceinstanceId
- the application instance idactuatorPostRequest
- the request body containing the endpoint and data to pass to the endpointpublic org.springframework.cloud.skipper.domain.Release upgradeStream(String streamName, org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier, String configYml, boolean force, List<String> appNames)
streamName
- the name of the stream to upgradepackageIdentifier
- the name of the package in skipperconfigYml
- the YML formatted configuration values to use when upgradingforce
- the flag to indicate if the stream update is forced even if there are no differences from the existing streamappNames
- the app names to updatepublic org.springframework.cloud.skipper.domain.Release rollbackStream(String streamName, int releaseVersion)
streamName
- the name of the stream to rollbackreleaseVersion
- the version of the stream to rollback toRelease
public Collection<org.springframework.cloud.skipper.domain.Release> history(String releaseName)
public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()
Copyright © 2024 Pivotal Software, Inc.. All rights reserved.