AOS.Stack
模型说明
用于创建AOS服务的堆栈资源,实现AOS支持的各种资源的编排。AOS.Stack模型对应于真实场景的解决方案,可实现解决方案的一键式部署,模型定义好之后可以实现批量复制,助力服务快速上云。
模型属性
|
属性 |
是否必选 |
描述 |
|---|---|---|
|
inputs |
是 |
嵌套的堆栈所需要的输入信息 参数类型:dict 取值说明:自定义的结构体 默认值:{} 取值约束:一个模板最多可定义60个inputs输入。 |
|
description |
否 |
堆栈描述信息 参数类型:string 取值说明:用户自定义 默认值:"" 取值约束:文本字符串,长度为[0, 1024]。 |
|
failureStrategy |
否 |
失败策略 参数类型:string 取值说明:DoNothing、Rollback。无动作和回滚,默认为无动作 默认值:DoNothing |
|
deploy |
否 |
应用是否部署 参数类型:boolean 取值说明:true、false。若设置为false,则应用将不部署(包括应用所包含的软件组件、依赖的主机资源等)。 默认值:True |
|
clusterId |
否 |
用户创建存储关联的集群Id 参数类型:Cloud.CCE.Cluster.Id 取值约束:满足UUID规则,最大64位 使用建议:1.直接填ID:进入CCE管理控制台-资源管理-集群管理,在集群详情页面查看集群ID 2.通过get_reference获取。通过连线到cluster对象以get_reference自动获取 |
|
templateId |
是 |
创建堆栈所依赖的模板ID 参数类型:string 取值说明:已有的模板id 取值约束:文本字符串,长度[0, 64] |
关联关系
|
关系说明 |
关联节点 |
|---|---|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
依赖关系 |
|
|
被包含关系 |
输出
|
属性 |
参数类型 |
描述 |
|---|---|---|
|
refName |
string |
解决方案堆栈名称 |
|
refID |
string |
解决方案堆栈ID |
blueprint样例
tosca_definitions_version: cloud_tosca_version_1_0
inputs:
delpoy1:
default: false
type: boolean
delpoy2:
default: true
type: boolean
delpoy3:
default: true
type: boolean
description:
default: nginx stack
type: string
template-id1:
default: 370f60c6-afc2-e08a-d1c4-fd33bd58b785
type: string
template-id2:
default: 753c30cf-3b3b-cd63-f7f0-1550d058eaac
type: string
template-id3:
default: 2fdd9e05-1406-15d4-7b35-1274a036bcfb
type: string
images:
default: 192.168.0.249:20202/op_svc_servicestage_88b899/nginx:latest
type: string
node_templates:
stackone:
type: Cloud.AOS.Stack
properties:
deploy: {get_input: delpoy1}
description: {get_input: description}
templateId: {get_input: template-id1}
inputs:
images: {get_input: images}
requirements:
- dependency:
node: stacktwo
stacktwo:
type: Cloud.AOS.Stack
properties:
deploy: {get_input: delpoy2}
description: {get_input: description}
templateId: {get_input: template-id2}
inputs:
images: {get_input: images}
myport: {get_attribute: [stackthree,nginx-NodePort]}
requirements:
- dependency:
node: stackthree
stackthree:
type: Cloud.AOS.Stack
properties:
deploy: {get_input: delpoy3}
description: {get_input: description}
templateId: {get_input: template-id3}
inputs:
image: {get_input: images}