Class StreamDeploymentController
java.lang.Object
org.springframework.cloud.dataflow.server.controller.StreamDeploymentController
@RestController
@RequestMapping("/streams/deployments")
@ExposesResourceFor(StreamDeploymentResource.class)
public class StreamDeploymentController
extends Object
Controller for deployment operations on
StreamDefinition
s. Support for stream
update, rollback, and update history by delegating to StreamService
.- Author:
- Eric Bottard, Mark Fisher, Patrick Peralta, Ilayaperumal Gopinathan, Marius Bogoevici, Janne Valkealahti, Christian Tzolov, Gunnar Hillert, Christian Tzolov
-
Constructor Summary
ConstructorsConstructorDescriptionStreamDeploymentController
(StreamDefinitionRepository repository, StreamService streamService, StreamDefinitionService streamDefinitionService) Construct a new UpdatableStreamDeploymentController, given aStreamDeploymentController
andStreamService
andStreamDefinitionService
-
Method Summary
Modifier and TypeMethodDescriptionRequest deployment of an existing stream definition.Collection<org.springframework.cloud.skipper.domain.Release>
Request deployment of an existing stream definition.Collection<org.springframework.cloud.skipper.domain.Deployer>
scaleApplicationInstances
(String streamName, String appName, Integer count, Map<String, String> properties) Scale application instances in a deployed stream.Request un-deployment of an existing stream.Request un-deployment of all streams.update
(String name, UpdateStreamRequest updateStreamRequest)
-
Constructor Details
-
StreamDeploymentController
public StreamDeploymentController(StreamDefinitionRepository repository, StreamService streamService, StreamDefinitionService streamDefinitionService) Construct a new UpdatableStreamDeploymentController, given aStreamDeploymentController
andStreamService
andStreamDefinitionService
- Parameters:
repository
- the repository this controller will use for stream CRUD operationsstreamService
- the underlying UpdatableStreamService to deploy the streamstreamDefinitionService
- the StreamDefinitionService
-
-
Method Details
-
scaleApplicationInstances
@PostMapping("/scale/{streamName}/{appName}/instances/{count}") public ResponseEntity<Void> scaleApplicationInstances(@PathVariable String streamName, @PathVariable String appName, @PathVariable Integer count, @RequestBody(required=false) Map<String, String> properties) Scale application instances in a deployed stream.- Parameters:
streamName
- the name of an existing stream definition (required)appName
- in stream application name to scale (required)count
- number of instances for the selected stream application (required)properties
- scale deployment specific properties (optional)- Returns:
- response without a body
-
update
@PostMapping("/update/{name}") public ResponseEntity<Void> update(@PathVariable String name, @RequestBody UpdateStreamRequest updateStreamRequest) -
rollback
@PostMapping("/rollback/{name}/{version}") public ResponseEntity<Void> rollback(@PathVariable String name, @PathVariable Integer version) -
manifest
@GetMapping("/manifest/{name}/{version}") public ResponseEntity<String> manifest(@PathVariable String name, @PathVariable Integer version) -
history
@GetMapping("/history/{name}") @ResponseStatus(OK) public Collection<org.springframework.cloud.skipper.domain.Release> history(@PathVariable("name") String releaseName) -
platformList
@GetMapping("/platform/list") @ResponseStatus(OK) public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList() -
undeploy
Request un-deployment of an existing stream.- Parameters:
name
- the name of an existing stream (required)- Returns:
- response without a body
-
undeployAll
Request un-deployment of all streams.- Returns:
- instance of
ResponseEntity
-
info
@GetMapping("/{name}") @ResponseStatus(OK) public StreamDeploymentResource info(@PathVariable String name, @RequestParam(value="reuse-deployment-properties",required=false) boolean reuseDeploymentProperties) Request deployment of an existing stream definition.- Parameters:
name
- the name of an existing stream definition (required)reuseDeploymentProperties
- Indicator to re-use deployment properties.- Returns:
- The stream deployment
-
deploy
@PostMapping("/{name}") public ResponseEntity<Void> deploy(@PathVariable String name, @RequestBody(required=false) Map<String, String> properties) Request deployment of an existing stream definition.- Parameters:
name
- the name of an existing stream definition (required)properties
- the deployment properties for the stream as a comma-delimited list of key=value pairs- Returns:
- response without a body
-