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)
StreamDeployerstreamState in interface StreamDeployerstreamName - stream namepublic Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> streamsStates(List<StreamDefinition> streamDefinitions)
StreamDeployerstreamsStates in interface StreamDeployerstreamDefinitions - list of stream definitionspublic void scale(String streamName, String appName, int count, Map<String,String> properties)
StreamDeployerscale in interface StreamDeployerstreamName - 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)
StreamDeployergetAppStatuses in interface StreamDeployerpageable - Pagination informationpublic org.springframework.cloud.deployer.spi.app.AppStatus getAppStatus(String appDeploymentId)
StreamDeployergetAppStatus in interface StreamDeployerappDeploymentId - the id of the application instance running in the target runtime environmentpublic List<org.springframework.cloud.deployer.spi.app.AppStatus> getStreamStatuses(String streamName)
StreamDeployergetStreamStatuses in interface StreamDeployerstreamName - Stream name to retrieve the runtime application statuses forpublic Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>> getStreamStatuses(String[] streamNames)
StreamDeployergetStreamStatuses in interface StreamDeployerstreamNames - Stream names to retrieve the runtime application statuses forpublic org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName)
StreamDeployergetLog in interface StreamDeployerstreamName - the stream namepublic org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName, String appName)
StreamDeployergetLog in interface StreamDeployerstreamName - the stream nameappName - specific application name inside the streampublic org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo environmentInfo()
environmentInfo in interface StreamDeployerpublic StreamDeployment getStreamInfo(String streamName)
StreamDeployergetStreamInfo in interface StreamDeployerstreamName - the name of the streampublic List<String> getStreams()
StreamDeployergetStreams in interface StreamDeployerpublic String getFromActuator(String appId, String instanceId, String endpoint)
StreamDeployergetFromActuator in interface StreamDeployerappId - the application idinstanceId - the application instance idendpoint - the relative actuator path, e.g., /infopublic Object postToActuator(String appId, String instanceId, org.springframework.cloud.skipper.domain.ActuatorPostRequest actuatorPostRequest)
StreamDeployerpostToActuator in interface StreamDeployerappId - 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 toReleasepublic Collection<org.springframework.cloud.skipper.domain.Release> history(String releaseName)
public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.