blob: a6a5cf0c4093cac9698bc579b960db9a4421e2d0 [file] [log] [blame]
Gary Wuccd529b2018-01-16 18:31:01 -08001heat_template_version: 2015-10-15
2description: ONAP on Kubernetes using OOM
3
4parameters:
Gary Wu19c81b42018-04-17 11:35:48 -07005 lab_name:
6 type: string
7
Gary Wuccd529b2018-01-16 18:31:01 -08008 docker_proxy:
9 type: string
10
11 apt_proxy:
12 type: string
13
Gary Wuc98156d2018-01-18 12:03:26 -080014 public_net_id:
15 type: string
16 description: The ID of the Public network for floating IP address allocation
17
Gary Wu60dd0d82018-01-18 14:54:47 -080018 public_net_name:
19 type: string
20 description: The name of the Public network referred by public_net_id
21
Gary Wuc98156d2018-01-18 12:03:26 -080022 oam_network_cidr:
23 type: string
24 description: CIDR of the OAM ONAP network
25
26 keystone_url:
27 type: string
28 description: URL of OpenStack Keystone
29
30 openstack_tenant_id:
31 type: string
32 description: OpenStack tenant ID
33
34 openstack_tenant_name:
35 type: string
36 description: OpenStack tenant name (matching with the openstack_tenant_id)
37
38 openstack_username:
39 type: string
40 description: OpenStack username
41
42 openstack_api_key:
43 type: string
44 description: OpenStack password or API Key
45
46 ubuntu_1404_image:
47 type: string
48 description: Name of the Ubuntu 14.04 image
49
Gary Wu60dd0d82018-01-18 14:54:47 -080050 ubuntu_1604_image:
51 type: string
52 description: Name of the Ubuntu 16.04 image
53
54 centos_7_image:
55 type: string
56 description: the id/name of the CentOS 7 VM imange
57
58 rancher_vm_flavor:
59 type: string
60 description: Name of the Ubuntu 14.04 image
61
62 k8s_vm_flavor:
63 type: string
64 description: Name of the Ubuntu 14.04 image
65
Gary Wu60dd0d82018-01-18 14:54:47 -080066 dns_forwarder:
67 type: string
68 description: the forwarder address for setting up ONAP's private DNS server
69
Gary Wu7b416392018-01-19 13:16:49 -080070 external_dns:
71 type: string
72 description: Public IP of the external DNS for ONAP network
73
74 dnsaas_proxy_enable:
75 type: string
76 description: whether to enable DNSaaS proxy via multicloud
77
78 dnsaas_region:
79 type: string
80 description: the region of the cloud instance providing the Designate DNS as a Service
81
Gary Wu52dfdcb2018-01-25 11:02:48 -080082 dnsaas_proxied_keystone_url_path:
83 type: string
84 description: the proxy keystone URL path for DCAE to use (via MultiCloud)
85
Gary Wu7b416392018-01-19 13:16:49 -080086 dnsaas_keystone_url:
87 type: string
88 description: the keystone URL of the cloud instance providing the Designate DNS as a Service
89
90 dnsaas_username:
91 type: string
92 description: the username of the cloud instance providing the Designate DNS as a Service
93
94 dnsaas_password:
95 type: string
96 description: the password of the cloud instance providing the Designate DNS as a Service
97
Gary Wu52dfdcb2018-01-25 11:02:48 -080098 dnsaas_tenant_id:
99 type: string
100 description: the ID of the tenant in the cloud instance providing the Designate DNS as a Service
101
Gary Wu7b416392018-01-19 13:16:49 -0800102 dnsaas_tenant_name:
103 type: string
104 description: the name of the tenant in the cloud instance providing the Designate DNS as a Service
105
Gary Wuccd529b2018-01-16 18:31:01 -0800106resources:
Gary Wuc98156d2018-01-18 12:03:26 -0800107 random-str:
108 type: OS::Heat::RandomString
109 properties:
110 length: 4
111
Gary Wubc11e5d2018-02-07 10:23:27 -0800112 # ONAP security group
113 onap_sg:
114 type: OS::Neutron::SecurityGroup
115 properties:
116 name:
117 str_replace:
118 template: base_rand
119 params:
120 base: onap_sg
121 rand: { get_resource: random-str }
122 description: security group used by ONAP
123 rules:
124 # All egress traffic
125 - direction: egress
126 ethertype: IPv4
127 - direction: egress
128 ethertype: IPv6
129 # ingress traffic
130 # ICMP
131 - protocol: icmp
132 - protocol: udp
133 port_range_min: 1
134 port_range_max: 65535
135 - protocol: tcp
136 port_range_min: 1
137 port_range_max: 65535
138
139
Gary Wu52dfdcb2018-01-25 11:02:48 -0800140 # ONAP management private network
141 oam_network:
142 type: OS::Neutron::Net
143 properties:
144 name:
145 str_replace:
146 template: oam_network_rand
147 params:
148 rand: { get_resource: random-str }
149
150 oam_subnet:
151 type: OS::Neutron::Subnet
152 properties:
153 name:
154 str_replace:
155 template: oam_network_rand
156 params:
157 rand: { get_resource: random-str }
158 network_id: { get_resource: oam_network }
159 cidr: { get_param: oam_network_cidr }
160 dns_nameservers: [ get_param: dns_forwarder ]
161
162 router:
163 type: OS::Neutron::Router
164 properties:
165 external_gateway_info:
166 network: { get_param: public_net_id }
167
168 router_interface:
169 type: OS::Neutron::RouterInterface
170 properties:
171 router_id: { get_resource: router }
172 subnet_id: { get_resource: oam_subnet }
173
Gary Wu374498a2018-02-06 17:31:04 -0800174 rancher_private_port:
175 type: OS::Neutron::Port
176 properties:
177 network: { get_resource: oam_network }
178 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800179 security_groups:
180 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800181
182 rancher_floating_ip:
183 type: OS::Neutron::FloatingIP
184 properties:
185 floating_network_id: { get_param: public_net_id }
186 port_id: { get_resource: rancher_private_port }
187
Gary Wuccd529b2018-01-16 18:31:01 -0800188 rancher_vm:
189 type: OS::Nova::Server
190 properties:
191 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800192 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800193 flavor: { get_param: rancher_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800194 key_name: onap_key
195 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800196 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800197 user_data_format: RAW
198 user_data:
199 str_replace:
200 params:
201 __docker_proxy__: { get_param: docker_proxy }
202 __apt_proxy__: { get_param: apt_proxy }
Gary Wu1ff56672018-01-17 20:51:45 -0800203 template:
204 get_file: rancher_vm_entrypoint.sh
Gary Wuccd529b2018-01-16 18:31:01 -0800205
Gary Wu52dfdcb2018-01-25 11:02:48 -0800206 k8s_private_port:
207 type: OS::Neutron::Port
208 properties:
209 network: { get_resource: oam_network }
210 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800211 security_groups:
212 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800213
214 k8s_floating_ip:
215 type: OS::Neutron::FloatingIP
216 properties:
217 floating_network_id: { get_param: public_net_id }
218 port_id: { get_resource: k8s_private_port }
219
Gary Wuccd529b2018-01-16 18:31:01 -0800220 k8s_vm:
221 type: OS::Nova::Server
222 properties:
223 name: k8s
Gary Wu558ac6e2018-01-19 14:53:12 -0800224 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800225 flavor: { get_param: k8s_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800226 key_name: onap_key
227 networks:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800228 - port: { get_resource: k8s_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800229 user_data_format: RAW
230 user_data:
231 str_replace:
232 params:
Gary Wu19c81b42018-04-17 11:35:48 -0700233 __lab_name__: { get_param: lab_name }
Gary Wuccd529b2018-01-16 18:31:01 -0800234 __docker_proxy__: { get_param: docker_proxy }
235 __apt_proxy__: { get_param: apt_proxy }
Gary Wu5d325d02018-02-06 21:21:31 -0800236 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800237 __k8s_ip_addr__: { get_attr: [k8s_floating_ip, floating_ip_address] }
Gary Wuc98156d2018-01-18 12:03:26 -0800238 __openstack_tenant_id__: { get_param: openstack_tenant_id }
239 __openstack_tenant_name__: { get_param: openstack_tenant_name }
240 __openstack_username__: { get_param: openstack_username }
241 __openstack_api_key__: { get_param : openstack_api_key }
242 __public_net_id__: { get_param: public_net_id }
Gary Wu60dd0d82018-01-18 14:54:47 -0800243 __public_net_name__: { get_param: public_net_name }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800244 __oam_network_id__: { get_resource: oam_network }
Gary Wu57abb1a2018-03-09 13:38:28 -0800245 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wuc98156d2018-01-18 12:03:26 -0800246 __oam_network_cidr__: { get_param: oam_network_cidr }
247 __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800248 __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
249 __centos_7_image__: { get_param: centos_7_image }
Gary Wuc98156d2018-01-18 12:03:26 -0800250 __keystone_url__: { get_param: keystone_url }
Gary Wu60dd0d82018-01-18 14:54:47 -0800251 __dns_forwarder__: { get_param: dns_forwarder }
Gary Wu7b416392018-01-19 13:16:49 -0800252 __external_dns__: { get_param: external_dns }
253 __dnsaas_proxy_enable__: { get_param: dnsaas_proxy_enable }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800254 __dnsaas_proxied_keystone_url_path__: { get_param: dnsaas_proxied_keystone_url_path }
Gary Wu7b416392018-01-19 13:16:49 -0800255 __dnsaas_keystone_url__: { get_param: dnsaas_keystone_url }
256 __dnsaas_region__: { get_param: dnsaas_region }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800257 __dnsaas_tenant_id__: { get_param: dnsaas_tenant_id }
Gary Wu7b416392018-01-19 13:16:49 -0800258 __dnsaas_tenant_name__: { get_param: dnsaas_tenant_name }
259 __dnsaas_username__: { get_param: dnsaas_username }
260 __dnsaas_password__: { get_param: dnsaas_password }
Gary Wu1ff56672018-01-17 20:51:45 -0800261 template:
262 get_file: k8s_vm_entrypoint.sh
Gary Wu7b416392018-01-19 13:16:49 -0800263
Gary Wu14ee41d2018-01-19 15:03:59 -0800264outputs:
Gary Wu61034082018-01-22 12:48:50 -0800265 rancher_vm_ip:
266 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -0800267 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -0800268
Gary Wu14ee41d2018-01-19 15:03:59 -0800269 k8s_vm_ip:
270 description: The IP address of the k8s instance
Gary Wu52dfdcb2018-01-25 11:02:48 -0800271 value: { get_attr: [k8s_floating_ip, floating_ip_address] }