sfctl composesfctl compose

创建、删除和管理 Docker Compose 应用程序。Create, delete, and manage Docker Compose applications.

命令Commands

CommandCommand 说明Description
createcreate 创建 Service Fabric compose 部署。Creates a Service Fabric compose deployment.
listlist 获取在 Service Fabric 群集中创建的 compose 部署列表。Gets the list of compose deployments created in the Service Fabric cluster.
removeremove 从群集中删除现有的 Service Fabric compose 部署。Deletes an existing Service Fabric compose deployment from cluster.
statusstatus 获取有关 Service Fabric compose 部署的信息。Gets information about a Service Fabric compose deployment.
升级upgrade 开始升级 Service Fabric 群集中的 compose 部署。Starts upgrading a compose deployment in the Service Fabric cluster.
upgrade-rollbackupgrade-rollback 开始在 Service Fabric 群集中回退 compose 部署升级。Starts rolling back a compose deployment upgrade in the Service Fabric cluster.
upgrade-statusupgrade-status 获取在此 Service Fabric Compose 部署中执行的最新升级的详细信息。Gets details for the latest upgrade performed on this Service Fabric compose deployment.

sfctl compose createsfctl compose create

创建 Service Fabric compose 部署。Creates a Service Fabric compose deployment.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的名称。The name of the deployment.
--file-path [必需]--file-path [Required] 目标 Docker Compose 文件的路径。Path to the target Docker Compose file.
--encrypted-pass--encrypted-pass 不提示输入容器注册表密码,而是使用已加密的通行短语。Rather than prompting for a container registry password, use an already encrypted pass-phrase.
--has-pass--has-pass 将提示输入容器注册表的密码。Will prompt for a password to the container registry.
--timeout -t--timeout -t 默认值: 60。Default: 60.
--user--user 用于连接容器注册表的用户名。User name to connect to container registry.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose listsfctl compose list

获取在 Service Fabric 群集中创建的 compose 部署列表。Gets the list of compose deployments created in the Service Fabric cluster.

获取 Service Fabric 群集中已创建的或正在创建的 compose 部署的状态。Gets the status about the compose deployments that were created or in the process of being created in the Service Fabric cluster. 响应包括名称、状态和有关 compose 部署的其他详细信息。The response includes the name, status, and other details about the compose deployments. 如果部署列表在一页中显示不下,则将返回一页结果及一个继续标记,该标记可用于获取下一页。If the list of deployments do not fit in a page, one page of results is returned as well as a continuation token, which can be used to get the next page.

参数Arguments

参数Argument 说明Description
--continuation-token--continuation-token 继续标记参数用于获取下一组结果。The continuation token parameter is used to obtain next set of results. 如果单个响应无法容纳来自系统的结果,则 API 响应中包括含有非空值的继续标记。A continuation token with a non-empty value is included in the response of the API when the results from the system do not fit in a single response. 当此值传递到下一个 API 调用时,API 返回下一组结果。When this value is passed to the next API call, the API returns next set of results. 如果没有更多结果,则该继续标记不包含值。If there are no further results, then the continuation token does not contain a value. 不应将此参数的值进行 URL 编码。The value of this parameter should not be URL encoded.
--max-results--max-results 作为分页查询的一部分返回的最大结果数。The maximum number of results to be returned as part of the paged queries. 此参数定义返回结果数的上限。This parameter defines the upper bound on the number of results returned. 如果根据配置中定义的最大消息大小限制,无法将这些结果容纳到消息中,则返回的结果数可能小于指定的最大结果数。The results returned can be less than the specified maximum results if they do not fit in the message as per the max message size restrictions defined in the configuration. 如果此参数为零或者未指定,则分页查询包含返回消息中最多可容纳的结果数。If this parameter is zero or not specified, the paged query includes as many results as possible that fit in the return message.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose removesfctl compose remove

从群集中删除现有的 Service Fabric compose 部署。Deletes an existing Service Fabric compose deployment from cluster.

删除现有的 Service Fabric compose 部署。Deletes an existing Service Fabric compose deployment.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的标识。The identity of the deployment.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose statussfctl compose status

获取有关 Service Fabric compose 部署的信息。Gets information about a Service Fabric compose deployment.

返回 Service Fabric 群集中已创建或正在创建的、且名称与指定为参数的部署相匹配的 compose 部署的状态。Returns the status of the compose deployment that was created or in the process of being created in the Service Fabric cluster and whose name matches the one specified as the parameter. 响应包括名称、状态和有关部署的其他详细信息。The response includes the name, status, and other details about the deployment.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的标识。The identity of the deployment.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose upgradesfctl compose upgrade

开始升级 Service Fabric 群集中的 compose 部署。Starts upgrading a compose deployment in the Service Fabric cluster.

验证提供的升级参数,如果参数有效,则开始升级部署。Validates the supplied upgrade parameters and starts upgrading the deployment if the parameters are valid.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的名称。The name of the deployment.
--file-path [必需]--file-path [Required] 目标 Docker compose 文件的路径。Path to the target Docker compose file.
--default-svc-type-health-map--default-svc-type-health-map 描述用于评估服务运行状况的运行状况策略的 JSON 编码字典。JSON encoded dictionary that describe the health policy used to evaluate the health of services.
--encrypted-pass--encrypted-pass 不提示输入容器注册表密码,而是使用已加密的通行短语。Rather than prompting for a container registry password, use an already encrypted pass-phrase.
--failure-action--failure-action 可能的值包括:“Invalid”、“Rollback”和“Manual”。Possible values include: 'Invalid', 'Rollback', 'Manual'.
--force-restart--force-restart 即使代码版本没有改变,也在升级过程中强制重新启动进程。Processes are forcefully restarted during upgrade even when the code version has not changed.

