/** * Deploy the current stream using the deploymentProperties. This method invokes the * remote server * @param deploymentProperties Map of properties to be used during deployment * @return A deployed {@link Stream} */ public Stream deploy(Map<String, String> deploymentProperties) { Map<String, String> resolvedProperties = resolveDeploymentProperties( deploymentProperties); client.streamOperations().deploy(this.name, resolvedProperties); return new Stream(this.name, this.applications, this.definition, this.client); }
/** * Deploy the current stream using the deploymentProperties. This method invokes the * remote server * @param deploymentProperties Map of properties to be used during deployment * @return A deployed {@link Stream} */ public Stream deploy(Map<String, String> deploymentProperties) { Map<String, String> resolvedProperties = resolveDeploymentProperties( deploymentProperties); client.streamOperations().deploy(this.name, resolvedProperties); return new Stream(this.name, this.applications, this.definition, this.client); }
@CliCommand(value = STREAM_DEPLOY, help = "Deploy a previously created stream using Skipper") public String deployStream( @CliOption(key = { "", "name" }, help = "the name of the stream to deploy", mandatory = true, optionContext = "existing-stream disable-string-converter") String name, @CliOption(key = { PROPERTIES_OPTION }, help = "the properties for this deployment") String deploymentProperties, @CliOption(key = { PROPERTIES_FILE_OPTION }, help = "the properties for this deployment (as a File)") File propertiesFile, @CliOption(key = "packageVersion", help = "the package version of the package to deploy. Default is 1.0.0", unspecifiedDefaultValue = "1.0.0") String packageVersion, @CliOption(key = "platformName", help = "the name of the target platform to deploy to") String platformName, @CliOption(key = "repoName", help = "the name of the local repository to upload the package to") String repoName) throws IOException { int which = Assertions.atMostOneOf(PROPERTIES_OPTION, deploymentProperties, PROPERTIES_FILE_OPTION, propertiesFile); Map<String, String> propertiesToUse = DeploymentPropertiesUtils.parseDeploymentProperties(deploymentProperties, propertiesFile, which); propertiesToUse.put(SkipperStream.SKIPPER_PACKAGE_NAME, name); Assert.isTrue(StringUtils.hasText(packageVersion), "Package version must be set."); propertiesToUse.put(SkipperStream.SKIPPER_PACKAGE_VERSION, packageVersion); if (StringUtils.hasText(platformName)) { propertiesToUse.put(SkipperStream.SKIPPER_PLATFORM_NAME, platformName); } if (StringUtils.hasText(repoName)) { propertiesToUse.put(SkipperStream.SKIPPER_REPO_NAME, repoName); } streamOperations().deploy(name, propertiesToUse); return String.format("Deployment request has been sent for stream '%s'", name); }
@CliCommand(value = STREAM_SKIPPER_DEPLOY, help = "Deploy a previously created stream using Skipper") public String deployStream( @CliOption(key = { "", "name" }, help = "the name of the stream to deploy", mandatory = true, optionContext = "existing-stream disable-string-converter") String name, @CliOption(key = { PROPERTIES_OPTION }, help = "the properties for this deployment") String deploymentProperties, @CliOption(key = { PROPERTIES_FILE_OPTION }, help = "the properties for this deployment (as a File)") File propertiesFile, @CliOption(key = "packageVersion", help = "the package version of the package to deploy. Default is 1.0.0" + "when using Skipper", unspecifiedDefaultValue = "1.0.0") String packageVersion, @CliOption(key = "platformName", help = "the name of the target platform to deploy when using Skipper") String platformName, @CliOption(key = "repoName", help = "the name of the local repository to upload the package when using " + "Skipper") String repoName) throws IOException { int which = Assertions.atMostOneOf(PROPERTIES_OPTION, deploymentProperties, PROPERTIES_FILE_OPTION, propertiesFile); Map<String, String> propertiesToUse = DeploymentPropertiesUtils.parseDeploymentProperties(deploymentProperties, propertiesFile, which); propertiesToUse.put(SkipperStream.SKIPPER_PACKAGE_NAME, name); Assert.isTrue(StringUtils.hasText(packageVersion), "Package version must be set when using Skipper."); propertiesToUse.put(SkipperStream.SKIPPER_PACKAGE_VERSION, packageVersion); if (StringUtils.hasText(platformName)) { propertiesToUse.put(SkipperStream.SKIPPER_PLATFORM_NAME, platformName); } if (StringUtils.hasText(repoName)) { propertiesToUse.put(SkipperStream.SKIPPER_REPO_NAME, repoName); } streamOperations().deploy(name, propertiesToUse); return String.format("Deployment request has been sent for stream '%s'", name); }
@CliCommand(value = DEPLOY_STREAM, help = "Deploy a previously created stream") public String deployStream( @CliOption(key = { "", "name" }, help = "the name of the stream to deploy", mandatory = true, optionContext = "existing-stream disable-string-converter") String name, @CliOption(key = { PROPERTIES_OPTION }, help = "the properties for this deployment") String deploymentProperties, @CliOption(key = { PROPERTIES_FILE_OPTION }, help = "the properties for this deployment (as a File)") File propertiesFile) throws IOException { int which = Assertions.atMostOneOf(PROPERTIES_OPTION, deploymentProperties, PROPERTIES_FILE_OPTION, propertiesFile); Map<String, String> propertiesToUse = DeploymentPropertiesUtils.parseDeploymentProperties(deploymentProperties, propertiesFile, which); streamOperations().deploy(name, propertiesToUse); return String.format("Deployment request has been sent for stream '%s'\n", name); } }