aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom/onap-oom.yaml
blob: c378d0a50491480eb40dfe7a382560fc39cbeee7 (plain)
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
<!--
  ============LICENSE_START=======================================================
  openECOMP : SDN-C
  ================================================================================
  Copyright (C) 2017 AT&T Intellectual Property. All rights
  						reserved.
  ================================================================================
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  ============LICENSE_END=========================================================
  -->

<!-- Defines how we build the .zip file which is our distribution. -->

<assembly
	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
	<formats>
		<format>zip</format>
	</formats>

	<!--  we want "system" and related files right at the root level
		  as this file is suppose to be unzip on top of a karaf
		  distro. -->
	<includeBaseDirectory>false</includeBaseDirectory>

	<fileSets>
		<fileSet>
			<directory>target/assembly/</directory>
			<outputDirectory>.</outputDirectory>
			<excludes>
			</excludes>
		</fileSet>
	</fileSets>



</assembly>
href='#n431'>431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612
#
# Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
#
heat_template_version: 2015-10-15
description: ONAP on Kubernetes using OOM

parameters:
  docker_proxy:
    type: string

  apt_proxy:
    type: string

  public_net_id:
    type: string
    description: The ID of the Public network for floating IP address allocation

  oam_network_cidr:
    type: string
    description: CIDR of the OAM ONAP network

  ubuntu_1604_image:
    type: string
    description: Name of the Ubuntu 16.04 image

  rancher_vm_flavor:
    type: string
    description: VM flavor for Rancher

  k8s_vm_flavor:
    type: string
    description: VM flavor for k8s hosts

  integration_override_yaml:
    type: string
    description: Content for integration_override.yaml

  gerrit_branch:
    type: string
    default: "master"

  gerrit_refspec:
    type: string
    default: "refs/heads/master"

  docker_manifest:
    type: string
    default: "docker-manifest.csv"

  key_name:
    type: string
    default: "onap_key"