升级仅更改配置或数据。The upgrade only changes configuration or data.
--has-pass--has-pass 将提示输入容器注册表的密码。Will prompt for a password to the container registry.
--health-check-retry--health-check-retry 应用程序或群集不正常时尝试执行运行状况检查所间隔的时间长度。The length of time between attempts to perform health checks if the application or cluster is not healthy.
--health-check-stable--health-check-stable 升级继续到下一升级域之前,应用程序或群集必须保持正常的时长。The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--health-check-wait--health-check-wait 启动运行状况检查进程之前,完成升级域后等待的时间长度。The length of time to wait after completing an upgrade domain before starting the health checks process.
--replica-set-check--replica-set-check 出现意外问题时,阻止处理升级域并防止可用性丢失的最大时长。The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues.

当此超时到期时,无论是否存在可用性丢失问题,都将继续处理升级域。When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. 每个升级域启动时重置超时。The timeout is reset at the start of each upgrade domain. 有效值介于 0 和 42949672925(含)之间。Valid values are between 0 and 42949672925 inclusive.
--svc-type-health-map--svc-type-health-map 描述用于评估不同服务类型的运行状况的运行状况策略的 JSON 编码对象列表。JSON encoded list of objects that describe the health policies used to evaluate the health of different service types.
--timeout -t--timeout -t 默认值: 60。Default: 60.
--unhealthy-app--unhealthy-app 报告错误之前允许的最大不正常应用程序百分比。The maximum allowed percentage of unhealthy applications before reporting an error.

例如,若要允许 10% 的应用程序处于不正常状态,此值为 10。For example, to allow 10% of applications to be unhealthy, this value would be 10. 该百分比表示在将群集视为出错之前可处于不正常状态的应用程序的最大容许百分比。The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. 如果未超过该百分比,但至少存在一个不正常的应用程序,则将运行状况评估为 Warning。If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. 该百分比的计算方式是将不正常的应用程序数除以群集中的应用程序实例总数。This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster.
--upgrade-domain-timeout--upgrade-domain-timeout 执行 FailureAction 前,每个升级域需等待的时长。The amount of time each upgrade domain has to complete before FailureAction is executed.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--upgrade-kind--upgrade-kind 默认值: Rolling。Default: Rolling.
--upgrade-mode--upgrade-mode 可能的值包括:“Invalid”、“UnmonitoredAuto”、“UnmonitoredManual”和“Monitored”。Possible values include: 'Invalid', 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. 默认值: UnmonitoredAuto。Default: UnmonitoredAuto.
--upgrade-timeout--upgrade-timeout 执行 FailureAction 前,完成整个升级需等待的时长。The amount of time the overall upgrade has to complete before FailureAction is executed.

首先,会将其解释为表示 ISO 8601 持续时间的一个字符串。It is first interpreted as a string representing an ISO 8601 duration. 如果那失败,则会将其解释为表示总毫秒数的一个数字。If that fails, then it is interpreted as a number representing the total number of milliseconds.
--user--user 用于连接容器注册表的用户名。User name to connect to container registry.
--warning-as-error--warning-as-error 指示是否将警告的严重性视为与错误相同。Indicates whether warnings are treated with the same severity as errors.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose upgrade-rollbacksfctl compose upgrade-rollback

开始在 Service Fabric 群集中回退 compose 部署升级。Starts rolling back a compose deployment upgrade in the Service Fabric cluster.

回退 Service Fabric compose 部署升级。Rollback a service fabric compose deployment upgrade.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的标识。The identity of the deployment.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

sfctl compose upgrade-statussfctl compose upgrade-status

获取在此 Service Fabric Compose 部署中执行的最新升级的详细信息。Gets details for the latest upgrade performed on this Service Fabric compose deployment.

返回有关 compose 部署升级状态的信息以及可帮助调试应用程序运行状况问题的详细信息。Returns the information about the state of the compose deployment upgrade along with details to aid debugging application health issues.

参数Arguments

参数Argument 说明Description
--deployment-name [必需]--deployment-name [Required] 部署的标识。The identity of the deployment.
--timeout -t--timeout -t 执行操作的服务器超时,以秒为单位。The server timeout for performing the operation in seconds. 此超时指定客户端可以等待请求的操作完成的持续时间。This timeout specifies the time duration that the client is willing to wait for the requested operation to complete. 此参数的默认值为 60 秒。The default value for this parameter is 60 seconds. 默认值: 60。Default: 60.

全局参数Global Arguments

参数Argument 说明Description
--debug--debug 提高日志记录详细程度以显示所有调试日志。Increase logging verbosity to show all debug logs.
--help -h--help -h 显示此帮助消息并退出。Show this help message and exit.
--output -o--output -o 输出格式。Output format. 允许的值: json、jsonc、table、tsv。Allowed values: json, jsonc, table, tsv. 默认值: json。Default: json.
--query--query JMESPath 查询字符串。JMESPath query string. 有关详细信息和示例,请参阅 http://jmespath.org/。See http://jmespath.org/ for more information and examples.
--verbose--verbose 提高日志记录详细程度。Increase logging verbosity. 使用 --debug 获取完整的调试日志。Use --debug for full debug logs.

后续步骤Next steps