Guest User

Untitled

a guest
Jan 17th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. heat_template_version: 2015-10-15
  2. description: One VM instance
  3.  
  4. parameters:
  5. name:
  6. type: string
  7. label: Name of the VM
  8. key_pair:
  9. type: string
  10. label: Key Pair
  11. constraints:
  12. - custom_constraint: nova.keypair
  13. flavor:
  14. type: string
  15. label: Flavor
  16. constraints:
  17. - custom_constraint: nova.flavor
  18. image:
  19. type: string
  20. label: Image Name
  21. constraints:
  22. - custom_constraint: glance.image
  23. network:
  24. type: string
  25. label: Network
  26. constraints:
  27. - custom_constraint: neutron.network
  28. zone:
  29. type: string
  30. label: Availability Zone
  31. default: Default
  32. security_groups:
  33. type: comma_delimited_list
  34. label: Security Group(s)
  35. default: "default"
  36.  
  37. resources:
  38.  
  39. # This port is a separate resource used to assign the security groups
  40. # to the VM. Can also be used to attach a OS::Neutron::FloatingIP to the VM.
  41. port:
  42. type: OS::Neutron::Port
  43. properties:
  44. network: { get_param: network }
  45. name:
  46. str_replace:
  47. template: port-VM_NAME
  48. params:
  49. VM_NAME: { get_param: name }
  50. security_groups:
  51. get_param: security_groups
  52.  
  53. instance:
  54. type: OS::Nova::Server
  55. properties:
  56. name: { get_param: name }
  57. key_name: { get_param: key_pair }
  58. image: { get_param: image }
  59. flavor: { get_param: flavor }
  60. availability_zone: { get_param: zone }
  61. networks:
  62. - port: { get_resource: port }
  63.  
  64. outputs:
  65. ip:
  66. description: Virtual IP address of instance
  67. value: { get_attr: [ instance, first_address ] }
  68. port:
  69. description: Port ID of instance
  70. value: { get_resource: port }
Add Comment
Please, Sign In to add comment