resources:
  random-str:
    type: OS::Heat::RandomString
    properties:
      length: 4

  # ONAP security group
  onap_sg:
    type: OS::Neutron::SecurityGroup
    properties:
      name:
        str_replace:
          template: base_rand
          params:
            base: onap_sg
            rand: { get_resource: random-str }
      description: security group used by ONAP
      rules:
        # All egress traffic
        - direction: egress
          ethertype: IPv4
        - direction: egress
          ethertype: IPv6
        # ingress traffic
        # ICMP
        - protocol: icmp
        - protocol: udp
          port_range_min: 1
          port_range_max: 65535
        - protocol: tcp
          port_range_min: 1
          port_range_max: 65535


  # ONAP management private network
  oam_network:
    type: OS::Neutron::Net
    properties:
      name:
        str_replace:
          template: oam_network_rand
          params:
            rand: { get_resource: random-str }

  oam_subnet:
    type: OS::Neutron::Subnet
    properties:
      name:
        str_replace:
          template: oam_network_rand
          params:
            rand: { get_resource: random-str }
      network_id: { get_resource: oam_network }
      cidr: { get_param: oam_network_cidr }
      dns_nameservers: [ "8.8.8.8" ]

  router:
    type: OS::Neutron::Router
    properties:
      external_gateway_info:
        network: { get_param: public_net_id }

  router_interface:
    type: OS::Neutron::RouterInterface
    properties:
      router_id: { get_resource: router }
      subnet_id: { get_resource: oam_subnet }

  rancher_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  rancher_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: rancher_private_port }

  rancher_vm:
    type: OS::Nova::Server
    properties:
      name: rancher
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: rancher_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: rancher_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          template:
            get_file: rancher_vm_entrypoint.sh
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
            __integration_override_yaml__: { get_param: integration_override_yaml }
            __gerrit_branch__: { get_param: gerrit_branch }
            __gerrit_refspec__: { get_param: gerrit_refspec }
            __docker_manifest__: { get_param: docker_manifest }
            __public_net_id__: { get_param: public_net_id }
            __oam_network_cidr__: { get_param: oam_network_cidr }
            __oam_network_id__: { get_resource: oam_network }
            __oam_subnet_id__: { get_resource: oam_subnet }
            __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
            __k8s_vm_ips__: [
              get_attr: [k8s_1_floating_ip, floating_ip_address],
              get_attr: [k8s_2_floating_ip, floating_ip_address],
              get_attr: [k8s_3_floating_ip, floating_ip_address],
              get_attr: [k8s_4_floating_ip, floating_ip_address],
              get_attr: [k8s_5_floating_ip, floating_ip_address],
              get_attr: [k8s_6_floating_ip, floating_ip_address],
              get_attr: [k8s_7_floating_ip, floating_ip_address],
              get_attr: [k8s_8_floating_ip, floating_ip_address],
              get_attr: [k8s_9_floating_ip, floating_ip_address],
              get_attr: [k8s_10_floating_ip, floating_ip_address],
              get_attr: [k8s_11_floating_ip, floating_ip_address],
            ]
            __k8s_private_ips__: [
              get_attr: [k8s_1_floating_ip, fixed_ip_address],
              get_attr: [k8s_2_floating_ip, fixed_ip_address],
              get_attr: [k8s_3_floating_ip, fixed_ip_address],
              get_attr: [k8s_4_floating_ip, fixed_ip_address],
              get_attr: [k8s_5_floating_ip, fixed_ip_address],
              get_attr: [k8s_6_floating_ip, fixed_ip_address],
              get_attr: [k8s_7_floating_ip, fixed_ip_address],
              get_attr: [k8s_8_floating_ip, fixed_ip_address],
              get_attr: [k8s_9_floating_ip, fixed_ip_address],
              get_attr: [k8s_10_floating_ip, fixed_ip_address],
              get_attr: [k8s_11_floating_ip, fixed_ip_address],
            ]
  k8s_1_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_1_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_1_private_port }

  k8s_1_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_1
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_1_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_2_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_2_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_2_private_port }

  k8s_2_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_2
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_2_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_3_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_3_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_3_private_port }

  k8s_3_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_3
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_3_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_4_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_4_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_4_private_port }

  k8s_4_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_4
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_4_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_5_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_5_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_5_private_port }

  k8s_5_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_5
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_5_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_6_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_6_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_6_private_port }

  k8s_6_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_6
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_6_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_7_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_7_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_7_private_port }

  k8s_7_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_7
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_7_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_8_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_8_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_8_private_port }

  k8s_8_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_8
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_8_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_9_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_9_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_9_private_port }

  k8s_9_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_9
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_9_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_10_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_10_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_10_private_port }

  k8s_10_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_10
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_10_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

  k8s_11_private_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: oam_network }
      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
      security_groups:
      - { get_resource: onap_sg }

  k8s_11_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: public_net_id }
      port_id: { get_resource: k8s_11_private_port }

  k8s_11_vm:
    type: OS::Nova::Server
    properties:
      name: k8s_11
      image: { get_param: ubuntu_1604_image }
      flavor: { get_param: k8s_vm_flavor }
      key_name: { get_param: key_name }
      networks:
      - port: { get_resource: k8s_11_private_port }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __docker_proxy__: { get_param: docker_proxy }
            __apt_proxy__: { get_param: apt_proxy }
            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
          template:
            get_file: k8s_vm_entrypoint.sh

outputs:
  rancher_vm_ip:
    description: The IP address of the rancher instance
    value: { get_attr: [rancher_floating_ip, floating_ip_address] }

  k8s_1_vm_ip:
    description: The IP address of the k8s_1 instance
    value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }

  k8s_2_vm_ip:
    description: The IP address of the k8s_2 instance
    value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }

  k8s_3_vm_ip:
    description: The IP address of the k8s_3 instance
    value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }

  k8s_4_vm_ip:
    description: The IP address of the k8s_4 instance
    value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }

  k8s_5_vm_ip:
    description: The IP address of the k8s_5 instance
    value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }

  k8s_6_vm_ip:
    description: The IP address of the k8s_6 instance
    value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }

  k8s_7_vm_ip:
    description: The IP address of the k8s_7 instance
    value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }

  k8s_8_vm_ip:
    description: The IP address of the k8s_8 instance
    value: { get_attr: [k8s_8_floating_ip, floating_ip_address] }

  k8s_9_vm_ip:
    description: The IP address of the k8s_9 instance
    value: { get_attr: [k8s_9_floating_ip, floating_ip_address] }

  k8s_10_vm_ip:
    description: The IP address of the k8s_10 instance
    value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }

  k8s_11_vm_ip:
    description: The IP address of the k8s_11 instance
    value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }