Skipper 命令
22. 打包命令
Skipper 的软件包命令包括以下内容:
22.1. 搜索
此命令搜索现有包。
- 名字
-
package search - 搜索 package。
- 概要
-
包搜索 [[--name] string] [--details]
- 选项
-
- --name 字符串
-
用于搜索包名称
的通配符表达式 [可选,默认 = <none>] - --details 布尔值
-
设置更详细的包元数据
[可选,默认值 = false]
- 也称为
-
包列表
或 its alias 命令显示 Skipper 服务器可安装的所有软件包,如以下示例所示(带有输出):search
list
skipper:>package search
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║ Name │Version│ Description ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld │1.0.0 │The app has two endpoints, /about and /greeting in English. Maven resource. ║
║helloworld │1.0.1 │The app has two endpoints, /about and /greeting in Portuguese. Maven resource. ║
║helloworld-docker│1.0.1 │The app has two endpoints, /about and /greeting in Portuguese. Docker resource.║
║helloworld-docker│1.0.0 │The app has two endpoints, /about and /greeting in English. Docker resource. ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝
skipper:>package list
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║ Name │Version│ Description ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld │1.0.0 │The app has two endpoints, /about and /greeting in English. Maven resource. ║
║helloworld │1.0.1 │The app has two endpoints, /about and /greeting in Portuguese. Maven resource. ║
║helloworld-docker│1.0.1 │The app has two endpoints, /about and /greeting in Portuguese. Docker resource.║
║helloworld-docker│1.0.0 │The app has two endpoints, /about and /greeting in English. Docker resource. ║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝
该命令可以使用 option 搜索包含给定 option 值的包名称,如以下示例中所示(带有 output):search
--name
skipper:>package search --name helloworld-
╔═════════════════╤═══════╤════════════════════════════════════════════════════════════════════════════════╗
║ Name │Version│ Description ║
╠═════════════════╪═══════╪════════════════════════════════════════════════════════════════════════════════╣
║helloworld-docker│1.0.0 │The app has two endpoints, /about and /greeting in English. Docker resource. ║
║helloworld-docker│1.0.1 │The app has two endpoints, /about and /greeting in Portuguese. Docker resource.║
╚═════════════════╧═══════╧════════════════════════════════════════════════════════════════════════════════╝
要搜索包的更多详细信息,可以使用该选项,如以下示例中所示(带有输出):--details
skipper:>package search --name helloworld- --details
╔════════════════╤═════════════════════════════════════════════════════════════════════════════╗
║ Name │ Value ║
╠════════════════╪═════════════════════════════════════════════════════════════════════════════╣
║apiVersion │v1 ║
║origin │A sample repository for using Skipper ║
║repositoryId │1 ║
║kind │skipper ║
║name │helloworld-docker ║
║version │1.0.0 ║
║packageSourceUrl│https://github.com/markpollack/skipper-sample-repository ║
║packageHomeUrl │https://github.com/markpollack/skipper-sample-repository ║
║tags │web, demo, docker, helloworld ║
║maintainer │https://github.com/markpollack ║
║description │The app has two endpoints, /about and /greeting in English. Docker resource.║
║sha256 │ ║
║iconUrl │ ║
╚════════════════╧═════════════════════════════════════════════════════════════════════════════╝
╔════════════════╤════════════════════════════════════════════════════════════════════════════════╗
║ Name │ Value ║
╠════════════════╪════════════════════════════════════════════════════════════════════════════════╣
║apiVersion │v1 ║
║origin │A sample repository for using Skipper ║
║repositoryId │1 ║
║kind │skipper ║
║name │helloworld-docker ║
║version │1.0.1 ║
║packageSourceUrl│https://github.com/markpollack/skipper-sample-repository ║
║packageHomeUrl │https://github.com/markpollack/skipper-sample-repository ║
║tags │web, demo, docker, helloworld ║
║maintainer │https://github.com/markpollack ║
║description │The app has two endpoints, /about and /greeting in Portuguese. Docker resource.║
║sha256 │ ║
║iconUrl │ ║
╚════════════════╧════════════════════════════════════════════════════════════════════════════════╝
22.2. 上传
此命令将上传一个 package .zip 文件,如以下示例所示(带有输出):
- 名字
-
包上传 - 上传包。
- 概要
-
包上传 [--path] 字符串 [[--repo-name] 字符串]
- 选项
-
- --path 字符串
-
需要上传
的包 [必选] - --repo-name 字符串
-
要上传到
的本地存储库名称 [可选,默认 = <无>]
skipper:>package upload --path /path-to-package/mypackage-1.0.0.zip
Package uploaded successfully:[mypackage:1.0.0]
如果未设置 no,则命令将用作要上传的存储库。--repo-name
upload
local
22.3. 安装
此命令将安装一个包,如以下示例中所示(带有输出):
- 名字
-
package install - 安装软件包。
- 概要
-
包安装 [--package-name] 字符串 [[--package-version] 字符串] [[--file] 文件] [[--properties] 字符串] [--release-name] 字符串 [[--platform-name] 字符串]
- 选项
- --package-name 字符串
-
要安装
的软件包的名称 [必选] - --package-version 字符串
-
要安装的包的版本,如果未指定,将使用
最新版本 [可选,默认 = <无>] - --file 文件
-
在 YAML 文件中
指定值 [可选,默认值 = <无>] - --properties 字符串
-
安装
期间要覆盖的逗号分隔的属性集 [可选,默认 = <无>] - --release-name 字符串
-
要使用的
版本名称 [Mandatory] - --platform-name 字符串
-
要使用的
平台名称 [可选,默认 = 默认]
skipper:>package install --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=8099
Released helloworldlocal. Now at version v1.
如果未指定 no,则考虑给定的最新包版本。package-version
package-name
如果未指定 no,则使用平台名称 。platform-name
default
可以使用选项通过逗号分隔的 YAML 字符串或通过 YAML 提供属性
file 使用选项。--properties
--file
23. 释放命令
Skipper 的释放命令包括以下内容:
23.1. 列表
此命令列出最新部署或失败的版本。
- 名字
-
release list - 列出状态为 deployed 或 failed 的最新版本的版本。
- 概要
-
发布列表 [[--release-name] 字符串]
- 选项
-
- --release-name 字符串
-
按版本名称
搜索的通配符表达式 [可选,默认 = <none>]
列出最新部署或失败的版本,如以下示例中所示(含输出):
skipper:>release list
╔═══════════════╤═══════╤═════════════════════════╤════════╤═══════════╤══════════════╤════════════╤══════════════════════════════════════════════════════════════════════════════╗
║ Name │Version│ Last updated │ Status │ Package │ Package │ Platform │ Platform Status ║
║ │ │ │ │ Name │ Version │ Name │ ║
╠═══════════════╪═══════╪═════════════════════════╪════════╪═══════════╪══════════════╪════════════╪══════════════════════════════════════════════════════════════════════════════╣
║helloworldlocal│3 │Mon Oct 30 17:57:41 IST │DEPLOYED│helloworld │1.0.0 │default │[helloworldlocal.helloworld-v3], State = ║
║ │ │2017 │ │ │ │ │[helloworldlocal.helloworld-v3-0=deployed] ║
╚═══════════════╧═══════╧═════════════════════════╧════════╧═══════════╧══════════════╧════════════╧══════════════════════════════════════════════════════════════════════════════╝
23.2. 状态
此命令显示发布状态。
- 名字
-
release status - 最后一个已知发行版的状态。
- 概要
-
release status [--release-name] 字符串 [[--release-version] integer]
- 选项
-
- --release-name 字符串
-
版本名称
[强制]
[不能为 null] - --release-version 整数
-
具体的发布版本。
[可选,默认值 = <无>]
显示特定版本和版本,如以下示例中所示(含输出):status
skipper:>release status --release-name helloworldlocal
╔═══════════════╤═══════════════════════════════════════════════════════════════════════════════════╗
║Last Deployed │Mon Oct 30 17:53:50 IST 2017 ║
║Status │DEPLOYED ║
║Platform Status│All applications have been successfully deployed. ║
║ │[helloworldlocal.helloworld-v2], State = [helloworldlocal.helloworld-v2-0=deployed]║
╚═══════════════╧═══════════════════════════════════════════════════════════════════════════════════╝
如果未指定,则使用最新版本。
以下示例显示了带有选项的命令:--release-version
--release-version
skipper:>release status --release-name helloworldlocal --release-version 1
╔═══════════════╤════════════════════════════════════════════════════════════════════════╗
║Last Deployed │Mon Oct 30 17:52:57 IST 2017 ║
║Status │DELETED ║
║Platform Status│The applications are known to the system, but is not currently deployed.║
║ │[helloworldlocal.helloworld-v1], State = [unknown] ║
╚═══════════════╧════════════════════════════════════════════════════════════════════════╝
23.3. 升级
此命令升级软件包。
- 名字
-
release upgrade - 升级版本。
- 概要
-
发布升级 [--release-name] 字符串 [--package-name] 字符串 [[--package-version] 字符串] [[--file] 文件] [[--properties] 字符串] [[--timeout-expression] 字符串]
- 选项
-
- --release-name 字符串
-
要升级
的版本的名称 [必需] - --package-name 字符串
-
用于升级
的软件包的名称 [必填] - --package-version 字符串
-
用于升级的软件包版本,如果未指定,将使用
最新版本 [可选,默认 = <无>] - --file 文件
-
在 YAML 文件中
指定值 [可选,默认值 = <无>] - --properties 字符串
-
升级
期间要覆盖的逗号分隔的属性集 [可选,默认 = <无>] - --timeout-expression 字符串
-
升级超时
的表达式 [可选,默认 = <无>]--force force upgrade [Optional, default = false]
--app-names string application names to force upgrade. If no specific list is provided, all the apps in the packages are force upgraded [Optional, default = <none>]
升级包,如以下示例中所示(含输出):
skipper:>release upgrade --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.server.port=9090
helloworldpcf has been upgraded. Now at version v2.
此版本的清单将如下所示:
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
"name": "helloworld"
"type": "demo"
"spec":
"resource": "maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld"
"version": "1.0.0.RELEASE"
"applicationProperties":
"server.port": "9090"
"deploymentProperties": !!null "null"
如果未指定 no,则考虑给定选项的最新包版本。
可以使用选项通过逗号分隔的 YAML 字符串或通过 YAML 提供属性
file 使用选项。package-version
--package-name
--properties
--file
可以通过覆盖包版本或保留现有包版本但覆盖属性来完成升级。
覆盖包版本时,它需要附带相应的属性,因为现有属性不会转移。
在将来的发行版中,我们计划引入一个命令,该命令将当前发行版属性传递到要创建的下一个发行版。--reuse-properties |
例如,如果程序包版本未更改,但仅更改了其他属性,则清单将添加具有相同程序包版本的现有属性的新属性。
skipper:>release upgrade --release-name helloworldlocal --package-name helloworld --package-version 1.0.0 --properties spec.applicationProperties.log.level=DEBUG
helloworldpcf has been upgraded. Now at version v3.
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
"name": "helloworld"
"type": "demo"
"spec":
"resource": "maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld"
"version": "1.0.0.RELEASE"
"applicationProperties":
"server.port": "9090"
"log.level": "DEBUG"
"deploymentProperties": !!null "null"
相反,如果使用新的软件包版本执行升级,如下所示,
skipper:>release upgrade --release-name helloworldlocal --package-name helloworld --package-version 1.0.1
helloworldpcf has been upgraded. Now at version v3.
由于程序包版本已更改,因此清单不会携带现有版本中的属性。
skipper:>manifest get helloworldlocal
"apiVersion": "skipper.spring.io/v1"
"kind": "SpringCloudDeployerApplication"
"metadata":
"name": "helloworld"
"type": "demo"
"spec":
"resource": "maven://org.springframework.cloud.samples:spring-cloud-skipper-samples-helloworld"
"version": "1.0.1.RELEASE"
"applicationProperties": !!null "null"
"deploymentProperties": !!null "null"
对包含嵌套包的包执行更新时,请使用包的名称作为属性字符串中的前缀或作为 YAML 文档中的第一级。
例如,包含 a 和 app 的包中,用于升级应用程序的命令如下所示:ticktock
time
log
log
skipper:>release upgrade --release-name ticktockskipper --package-name ticktock --file /home/mpollack/log-level-change.yml
其中包含以下内容:log-level-change.yml
log:
version: 1.1.1.RELEASE
spec:
applicationProperties:
server.port: 9999
endpoints.sensitive: false
log.level: ERROR
由于仅更改应用程序版本是一种常见的用例,因此软件包可以将版本列为文件中的顶级属性。
例如,在 test 包(位于此处)中,包含以下内容:values.yml
ticktock
values.yml
version: 1.1.0.RELEASE
spec:
applicationProperties:
log.level: DEBUG
deploymentProperties:
memory: 1024m
然后,您可以在命令中使用该选项,如以下示例所示:--properties
upgrade
skipper:>release upgrade --release-name ticktockskipper --package-name ticktock --properties log.version=1.1.1.RELEASE
可用于更改用于等待运行状况良好的应用程序的超时设置
当 Server 处于 state 时执行此操作。前面提到了要覆盖的全局设置。更多信息
表达式本身,请参阅 Timeout 表达式。--timeout-expression
spring.cloud.skipper.server.strategies.healthcheck.timeoutInMillis
skipper:>release upgrade --release-name ticktockskipper --package-name ticktock --timeout-expression=30s
该选项用于部署当前部署的应用程序的新实例。
换句话说,即使清单未更改,Skipper 也会再次升级应用程序。
如果应用程序本身在启动时(例如从 Spring Cloud Config Server)获取配置信息,则需要此行为。
您可以使用选项 指定要强制升级的应用程序 。
如果您未指定任何应用程序名称,则所有应用程序都将强制升级。
您可以将 and 选项与 or 选项一起指定。--force
--app-names
--force
--app-names
--properties
--file
以下示例描述了 upgrade:force
首先,安装具有 and apps 的包。ticktock
time
log
skipper:>package upload --repo-name local --path spring-cloud-skipper-server-core/src/test/resources/repositories/binaries/test/ticktock/ticktock-1.0.0.zip
Package uploaded successfully:[ticktock:1.0.0]
skipper:>package install --package-name ticktock --release-name a1
Released a1. Now at version v1.
skipper:>release list
╔════╤═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤═════════════╤═════════════════════════════════════════════╗
║Name│Version│ Last updated │ Status │Package Name│Package Version│Platform Name│ Platform Status ║
╠════╪═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪═════════════╪═════════════════════════════════════════════╣
║a1 │1 │Thu Sep 13 08:34:50 IST 2018│DEPLOYED│ticktock │1.0.0 │default │[a1.log-v1], State = [a1.log-v1-0=deployed] ║
║ │ │ │ │ │ │ │[a1.time-v1], State = [a1.time-v1-0=deployed]║
╚════╧═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧═════════════╧═════════════════════════════════════════════╝
skipper:>release history --release-name a1
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║1 │Thu Sep 13 08:34:50 IST 2018│DEPLOYED│ticktock │1.0.0 │Install complete║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝
现在,即使 和 package 之间没有明显的区别,也可以执行升级。latest
current
skipper:>release upgrade --release-name a1 --package-name ticktock
Package to upgrade has no difference than existing deployed/deleted package. Not upgrading.
如果需要对 (对于 和 ) 的所有应用程序强制升级ticktock
time
log
)
skipper:>release upgrade --release-name a1 --package-name ticktock --force
a1 has been upgraded. Now at version v2.
skipper:>release history --release-name a1
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════════════╣
║2 │Thu Sep 13 08:35:53 IST 2018│UNKNOWN │ticktock │1.0.0 │Upgrade install underway║
║1 │Thu Sep 13 08:34:50 IST 2018│DEPLOYED│ticktock │1.0.0 │Install complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════════════╝
skipper:>release history --release-name a1
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║2 │Thu Sep 13 08:35:53 IST 2018│DEPLOYED│ticktock │1.0.0 │Upgrade complete║
║1 │Thu Sep 13 08:34:50 IST 2018│DELETED │ticktock │1.0.0 │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝
如果需要对特定应用程序列表进行升级,则可以使用 option。force
--app-names
skipper:>release upgrade --release-name a1 --package-name ticktock --force --app-names log
a1 has been upgraded. Now at version v3.
skipper:>release history a1
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║3 │Thu Sep 13 08:36:51 IST 2018│DEPLOYED│ticktock │1.0.0 │Upgrade complete║
║2 │Thu Sep 13 08:35:53 IST 2018│DELETED │ticktock │1.0.0 │Delete complete ║
║1 │Thu Sep 13 08:34:50 IST 2018│DELETED │ticktock │1.0.0 │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝
23.4. 回滚
此命令将回滚发行版。
- 名字
-
release rollback (版本回滚) - 将版本回滚到以前的版本或特定版本。
- 概要
-
发布回滚 [--release-name] 字符串 [[--release-version] int] [[--timeout-expression] 字符串]
- 选项
-
- --release-name 字符串
-
要回滚
的发行版的名称 [必填] - --release-version int
-
要回滚到的特定发行版。不指定该值将回滚到以前的版本。
[可选,默认值 = 0] - --timeout-expression 字符串
-
回滚超时
的表达式 [可选,默认 = <无>]
将版本回滚到特定版本,如以下示例中所示(含输出):
skipper:>release rollback --release-name helloworldlocal --release-version 1
helloworldlocal has been rolled back. Now at version v3.
如果未指定 no,则回滚版本是以前的稳定版本(in 或 status)。--release-version
DELETED
DEPLOYED
可用于更改用于等待运行状况良好的应用程序的超时设置
当 Server 处于 state 时执行此操作。前面提到了要覆盖的全局设置。更多信息
表达式本身,请参阅 Timeout 表达式。--timeout-expression
spring.cloud.skipper.server.strategies.healthcheck.timeoutInMillis
23.5. 历史
此命令显示特定版本的历史记录。
- 名字
-
release history (发布历史记录) - 列出给定版本的版本历史记录。
- 概要
-
版本历史记录 [--release-name] 字符串
- 选项
-
- --release-name 字符串
-
按版本名称
搜索的通配符表达式 [必填]
*[不能为 null]
显示特定版本的历史记录,如以下示例中所示(含输出):
skipper:>release history --release-name helloworldlocal
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║3 │Mon Oct 30 17:57:41 IST 2017│DEPLOYED│helloworld │1.0.0 │Upgrade complete║
║2 │Mon Oct 30 17:53:50 IST 2017│DELETED │helloworld │1.0.0 │Delete complete ║
║1 │Mon Oct 30 17:52:57 IST 2017│DELETED │helloworld │1.0.0 │Delete complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝
23.6. 删除
此命令将删除特定版本的最新部署修订版。
- 名字
-
release delete - 删除版本。
- 概要
-
release delete [--release-name] 字符串 [--delete-package]
- 选项
-
- --release-name 字符串
-
要删除
的发行版的名称 [必填] - --delete-package 删除发布包
-
[可选,默认值 = false]
删除特定版本的最新部署修订版,取消部署应用程序或应用程序,如以下示例所示(含输出):
skipper:>release delete --release-name helloworldlocal
helloworldlocal has been deleted.
23.7. 取消
此命令尝试取消现有发布操作。
- 名字
-
release cancel - 请求取消当前发布操作。
- 概要
-
release cancel [--release-name] 字符串
- 选项
-
- --release-name 字符串
-
要取消
的发布的名称 [必填]
此命令可用于尝试取消正在运行的发布操作(如果它支持),并且 release 当前处于可以尝试进行任何类型的取消的状态。例如,在 如果检测到新应用程序,升级服务器将删除旧应用程序。以前 state 被转换为 deleting old applications,则可以请求取消整个 升级过程。
另一个用例是,如果新应用程序失败并且服务器将超时等待 应用程序,可以方便地取消操作,而无需等待完全超时发生。
以下是在升级的应用程序失败时如何尝试取消的示例:
skipper:>package install --package-name testapp --package-version 1.0.0 --release-name mytestapp
Released mytestapp. Now at version v1.
skipper:>release history --release-name mytestapp
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════╣
║1 │Thu May 17 11:18:07 BST 2018│DEPLOYED│testapp │1.0.0 │Install complete║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════╝
skipper:>release upgrade --package-name testapp --package-version 1.1.0 --release-name mytestapp
mytestapp has been upgraded. Now at version v2.
skipper:>release history --release-name mytestapp
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤════════════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪════════════════════════╣
║2 │Thu May 17 11:18:52 BST 2018│UNKNOWN │testapp │1.1.0 │Upgrade install underway║
║1 │Thu May 17 11:18:07 BST 2018│DEPLOYED│testapp │1.0.0 │Install complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧════════════════════════╝
skipper:>release status --release-name mytestapp
╔═══════════════╤═══════════════════════════════════════════════════════════════╗
║Last Deployed │Thu May 17 11:18:52 BST 2018 ║
║Status │UNKNOWN ║
║Platform Status│All apps have failed deployment. ║
║ │[mytestapp.testapp-v2], State = [mytestapp.testapp-v2-0=failed]║
╚═══════════════╧═══════════════════════════════════════════════════════════════╝
skipper:>release cancel --release-name mytestapp
Cancel request for release mytestapp sent
skipper:>release history --release-name mytestapp
╔═══════╤════════════════════════════╤════════╤════════════╤═══════════════╤═════════════════════════╗
║Version│ Last updated │ Status │Package Name│Package Version│ Description ║
╠═══════╪════════════════════════════╪════════╪════════════╪═══════════════╪═════════════════════════╣
║2 │Thu May 17 11:18:52 BST 2018│FAILED │testapp │1.1.0 │Cancelled after 39563 ms.║
║1 │Thu May 17 11:18:07 BST 2018│DEPLOYED│testapp │1.0.0 │Install complete ║
╚═══════╧════════════════════════════╧════════╧════════════╧═══════════════╧═════════════════════════╝
24. 清单命令
Skipper 的清单只有一个命令:.get
24.1. 获取
Thsi 命令显示清单。
- 名字
-
manifest get - 获取版本的清单
- 概要
-
manifest get [--release-name] string [[--release-version] integer] (清单获取 [--release-name] 字符串 [[--release-version] 整数)
- 选项
-
- --release-name 字符串
-
版本名称
[强制]
[不能为 null] - --release-version 整数
-
特定发布版本。
[可选,默认值 = <无>]
该命令显示用于特定版本的清单,如以下示例中所示(带有输出):manifest get
skipper:>manifest get --release-name helloworldk8s
---
# Source: template.yml
apiVersion: skipper.spring.io/v1
kind: SpringCloudDeployerApplication
metadata:
name: helloworld-docker
spec:
resource: docker:springcloud/spring-cloud-skipper-samples-helloworld:1.0.0.RELEASE
applicationProperties:
deploymentProperties:
spring.cloud.deployer.kubernetes.createNodePort: 32123
25. 平台命令
Skipper 的平台只有一个命令:。list
25.1. 列表
此命令列出平台。
- 名字
-
platform list - 列出平台
- 概要
-
平台列表
该命令显示所有可用部署平台账户的列表,如以下示例中所示(带有输出):platform list
skipper:>platform list
╔════════╤════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ Name │ Type │ Description ║
╠════════╪════════════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║default │local │ShutdownTimeout = [30], EnvVarsToInherit = [TMP,LANG,LANGUAGE,LC_.*,PATH], JavaCmd = ║
║ │ │[/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/bin/java], WorkingDirectoriesRoot = [/var/folders/t3/qf1wkpwj4lgd9gjccwk0wr7h0000gp/T], ║
║ │ │DeleteFilesOnExit = [true] ║
║cf-dev │cloudfoundry│org = [scdf-ci], space = [ilaya-space], url = [https://api.run.pivotal.io] ║
║minikube│kubernetes │master url = [https://192.168.99.101:8443/], namespace = [default], api version = [v1] ║
╚════════╧════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
26. 存储库命令
Skipper 的存储库命令包括以下内容:
26.1. 列表
此命令列出存储库。
- 名字
-
repo list - 列出软件包存储库
- 概要
-
存储库列表
列出存储库,如以下示例中所示(含输出):
skipper:>repo list
╔════════════╤═══════════════════════════════════════════════════════════╤═════╤═════╗
║ Name │ URL │Local│Order║
╠════════════╪═══════════════════════════════════════════════════════════╪═════╪═════╣
║experimental│https://skipper-repository.cfapps.io/repository/experimental│false│0 ║
║local │https://10.55.13.45:7577 │true │1 ║
╚════════════╧═══════════════════════════════════════════════════════════╧═════╧═════╝
如果存储库是本地的,则它由 Skipper 的数据库提供支持,您可以将包上传到存储库。 如果它不是本地的,则它是一个远程存储库,您只能读取包。 远程存储库中的包在 Skipper 的控制之外进行更新。 1.0 版本仅在服务器启动时轮询远程存储库中的内容。 请关注问题 GH-262,了解有关添加对远程存储库元数据动态更新的支持的更多信息。
27. Skipper 服务器命令
Skipper 的软件包命令包括以下内容:
27.1. 配置
此命令将 shell 配置为引用 Skipper Server 的 HTTP API 端点。
- 名字
-
skipper config - 配置要使用的 Spring Cloud Skipper REST 服务器。
- 概要
-
skipper config [[--uri] 字符串] [[--username] 字符串] [[--password] 字符串] [[--credentials-provider-command] 字符串] [--skip-ssl-validation]
- 选项
-
- --uri 字符串
-
Spring Cloud Skipper REST 端点
的位置 [可选,默认 = localhost:7577/api] - --username 字符串
-
用于对管理员 REST 端点
进行身份验证访问的用户名 [可选,默认 = <无>] - --password 字符串
-
用于对 Admin REST 端点的经过身份验证的访问的密码(仅对用户名有效)
[可选,默认 = <无>] - --credentials-provider-command 字符串
-
要运行的命令,该命令输出用于身份验证
的 HTTP 凭据 [可选,默认 = <无>] - --skip-ssl-validation
-
接受任何 SSL 证书(甚至是自签名证书)
[可选,默认值 = <无>]
配置 shell,如以下示例所示:
skipper:>skipper config --uri https://localhost:8443/api
使用 OAuth 时,您可以使用 username 和 password 选项。
在 Skipper Shell 中,您还可以提供凭据,如以下示例所示:
skipper:> skipper config --uri https://localhost:7577/api --username my_username --password my_password
有关更多信息,请参阅 [configuration-security] 部分。
28. 通用用法
本节包含有关命令的一般说明。
28.1. 超时表达式
-
常规的 long 表示形式(使用毫秒作为默认单位)
-
java.util.Duration 使用的标准 ISO-8601 格式
-
值和单位耦合的更易读的格式(例如 10 秒表示 10 秒)
要指定 30 秒的会话超时,30、PT30S 和 30 都是等效的。读取超时 的 500ms 可以采用以下任何形式指定:500、PT0.5S 和 500ms。
您也可以使用任何受支持的单位。这些是:
-
ns 表示纳秒
-
毫秒
-
秒
-
m 分钟数
-
h 表示小时
-
d 持续数天