openstack编排heat(云主机类型,云主机,网络)
- 在自行搭建的OpenStack平台上,编写heat模板createnet.yml,模板作用为创建网络。
排错中,希望大佬可以指正以下错误
ERROR: Property error: : resources.subnet.properties: : Value must be a string; got [{u'get_resources': u'network'}]
下面是配置 vim server.yml
heat_template_version: 2013-05-23
description: Test Template
resources:
network:
type: OS::Neutron::Net
properties:
admin_state_up: true
name: "Heat-Network"
shared: false
subnet:
type: OS::Neutron::Subnet
properties:
cidr: 2.2.2.0/24
gateway_ip: 2.2.2.1
allocation_pools:
- start: 2.2.2.2
end: 2.2.2.10
enable_dhcp: true
host_routes: []
ip_version: 4
name: "Heat-Subnet"
network_id:
- get_resources: network
outputs:
network_id:
description: IP address of the server in the private network
value: { get_attr: [ network,subnet,show ] }
- 在自行搭建的OpenStack平台上,编写heat模板createvm.yml文件,模板作用为按照要求创建一个云主机。
heat_template_version: 2013-05-23
description: Test Template
resources:
server:
type: OS::Nova::Server
properties:
name: "Test server"
image: xy
flavor: xy
networks:
- network: extnet
outputs:
server_private_ip:
description: IP address of the server in the private network
value: { get_attr: [ server,first_address ] }
heat stack-create mystack -f server.yml
- 在自行搭建的OpenStack平台上,编写heat模板server.yml,模板作用为创建名为“m1.flavor”、ID为1234、内存为1024MB、硬盘为10GB、vcpu数量为2的云主机类型。
heat_template_version: 2013-05-23
description: Test Template
resources:
flavor1:
type: OS::Nova::Flavor
properties:
name: "Test Heat server"
flavorid: "1111"
disk: 10
ram: 1024
vcpus: 2
outputs:
flavor_id:
description: IP address of the server in the private network
value: { get_attr: [ flavor1, show ] }
heat stack-create xystack -f server.yml
相关文章
- 高级IO模型之kqueue和epoll
- netty系列之:netty中各不同种类的channel详解
- 网络标准之:永远是1.0版本的MIME
- netty系列之:NIO和netty详解
- netty系列之:EventLoop,EventLoopGroup和netty的默认实现
- netty系列之:EventExecutor,EventExecutorGroup和netty中的实现
- netty系列之:channelHandlerContext详解
- netty系列之:channelPipeline详解
- netty系列之:channel,ServerChannel和netty中的实现
- netty系列之:channel和channelGroup
- netty系列之:让TCP连接快一点,再快一点
- netty系列之:真正的平等–UDT中的Rendezvous
- netty系列之:选byte还是选message?这是一个问题
- netty系列之:请netty再爱UDT一次
- netty系列之:好马配好鞍,为channel选择配套的selector
- netty系列之:netty对SOCKS协议的支持
- netty系列之:从零到壹,搭建一个SOCKS代理服务器
- netty系列之:小白福利!手把手教你做一个简单的代理服务器
- JetBrains又出神器啦!Fleet,体验飞一般的感觉
- netty系列之:一个价值上亿的网站速度优化方案