Gary Wu | 11c9874 | 2018-05-02 16:19:04 -0700 | [diff] [blame] | 1 | # |
| 2 | # Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST |
| 3 | # |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 4 | heat_template_version: 2015-10-15 |
| 5 | description: ONAP on Kubernetes using OOM |
| 6 | |
| 7 | parameters: |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 8 | docker_proxy: |
| 9 | type: string |
| 10 | |
| 11 | apt_proxy: |
| 12 | type: string |
| 13 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 14 | public_net_id: |
| 15 | type: string |
| 16 | description: The ID of the Public network for floating IP address allocation |
| 17 | |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 18 | oam_network_cidr: |
| 19 | type: string |
| 20 | description: CIDR of the OAM ONAP network |
| 21 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 22 | ubuntu_1604_image: |
| 23 | type: string |
| 24 | description: Name of the Ubuntu 16.04 image |
| 25 | |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 26 | rancher_vm_flavor: |
| 27 | type: string |
Gary Wu | 11c9874 | 2018-05-02 16:19:04 -0700 | [diff] [blame] | 28 | description: VM flavor for Rancher |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 29 | |
| 30 | k8s_vm_flavor: |
| 31 | type: string |
Gary Wu | 11c9874 | 2018-05-02 16:19:04 -0700 | [diff] [blame] | 32 | description: VM flavor for k8s hosts |
| 33 | |
| 34 | integration_override_yaml: |
| 35 | type: string |
| 36 | description: Content for integration_override.yaml |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 37 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 38 | resources: |
Gary Wu | c98156d | 2018-01-18 12:03:26 -0800 | [diff] [blame] | 39 | random-str: |
| 40 | type: OS::Heat::RandomString |
| 41 | properties: |
| 42 | length: 4 |
| 43 | |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 44 | # ONAP security group |
| 45 | onap_sg: |
| 46 | type: OS::Neutron::SecurityGroup |
| 47 | properties: |
| 48 | name: |
| 49 | str_replace: |
| 50 | template: base_rand |
| 51 | params: |
| 52 | base: onap_sg |
| 53 | rand: { get_resource: random-str } |
| 54 | description: security group used by ONAP |
| 55 | rules: |
| 56 | # All egress traffic |
| 57 | - direction: egress |
| 58 | ethertype: IPv4 |
| 59 | - direction: egress |
| 60 | ethertype: IPv6 |
| 61 | # ingress traffic |
| 62 | # ICMP |
| 63 | - protocol: icmp |
| 64 | - protocol: udp |
| 65 | port_range_min: 1 |
| 66 | port_range_max: 65535 |
| 67 | - protocol: tcp |
| 68 | port_range_min: 1 |
| 69 | port_range_max: 65535 |
| 70 | |
| 71 | |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 72 | # ONAP management private network |
| 73 | oam_network: |
| 74 | type: OS::Neutron::Net |
| 75 | properties: |
| 76 | name: |
| 77 | str_replace: |
| 78 | template: oam_network_rand |
| 79 | params: |
| 80 | rand: { get_resource: random-str } |
| 81 | |
| 82 | oam_subnet: |
| 83 | type: OS::Neutron::Subnet |
| 84 | properties: |
| 85 | name: |
| 86 | str_replace: |
| 87 | template: oam_network_rand |
| 88 | params: |
| 89 | rand: { get_resource: random-str } |
| 90 | network_id: { get_resource: oam_network } |
| 91 | cidr: { get_param: oam_network_cidr } |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 92 | dns_nameservers: [ "8.8.8.8" ] |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 93 | |
| 94 | router: |
| 95 | type: OS::Neutron::Router |
| 96 | properties: |
| 97 | external_gateway_info: |
| 98 | network: { get_param: public_net_id } |
| 99 | |
| 100 | router_interface: |
| 101 | type: OS::Neutron::RouterInterface |
| 102 | properties: |
| 103 | router_id: { get_resource: router } |
| 104 | subnet_id: { get_resource: oam_subnet } |
| 105 | |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 106 | rancher_private_port: |
| 107 | type: OS::Neutron::Port |
| 108 | properties: |
| 109 | network: { get_resource: oam_network } |
| 110 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 111 | security_groups: |
| 112 | - { get_resource: onap_sg } |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 113 | |
| 114 | rancher_floating_ip: |
| 115 | type: OS::Neutron::FloatingIP |
| 116 | properties: |
| 117 | floating_network_id: { get_param: public_net_id } |
| 118 | port_id: { get_resource: rancher_private_port } |
| 119 | |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 120 | rancher_vm: |
| 121 | type: OS::Nova::Server |
| 122 | properties: |
| 123 | name: rancher |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 124 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 125 | flavor: { get_param: rancher_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 126 | key_name: onap_key |
| 127 | networks: |
Gary Wu | 374498a | 2018-02-06 17:31:04 -0800 | [diff] [blame] | 128 | - port: { get_resource: rancher_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 129 | user_data_format: RAW |
| 130 | user_data: |
| 131 | str_replace: |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 132 | template: |
| 133 | get_file: rancher_vm_entrypoint.sh |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 134 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 135 | __docker_proxy__: { get_param: docker_proxy } |
| 136 | __apt_proxy__: { get_param: apt_proxy } |
| 137 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 11c9874 | 2018-05-02 16:19:04 -0700 | [diff] [blame] | 138 | __integration_override_yaml__: { get_param: integration_override_yaml } |
| 139 | __oam_network_id__: { get_resource: oam_network } |
| 140 | __oam_subnet_id__: { get_resource: oam_subnet } |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 141 | __k8s_vm_ips__: [ |
| 142 | get_attr: [k8s_1_floating_ip, floating_ip_address], |
| 143 | get_attr: [k8s_2_floating_ip, floating_ip_address], |
| 144 | get_attr: [k8s_3_floating_ip, floating_ip_address], |
| 145 | get_attr: [k8s_4_floating_ip, floating_ip_address], |
| 146 | get_attr: [k8s_5_floating_ip, floating_ip_address], |
| 147 | get_attr: [k8s_6_floating_ip, floating_ip_address], |
| 148 | get_attr: [k8s_7_floating_ip, floating_ip_address], |
| 149 | ] |
| 150 | k8s_1_private_port: |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 151 | type: OS::Neutron::Port |
| 152 | properties: |
| 153 | network: { get_resource: oam_network } |
| 154 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
Gary Wu | bc11e5d | 2018-02-07 10:23:27 -0800 | [diff] [blame] | 155 | security_groups: |
| 156 | - { get_resource: onap_sg } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 157 | |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 158 | k8s_1_floating_ip: |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 159 | type: OS::Neutron::FloatingIP |
| 160 | properties: |
| 161 | floating_network_id: { get_param: public_net_id } |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 162 | port_id: { get_resource: k8s_1_private_port } |
Gary Wu | 52dfdcb | 2018-01-25 11:02:48 -0800 | [diff] [blame] | 163 | |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 164 | k8s_1_vm: |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 165 | type: OS::Nova::Server |
| 166 | properties: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 167 | name: k8s_1 |
Gary Wu | 558ac6e | 2018-01-19 14:53:12 -0800 | [diff] [blame] | 168 | image: { get_param: ubuntu_1604_image } |
Gary Wu | 60dd0d8 | 2018-01-18 14:54:47 -0800 | [diff] [blame] | 169 | flavor: { get_param: k8s_vm_flavor } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 170 | key_name: onap_key |
| 171 | networks: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 172 | - port: { get_resource: k8s_1_private_port } |
Gary Wu | ccd529b | 2018-01-16 18:31:01 -0800 | [diff] [blame] | 173 | user_data_format: RAW |
| 174 | user_data: |
| 175 | str_replace: |
| 176 | params: |
| 177 | __docker_proxy__: { get_param: docker_proxy } |
| 178 | __apt_proxy__: { get_param: apt_proxy } |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 179 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 180 | template: |
| 181 | get_file: k8s_vm_entrypoint.sh |
| 182 | |
| 183 | k8s_2_private_port: |
| 184 | type: OS::Neutron::Port |
| 185 | properties: |
| 186 | network: { get_resource: oam_network } |
| 187 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 188 | security_groups: |
| 189 | - { get_resource: onap_sg } |
| 190 | |
| 191 | k8s_2_floating_ip: |
| 192 | type: OS::Neutron::FloatingIP |
| 193 | properties: |
| 194 | floating_network_id: { get_param: public_net_id } |
| 195 | port_id: { get_resource: k8s_2_private_port } |
| 196 | |
| 197 | k8s_2_vm: |
| 198 | type: OS::Nova::Server |
| 199 | properties: |
| 200 | name: k8s_2 |
| 201 | image: { get_param: ubuntu_1604_image } |
| 202 | flavor: { get_param: k8s_vm_flavor } |
| 203 | key_name: onap_key |
| 204 | networks: |
| 205 | - port: { get_resource: k8s_2_private_port } |
| 206 | user_data_format: RAW |
| 207 | user_data: |
| 208 | str_replace: |
| 209 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 210 | __docker_proxy__: { get_param: docker_proxy } |
| 211 | __apt_proxy__: { get_param: apt_proxy } |
| 212 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
| 213 | template: |
| 214 | get_file: k8s_vm_entrypoint.sh |
| 215 | |
| 216 | k8s_3_private_port: |
| 217 | type: OS::Neutron::Port |
| 218 | properties: |
| 219 | network: { get_resource: oam_network } |
| 220 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 221 | security_groups: |
| 222 | - { get_resource: onap_sg } |
| 223 | |
| 224 | k8s_3_floating_ip: |
| 225 | type: OS::Neutron::FloatingIP |
| 226 | properties: |
| 227 | floating_network_id: { get_param: public_net_id } |
| 228 | port_id: { get_resource: k8s_3_private_port } |
| 229 | |
| 230 | k8s_3_vm: |
| 231 | type: OS::Nova::Server |
| 232 | properties: |
| 233 | name: k8s_3 |
| 234 | image: { get_param: ubuntu_1604_image } |
| 235 | flavor: { get_param: k8s_vm_flavor } |
| 236 | key_name: onap_key |
| 237 | networks: |
| 238 | - port: { get_resource: k8s_3_private_port } |
| 239 | user_data_format: RAW |
| 240 | user_data: |
| 241 | str_replace: |
| 242 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 243 | __docker_proxy__: { get_param: docker_proxy } |
| 244 | __apt_proxy__: { get_param: apt_proxy } |
| 245 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
| 246 | template: |
| 247 | get_file: k8s_vm_entrypoint.sh |
| 248 | |
| 249 | k8s_4_private_port: |
| 250 | type: OS::Neutron::Port |
| 251 | properties: |
| 252 | network: { get_resource: oam_network } |
| 253 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 254 | security_groups: |
| 255 | - { get_resource: onap_sg } |
| 256 | |
| 257 | k8s_4_floating_ip: |
| 258 | type: OS::Neutron::FloatingIP |
| 259 | properties: |
| 260 | floating_network_id: { get_param: public_net_id } |
| 261 | port_id: { get_resource: k8s_4_private_port } |
| 262 | |
| 263 | k8s_4_vm: |
| 264 | type: OS::Nova::Server |
| 265 | properties: |
| 266 | name: k8s_4 |
| 267 | image: { get_param: ubuntu_1604_image } |
| 268 | flavor: { get_param: k8s_vm_flavor } |
| 269 | key_name: onap_key |
| 270 | networks: |
| 271 | - port: { get_resource: k8s_4_private_port } |
| 272 | user_data_format: RAW |
| 273 | user_data: |
| 274 | str_replace: |
| 275 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 276 | __docker_proxy__: { get_param: docker_proxy } |
| 277 | __apt_proxy__: { get_param: apt_proxy } |
| 278 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
| 279 | template: |
| 280 | get_file: k8s_vm_entrypoint.sh |
| 281 | |
| 282 | k8s_5_private_port: |
| 283 | type: OS::Neutron::Port |
| 284 | properties: |
| 285 | network: { get_resource: oam_network } |
| 286 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 287 | security_groups: |
| 288 | - { get_resource: onap_sg } |
| 289 | |
| 290 | k8s_5_floating_ip: |
| 291 | type: OS::Neutron::FloatingIP |
| 292 | properties: |
| 293 | floating_network_id: { get_param: public_net_id } |
| 294 | port_id: { get_resource: k8s_5_private_port } |
| 295 | |
| 296 | k8s_5_vm: |
| 297 | type: OS::Nova::Server |
| 298 | properties: |
| 299 | name: k8s_5 |
| 300 | image: { get_param: ubuntu_1604_image } |
| 301 | flavor: { get_param: k8s_vm_flavor } |
| 302 | key_name: onap_key |
| 303 | networks: |
| 304 | - port: { get_resource: k8s_5_private_port } |
| 305 | user_data_format: RAW |
| 306 | user_data: |
| 307 | str_replace: |
| 308 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 309 | __docker_proxy__: { get_param: docker_proxy } |
| 310 | __apt_proxy__: { get_param: apt_proxy } |
| 311 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
| 312 | template: |
| 313 | get_file: k8s_vm_entrypoint.sh |
| 314 | |
| 315 | k8s_6_private_port: |
| 316 | type: OS::Neutron::Port |
| 317 | properties: |
| 318 | network: { get_resource: oam_network } |
| 319 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 320 | security_groups: |
| 321 | - { get_resource: onap_sg } |
| 322 | |
| 323 | k8s_6_floating_ip: |
| 324 | type: OS::Neutron::FloatingIP |
| 325 | properties: |
| 326 | floating_network_id: { get_param: public_net_id } |
| 327 | port_id: { get_resource: k8s_6_private_port } |
| 328 | |
| 329 | k8s_6_vm: |
| 330 | type: OS::Nova::Server |
| 331 | properties: |
| 332 | name: k8s_6 |
| 333 | image: { get_param: ubuntu_1604_image } |
| 334 | flavor: { get_param: k8s_vm_flavor } |
| 335 | key_name: onap_key |
| 336 | networks: |
| 337 | - port: { get_resource: k8s_6_private_port } |
| 338 | user_data_format: RAW |
| 339 | user_data: |
| 340 | str_replace: |
| 341 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 342 | __docker_proxy__: { get_param: docker_proxy } |
| 343 | __apt_proxy__: { get_param: apt_proxy } |
| 344 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
| 345 | template: |
| 346 | get_file: k8s_vm_entrypoint.sh |
| 347 | |
| 348 | k8s_7_private_port: |
| 349 | type: OS::Neutron::Port |
| 350 | properties: |
| 351 | network: { get_resource: oam_network } |
| 352 | fixed_ips: [{"subnet": { get_resource: oam_subnet }}] |
| 353 | security_groups: |
| 354 | - { get_resource: onap_sg } |
| 355 | |
| 356 | k8s_7_floating_ip: |
| 357 | type: OS::Neutron::FloatingIP |
| 358 | properties: |
| 359 | floating_network_id: { get_param: public_net_id } |
| 360 | port_id: { get_resource: k8s_7_private_port } |
| 361 | |
| 362 | k8s_7_vm: |
| 363 | type: OS::Nova::Server |
| 364 | properties: |
| 365 | name: k8s_7 |
| 366 | image: { get_param: ubuntu_1604_image } |
| 367 | flavor: { get_param: k8s_vm_flavor } |
| 368 | key_name: onap_key |
| 369 | networks: |
| 370 | - port: { get_resource: k8s_7_private_port } |
| 371 | user_data_format: RAW |
| 372 | user_data: |
| 373 | str_replace: |
| 374 | params: |
Gary Wu | 14a6b30 | 2018-05-01 15:59:28 -0700 | [diff] [blame] | 375 | __docker_proxy__: { get_param: docker_proxy } |
| 376 | __apt_proxy__: { get_param: apt_proxy } |
| 377 | __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 1ff5667 | 2018-01-17 20:51:45 -0800 | [diff] [blame] | 378 | template: |
| 379 | get_file: k8s_vm_entrypoint.sh |
Gary Wu | 7b41639 | 2018-01-19 13:16:49 -0800 | [diff] [blame] | 380 | |
Gary Wu | 14ee41d | 2018-01-19 15:03:59 -0800 | [diff] [blame] | 381 | outputs: |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 382 | rancher_vm_ip: |
| 383 | description: The IP address of the rancher instance |
Gary Wu | 5d325d0 | 2018-02-06 21:21:31 -0800 | [diff] [blame] | 384 | value: { get_attr: [rancher_floating_ip, floating_ip_address] } |
Gary Wu | 6103408 | 2018-01-22 12:48:50 -0800 | [diff] [blame] | 385 | |
Gary Wu | 36e42dd | 2018-05-03 07:29:53 -0700 | [diff] [blame^] | 386 | k8s_1_vm_ip: |
| 387 | description: The IP address of the k8s_1 instance |
| 388 | value: { get_attr: [k8s_1_floating_ip, floating_ip_address] } |
| 389 | |
| 390 | k8s_2_vm_ip: |
| 391 | description: The IP address of the k8s_2 instance |
| 392 | value: { get_attr: [k8s_2_floating_ip, floating_ip_address] } |
| 393 | |
| 394 | k8s_3_vm_ip: |
| 395 | description: The IP address of the k8s_3 instance |
| 396 | value: { get_attr: [k8s_3_floating_ip, floating_ip_address] } |
| 397 | |
| 398 | k8s_4_vm_ip: |
| 399 | description: The IP address of the k8s_4 instance |
| 400 | value: { get_attr: [k8s_4_floating_ip, floating_ip_address] } |
| 401 | |
| 402 | k8s_5_vm_ip: |
| 403 | description: The IP address of the k8s_5 instance |
| 404 | value: { get_attr: [k8s_5_floating_ip, floating_ip_address] } |
| 405 | |
| 406 | k8s_6_vm_ip: |
| 407 | description: The IP address of the k8s_6 instance |
| 408 | value: { get_attr: [k8s_6_floating_ip, floating_ip_address] } |
| 409 | |
| 410 | k8s_7_vm_ip: |
| 411 | description: The IP address of the k8s_7 instance |
| 412 | value: { get_attr: [k8s_7_floating_ip, floating_ip_address] } |
| 413 | |