Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- heat_template_version: 2015-10-15
- description: testing launching vSRX via Heat
- parameters:
- # key_name:
- # type: string
- # label: Key Name
- # description: Name of key-pair to be used for compute instance
- image_id:
- type: string
- label: Image ID
- description: Image to be used for compute instance
- default: vSRXimage
- flavor:
- type: string
- label: Instance Type
- description: Type of instance (flavor) to be used
- default: vsrx_flavor
- name:
- type: string
- description: Name of VM to be created
- default: vsrx
- availability_zone:
- type: string
- label: availability_zone name
- description: availability_zone name
- default: esclos80013
- network:
- type: string
- label: network name
- default: lab-net
- resources:
- node_server_port:
- type: OS::Neutron::Port
- properties:
- network_id: {get_param: network}
- my_instance:
- # https://docs.openstack.org/heat/queens/template_guide/openstack.html#OS::Nova::Server
- type: OS::Nova::Server
- properties:
- name:
- list_join: [' ', [{ get_param: name }, 'at', {get_attr: [node_server_port, fixed_ips, 0, ip_address]}]]
- image: { get_param: image_id }
- flavor: { get_param: flavor }
- # key_name: { get_param: key_name }
- availability_zone: {get_param: availability_zone }
- networks:
- - port: { get_resource: node_server_port }
- user_data_format: RAW
- user_data:
- str_replace:
- params:
- $fxp0_ip: {get_attr: [node_server_port, fixed_ips, 0, ip_address]}
- template:
- get_file: file:vsrx-config.txt
- outputs:
- instance_ip:
- description: The IP address of the deployed compute instance
- value: { get_attr: [my_instance, first_address] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement