首页 > 代码库 > openstack 使用heat 创建stack
openstack 使用heat 创建stack
重建stack:
http://CONTROLLER_IP:8004/v1/PROJECT_ID/stacks
method: post
header:
content-Type:application/json Accept:application/json X-Auth-Token:TOKEN
body:
{ "files": { "myfile": "#!/bin/bash\nwget \"http://45.35.12.10/MongoDB_install.sh\" -P /tmp/\ncd /tmp\nchmod +x MongoDB_install.sh\n./MongoDB_install.sh DBROOT_USER DBROOT_PASSWD OS_PASSWD\nrm -f MongoDB_install.sh" }, "disable_rollback": true, "stack_name": "STACK_NAME", "template": { "heat_template_version": "2013-05-23", "resources": { "instance_port": { "type": "OS::Neutron::Port", "properties": { "network": "int_net" } }, "instance": { "type": "OS::Nova::Server", "properties": { "name": "INSTANCE_NAME", "key_name": "KEY_NAME", "flavor": "FLAVOR_ID", "image": "IMAGE_ID", "user_data": { "get_file": "myfile" }, "networks": [ { "port": { "get_resource": "instance_port" } } ] } }, "floatingip": { "type": "OS::Neutron::FloatingIP", "properties": { "floating_network": "ext_net", "floating_ip_address": "FLOATING_IP" } }, "floatingip_association": { "type": "OS::Nova::FloatingIPAssociation", "properties": { "floating_ip": { "get_resource": "floatingip" }, "server_id": { "get_resource": "instance" } } } } } }
获取应用重装状态
URL:
http://CONTROLLER_IP:8774/v2.1/servers/INSTANCE_ID/action
method: post
Header:
Content-Type:application/json Accept:application/json X-Auth-Token:TOKEN
openstack 使用heat 创建stack
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。