Advertisement
avangel

Untitled

Jul 4th, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. heat_template_version: 2015-10-15
  2.  
  3. description: testing launching vSRX via Heat
  4.  
  5. parameters:
  6. # key_name:
  7. # type: string
  8. # label: Key Name
  9. # description: Name of key-pair to be used for compute instance
  10. image_id:
  11. type: string
  12. label: Image ID
  13. description: Image to be used for compute instance
  14. default: vSRXimage
  15. flavor:
  16. type: string
  17. label: Instance Type
  18. description: Type of instance (flavor) to be used
  19. default: vsrx_flavor
  20. name:
  21. type: string
  22. description: Name of VM to be created
  23. default: vsrx
  24. availability_zone:
  25. type: string
  26. label: availability_zone name
  27. description: availability_zone name
  28. default: esclos80013
  29. network:
  30. type: string
  31. label: network name
  32. default: lab-net
  33.  
  34. resources:
  35. node_server_port:
  36. type: OS::Neutron::Port
  37. properties:
  38. network_id: {get_param: network}
  39.  
  40. my_instance:
  41. # https://docs.openstack.org/heat/queens/template_guide/openstack.html#OS::Nova::Server
  42. type: OS::Nova::Server
  43. properties:
  44. name:
  45. list_join: [' ', [{ get_param: name }, 'at', {get_attr: [node_server_port, fixed_ips, 0, ip_address]}]]
  46. image: { get_param: image_id }
  47. flavor: { get_param: flavor }
  48. # key_name: { get_param: key_name }
  49. availability_zone: {get_param: availability_zone }
  50. networks:
  51. - port: { get_resource: node_server_port }
  52. user_data_format: RAW
  53. user_data:
  54. str_replace:
  55. params:
  56. $fxp0_ip: {get_attr: [node_server_port, fixed_ips, 0, ip_address]}
  57. template:
  58. get_file: file:vsrx-config.txt
  59.  
  60. outputs:
  61. instance_ip:
  62. description: The IP address of the deployed compute instance
  63. value: { get_attr: [my_instance, first_address] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement