Last active
July 1, 2016 12:05
-
-
Save dizz/4a6d9804c55a52e95ebd to your computer and use it in GitHub Desktop.
lab answer
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
heat_template_version: 2013-05-23 | |
description: > | |
This template sets up a 2 node wordpress installation | |
parameters: | |
key_name: | |
type: string | |
description: Name of keypair to assign to servers | |
default: edmo-admin-lisa # TODO to be filled | |
image: | |
type: string | |
description: Name of image to use for servers | |
default: Ubuntu-Trusty-Tahr-14.04.2-LTS # TODO to be filled | |
flavor: | |
type: string | |
description: Flavor to use for servers | |
default: m1.small # TODO to be filled | |
public_net: | |
type: string | |
description: > | |
ID of public network for which floating IP addresses will be allocated | |
default: 8f65289d-3c0d-4670-bf10-26b8feb24025 | |
resources: | |
net: | |
type: OS::Neutron::Net | |
properties: | |
name: my-net | |
subnet: | |
type: OS::Neutron::Subnet | |
properties: | |
name: my-sub | |
network: { get_resource: net } | |
cidr: 10.10.10.0/24 | |
dns_nameservers: | |
- 8.8.8.8 | |
router: | |
type: OS::Neutron::Router | |
properties: | |
name: my-router | |
external_gateway_info: | |
network: 8f65289d-3c0d-4670-bf10-26b8feb24025 | |
interface: | |
type: OS::Neutron::RouterInterface | |
properties: | |
router_id: { get_resource: router } | |
subnet_id: { get_resource: subnet } | |
secgrp: | |
type: OS::Neutron::SecurityGroup | |
properties: | |
name: my-sec-grp | |
rules: | |
- direction: ingress | |
protocol: tcp | |
port_range_min: 22 | |
port_range_max: 22 | |
- direction: ingress | |
protocol: tcp | |
port_range_min: 80 | |
port_range_max: 80 | |
- direction: ingress | |
protocol: tcp | |
port_range_min: 3306 | |
port_range_max: 3306 | |
wordpress: | |
type: OS::Nova::Server | |
depends_on: mysql | |
properties: | |
name: wordpress | |
key_name: { get_param: key_name } | |
image: { get_param: image } | |
flavor: { get_param: flavor } | |
networks: | |
- port: { get_resource: wordpress-port } | |
wordpress-port: | |
type: OS::Neutron::Port | |
properties: | |
network: { get_resource: net } | |
fixed_ips: | |
- subnet: { get_resource: subnet } | |
security_groups: | |
- { get_resource: secgrp } | |
wordpress-floating-ip: | |
type: OS::Neutron::FloatingIP | |
properties: | |
port_id: { get_resource: wordpress-port } | |
floating_network: { get_param: public_net } | |
mysql: | |
type: OS::Nova::Server | |
properties: | |
name: mysql | |
key_name: { get_param: key_name } | |
image: { get_param: image } | |
flavor: { get_param: flavor } | |
networks: | |
- port: { get_resource: mysql-port } | |
mysql-port: | |
type: OS::Neutron::Port | |
properties: | |
network: { get_resource: net } | |
fixed_ips: | |
- subnet: { get_resource: subnet } | |
security_groups: | |
- { get_resource: secgrp } | |
outputs: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment