Created
September 23, 2015 08:24
-
-
Save nherbaut/f12316dc22ba8cf7c0d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # This is a hello world HOT template just defining a single compute | |
| # server. | |
| # | |
| heat_template_version: 2013-05-23 | |
| description: > | |
| Hello world HOT template that just defines a single server. | |
| Contains just base features to verify base HOT support. | |
| parameters: | |
| key_name: | |
| type: string | |
| description: Name of an existing key pair to use for the server | |
| default: nherbaut3 | |
| flavor: | |
| type: string | |
| description: Flavor for the server to be created | |
| default: m1.medium | |
| image: | |
| type: string | |
| description: Image ID or image name to use for the server | |
| #ubuntu | |
| default: 9d43418b-3baa-42c5-ad7d-21580c070675 | |
| #cirros | |
| #default: cef83433-2c0a-40b2-adbf-5b7fde33c413 | |
| private_net: | |
| type: string | |
| default: b8a7fa3c-f3ac-4a4c-a567-d53fdde86c34 | |
| resources: | |
| server1_port: | |
| type: OS::Neutron::Port | |
| properties: | |
| network_id: { get_param: private_net } | |
| server1: | |
| type: OS::Nova::Server | |
| properties: | |
| user_data_format: RAW | |
| key_name: { get_param: key_name } | |
| image: { get_param: image } | |
| flavor: { get_param: flavor } | |
| networks: | |
| - port: {get_resource: server1_port} | |
| user_data: | |
| str_replace: | |
| template: | | |
| #!/bin/bash | |
| echo "master_ip salt" >> /etc/hosts | |
| params: | |
| master_ip: { get_attr: [server1_port, fixed_ips, 0, ip_address] } | |
| server2: | |
| type: OS::Nova::Server | |
| properties: | |
| user_data_format: RAW | |
| key_name: { get_param: key_name } | |
| image: { get_param: image } | |
| flavor: { get_param: flavor } | |
| networks: | |
| - network: { get_param: private_net } | |
| user_data: | |
| str_replace: | |
| template: | | |
| #!/bin/bash | |
| echo "master_ip salt" >> /etc/hosts | |
| params: | |
| master_ip: { get_attr: [server1_port, fixed_ips, 0, ip_address] } | |
| outputs: | |
| server_networks: | |
| description: The networks of the deployed server | |
| value: { get_attr: [server1, networks] } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment