Created
June 27, 2015 13:32
-
-
Save hidekazuna/8eebe7dbd20c38dea9bb to your computer and use it in GitHub Desktop.
This file contains 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
heat_template_version: 2013-05-23 | |
parameters: | |
key_name: | |
type: string | |
default: demo | |
flavor: | |
type: string | |
default: m1.small | |
image: | |
type: string | |
default: ubuntu-software-config | |
private_net_id: | |
type: string | |
default: da15fabf-fd61-4991-b065-bf65f1e2a0ca | |
private_subnet_id: | |
type: string | |
default: 50b70e5d-62ae-4623-a519-59f0a8b236a3 | |
public_net_id: | |
type: string | |
default: 08206763-e6a0-4906-acbe-9e22a8c6145a | |
resources: | |
the_sg: | |
type: OS::Neutron::SecurityGroup | |
properties: | |
name: the_sg | |
description: Ping and SSH | |
rules: | |
- protocol: icmp | |
- protocol: tcp | |
port_range_min: 22 | |
port_range_max: 22 | |
config: | |
type: OS::Heat::SoftwareConfig | |
properties: | |
group: ansible | |
inputs: | |
- name: foo | |
- name: bar | |
outputs: | |
- name: result | |
config: | |
get_file: example-ansible-template.ansible | |
deployment: | |
type: OS::Heat::SoftwareDeployment | |
properties: | |
config: | |
get_resource: config | |
server: | |
get_resource: server | |
input_values: | |
foo: fooooo | |
bar: baaaaa | |
other_deployment: | |
type: OS::Heat::SoftwareDeployment | |
properties: | |
config: | |
get_resource: config | |
server: | |
get_resource: server | |
input_values: | |
foo: fu | |
bar: barmy | |
actions: | |
- CREATE | |
- UPDATE | |
- SUSPEND | |
- RESUME | |
server: | |
type: OS::Nova::Server | |
properties: | |
image: {get_param: image} | |
flavor: {get_param: flavor} | |
key_name: {get_param: key_name} | |
networks: | |
- port: {get_resource: server_port } | |
user_data: | | |
#!/bin/bash | |
echo 10.0.0.11 controller >> /etc/hosts | |
user_data_format: SOFTWARE_CONFIG | |
server_port: | |
type: OS::Neutron::Port | |
properties: | |
network_id: { get_param: private_net_id } | |
fixed_ips: | |
- subnet_id: { get_param: private_subnet_id } | |
security_groups: [{ get_resource: the_sg }] | |
server_floating_ip: | |
type: OS::Neutron::FloatingIP | |
properties: | |
floating_network_id: { get_param: public_net_id } | |
port_id: { get_resource: server_port } | |
outputs: | |
result: | |
value: | |
get_attr: [deployment, result] | |
stdout: | |
value: | |
get_attr: [deployment, deploy_stdout] | |
stderr: | |
value: | |
get_attr: [deployment, deploy_stderr] | |
status_code: | |
value: | |
get_attr: [deployment, deploy_status_code] | |
other_result: | |
value: | |
get_attr: [other_deployment, result] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment