一个简单的heat模板,仅做自己参考
来源:互联网 发布:MySQL设置主键 编辑:程序博客网 时间:2024/06/12 11:18
1、简单的带参数
description: 'Demo example'heat_template_version: '2014-10-16'parameters: flavor: type: string description: Flavor for the instances to be created default: m1.tiny constraints: - custom_constraint: nova.flavor description: Must be a flavor known to Nova image: type: string description: constraints: - custom_constraint: glance.image description: Must identify an image known to Glance default: cirros-0.3.5-x86_64-disk network: type: string description: The network for the VM default: net_mgmtoutputs: mgmt_ip-VDU1: value: get_attr: [CP1, fixed_ips, 0, ip_address]resources: CP1: properties: {network: { get_param: network }, port_security_enabled: false} type: OS::Neutron::Port VDU1: properties: availability_zone: nova config_drive: false flavor: { get_param: flavor } image: { get_param: image } networks: - port: {get_resource: CP1} user_data_format: SOFTWARE_CONFIG type: OS::Nova::Server
2、heat_template_version: 2014-10-16
heat_template_version: 2014-10-16description: > This is a very simple template that illustrates the basic features of OS::Heat::AutoScalingGroup when the scaled resource is an OS::Nova::Server. By virtue of its simplicity this example should be usable in many contexts. In particular, this example does not require Neutron nor a load balancer nor any particular support for software in the VMs. In fact, the VMs in this example do not actually do anything. This example does no automatic scaling, but does discuss manual scaling. For a more complete example, see autoscaling.yaml.parameters: key_name: type: string description: Name of an existing key pair to use for the instances constraints: - custom_constraint: nova.keypair description: Must name a public key (pair) known to Nova flavor: type: string description: Flavor for the instances to be created default: m1.small constraints: - custom_constraint: nova.flavor description: Must be a flavor known to Nova image: type: string description: > Name or ID of the image to use for the instances. You can get the default from http://cloud.fedoraproject.org/fedora-20.x86_64.qcow2 There is also http://cloud.fedoraproject.org/fedora-20.i386.qcow2 Any image should work since this template does not ask the VMs to do anything. constraints: - custom_constraint: glance.image description: Must identify an image known to Glance network: type: string description: The network for the VM default: privateresources: asg: type: OS::Heat::AutoScalingGroup properties: resource: type: OS::Nova::Server properties: key_name: { get_param: key_name } image: { get_param: image } flavor: { get_param: flavor } networks: [{network: {get_param: network} }] min_size: 1 desired_capacity: 3 max_size: 10 scale_up_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: {get_resource: asg} cooldown: 60 scaling_adjustment: 1 scale_down_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: {get_resource: asg} cooldown: 60 scaling_adjustment: '-1'outputs: scale_up_url: description: > This URL is the webhook to scale up the group. You can invoke the scale-up operation by doing an HTTP POST to this URL; no body nor extra headers are needed. value: {get_attr: [scale_up_policy, alarm_url]} scale_dn_url: description: > This URL is the webhook to scale down the group. You can invoke the scale-down operation by doing an HTTP POST to this URL; no body nor extra headers are needed. value: {get_attr: [scale_down_policy, alarm_url]} asg_size: description: > This is the current size of the auto scaling group. value: {get_attr: [asg, current_size]} server_list: description: > This is a list of server names that are part of the group. value: {get_attr: [asg, outputs_list, name]} networks: description: > This is a map of server resources and their networks. value: {get_attr: [asg, outputs, networks]} server_ips: description: > This is a list of first ip addresses of the servers in the group for a specified network. value: {get_attr: [asg, outputs_list, networks, {get_param: network}, 0]}
3、heat_template_version: '2013-05-23'
description: 'Demo example'heat_template_version: '2013-05-23'outputs: mgmt_ip-VDU1: value: get_attr: [CP1, fixed_ips, 0, ip_address]parameters: {}resources: CP1: properties: {network: net_mgmt, port_security_enabled: false} type: OS::Neutron::Port VDU1: properties: availability_zone: nova config_drive: false flavor: m1.tiny image: cirros-0.3.5-x86_64-disk networks: - port: {get_resource: CP1} user_data_format: SOFTWARE_CONFIG type: OS::Nova::Server
阅读全文
0 0
- 一个简单的heat模板,仅做自己参考
- 一个简单的解决方案文档-仅做参考.
- 自己做的一个模板
- zen-cart全新做一个自己的模板应参考文档
- 做一个自己的LaTeX幻灯片模板
- AVFoudation简单的视频录制-文章是16年中旬写的,仅做参考
- 自己做的一个简单的记事本
- 读写文件简单小例子,仅作自己参考
- mysql参考(仅供自己参考)
- Heat模板
- 一个自己实现的简单的智能指针模板类
- 自己做的一个简单的用户管理(PHP)!
- 记录自己做的一个简单的局域网聊天程序
- 自己做的一个超级简单的小游戏
- 从今天开始,做一个简单的自己
- 自己做的图片(参考教程)
- 最最基础的java中的小概念,也相当于给自己做个笔记,仅供Java零基础的同学参考,水平有限欢迎批评指正。
- 自己所做的一个轮播图案例,以供参考,欢迎指教
- mysql(mycat)执行sql报nullpointerException
- 树莓派2安装ubuntu14.04+ros indigo
- Java多线程
- curl模拟post提交数据
- Silverlight实用窍门系列:47.Silverlight中元素到元素的绑定,以及ObservableCollection和List的使用区别
- 一个简单的heat模板,仅做自己参考
- 数据存储方式(IO-SharedPreferences)
- bootstrap-treeview的使用实例使用递归后台拼接Json串
- Swift基础之Encoding 和 Decoding
- 十步完全理解 SQL
- 《intellij idea学习经历》-01- 异常:Warning:java: 源值1.5已过时, 将在未来所有发行版中删除
- 机器学习笔记之梯度下降(二)
- js正则表达式椒盐总结
- HDU 5543 Pick The Sticks【三维dp】