This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
billable_stack.yaml
executable file
·150 lines (135 loc) · 3.7 KB
/
billable_stack.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
heat_template_version: 2015-04-30
description: A simple template to create billable resources.
parameters:
flavor:
type: string
label: Flavor
description: Type of instance (flavor) to be used
default: dc1.1x0
key:
type: string
label: Key name
description: Name of key-pair to be used for compute instance
public_network:
type: string
label: Public network name or ID
description: Public network with floating IP addresses.
default: external
cidr:
type: string
label: Network CIDR
description: The CIDR of the private network.
default: '10.10.10.0/24'
dns:
type: comma_delimited_list
label: DNS nameservers
description: Comma separated list of DNS nameservers for the private network.
default: '8.8.8.8'
resources:
# An image
# WARNING: A resource deprecated in Ocata
my_image:
type: OS::Glance::Image
properties:
container_format: bare
disk_format: qcow2
location: http://www.download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
name: my_image
# Router with a subnet
private_network:
type: OS::Neutron::Net
private_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: private_network }
cidr: { get_param: cidr }
dns_nameservers: { get_param: dns }
router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: { get_param: public_network }
router-interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router }
subnet: { get_resource: private_subnet }
# Port and Instance
flasky_port:
type: OS::Neutron::Port
properties:
network: { get_resource: private_network }
flasky_instance:
type: OS::Nova::Server
properties:
image: { get_resource: my_image }
flavor: { get_param: flavor }
key_name: { get_param: key }
networks:
- port: { get_resource: flasky_port }
# Floating IP
floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: { get_param: public_network }
floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: floating_ip }
port_id: { get_resource: flasky_port }
# Volume
my_volume:
type: OS::Cinder::Volume
properties:
size: 1
# LBaaS v1
monitor:
type: OS::Neutron::HealthMonitor
properties:
type: TCP
delay: 5
max_retries: 5
timeout: 5
pool:
type: OS::Neutron::Pool
properties:
protocol: HTTP
monitors: [{ get_resource: monitor }]
subnet_id: { get_resource: private_subnet }
lb_method: ROUND_ROBIN
vip:
protocol_port: 80
lb:
type: OS::Neutron::LoadBalancer
properties:
protocol_port: 80
pool_id: { get_resource: pool }
# VPNaaS v1
vpn_monitor:
type: OS::Neutron::VPNService
properties:
subnet_id: { get_resource: private_subnet }
router_id: { get_resource: router }
depends_on: [ private_subnet, router, router-interface ]
ipsecpolicy:
type: OS::Neutron::IPsecPolicy
properties:
description: An IPsec policy
ikepolicy:
type: OS::Neutron::IKEPolicy
properties:
description: An IKE policy
site_connection:
type: OS::Neutron::IPsecSiteConnection
properties:
ikepolicy_id: { get_resource: ikepolicy }
ipsecpolicy_id: { get_resource: ipsecpolicy }
peer_address: 8.8.8.8
peer_cidrs: [ 10.10.11.0/24 ]
peer_id: placeholder
psk: secret
vpnservice_id: { get_resource: vpn_monitor }
#outputs:
# instance_ip:
# description: IP address of the instance
# value: { get_attr: [my_instance, first_address] }