Ber*_*sch 2 deployment configuration spring spring-cloud-dataflow
我有一个 Spring Cloud Data Flow 实例,其中包含我需要的应用程序和流。我什至编写了在命令 shell 中运行的脚本来一次部署所有这些东西。问题是我现在需要执行手动步骤,而不仅仅是开箱即用。
对于 Windows 和 Linux,我知道如何通过 shell 运行脚本并在脚本运行时结束脚本。
问题是我似乎可以使用 Spring Data Flow Shell 做同样的事情。我想做这样的事情:
java -jar spring-cloud-dataflow-shell.jar --runScript my-awesome-script.shell
Run Code Online (Sandbox Code Playgroud)
但是,我看不到任何说明存在类似内容的文档。我能找到的每个选项都不会运行脚本并保持外壳打开。或者还有另一种我完全不知道的选择。我 15 年的 Java 经验被过去 6 年的 .Net 打断了,Spring 看起来与以前完全不同了。
有时我真是个笨蛋。昨天搜索了一整天后,我突然想到使用该--help
选项来获取 shell 的命令行选项。
C:\Dev>java -jar spring-cloud-dataflow-shell-1.2.1.RELEASE.jar --help
Data Flow Options:
--dataflow.uri=<uri> Address of the Data Flow Server [default: http://localhost:9393].
--dataflow.username=<USER> Username of the Data Flow Server [no default].
--dataflow.password=<PASSWORD> Password of the Data Flow Server [no default].
--dataflow.credentials-provider-command=<COMMAND> Executes an external command which must return an OAuth Access Token [no default].
--dataflow.skip-ssl-validation=<true|false> Accept any SSL certificate (even self-signed) [default: no].
--spring.shell.historySize=<SIZE> Default size of the shell log file [default: 3000].
--spring.shell.commandFile=<FILE> Data Flow Shell executes commands read from the file(s) and then exits.
--help This message.
Run Code Online (Sandbox Code Playgroud)
当我尝试该--spring.shell.commandFile
选项时,它完全按照我需要 shell 执行的操作:运行脚本并结束。
java -jar spring-cloud-data-flow-shell.jar --spring.shell.commandFile=my-awesome-script.shell
Run Code Online (Sandbox Code Playgroud)
注意:Spring 网站上的文档根本没有提到这一点。如果这是可以通过 Spring Config Server 完成的事情,我也想了解一下。
归档时间: |
|
查看次数: |
2195 次 |
最近记录: |