Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

To add a new ONAP component to Heat it is necessary to complete the following three steps:

  1. Add the definition of a new component VM to the Heat template
  2. Make sure that all the component-specific configuration is in the Gerrit repository
  3. Prepare installation scripts that install software dependencies and docker containers


Add the definition of a new component VM to the Heat template

The Heat template contains the definition of the ONAP components and the Operation And Management (OAM) private network that those components use to communicate with each other. Each component has a fixed private IP address towards the OAM network, in the 10.0.0.0/16 address space.

The Heat stack contains a DNS server that resolves the Fully Qualified Domain Names (FQDNs) to IP addresses. The DNS configuration has an entry for each component VM, for example:

vm1.aai.simpledemo.openecomp.org.       IN      A       aai1_ip_addr

Then, all the services that run in a VM are associated to that FQDN:

aai.api.simpledemo.openecomp.org. IN CNAME vm1.aai.simpledemo.openecomp.org.

aai.ui.simpledemo.openecomp.org.    IN  CNAME   vm1.aai.simpledemo.openecomp.org.

aai.searchservice.simpledemo.openecomp.org.     IN      CNAME   vm1.aai.simpledemo.openecomp.org.


Adding a new ONAP component requires to add a description of the host VM in terms of operating system, flavor (number of vCPUs, RAM, disk), ports, etc. The VM description also contains a "user data" section that is used to implement custom operations. In ONAP, the "user data" section is used to save environment-specific parameters in the VM and make them usable by installation scripts (see next sections).

Find below the description of the SO VM:





p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #ff2840}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #00ce41}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px}
span.s1 {color: #000000}
span.s2 {color: #00ce41}
span.s3 {color: #ff2840}



  # MSO instantiation

  mso_private_port:

    type: OS::Neutron::Port

    properties:

      network: { get_resource: oam_onap }

      fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mso_ip_addr }}]




  mso_floating_ip:

    type: OS::Neutron::FloatingIP

    properties:

      floating_network_id: { get_param: public_net_id }

      port_id: { get_resource: mso_private_port }




  mso_vm:

    type: OS::Nova::Server

    properties:

      image: { get_param: ubuntu_1604_image }

      flavor: { get_param: flavor_large }

      name:

        str_replace:

          template: base-mso

          params:

            base: { get_param: vm_base_name }      

      key_name: { get_resource: vm_key }

      networks:

        - port: { get_resource: mso_private_port }

      user_data_format: RAW

      user_data:

        str_replace:

          params:

            __nexus_repo__: { get_param: nexus_repo }

            __nexus_docker_repo__: { get_param: nexus_docker_repo }

            __nexus_username__: { get_param: nexus_username }

            __nexus_password__: { get_param: nexus_password }

            __openstack_username__: { get_param: openstack_username }

            __openstack_tenant_id__: { get_param: openstack_tenant_id }

            __openstack_api_key__: { get_param: openstack_api_key }

            __openstack_region__: { get_param: openstack_region }

            __keystone_url__: { get_param: keystone_url }

            __dmaap_topic__: { get_param: dmaap_topic }

            __artifacts_version__: { get_param: artifacts_version }

            __dns_ip_addr__: { get_param: dns_ip_addr }

            __docker_version__: { get_param: docker_version }

            __gerrit_branch__: { get_param: gerrit_branch }

            __cloud_env__: { get_param: cloud_env }

            __external_dns__: { get_param: external_dns }

            __mso_repo__: { get_param: mso_repo }

          template: |

            #!/bin/bash




            # Create configuration files

            mkdir -p /opt/config

            echo "__nexus_repo__" > /opt/config/nexus_repo.txt

            echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt

            echo "__nexus_username__" > /opt/config/nexus_username.txt

            echo "__nexus_password__" > /opt/config/nexus_password.txt

            echo "__artifacts_version__" > /opt/config/artifacts_version.txt

            echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt

            echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt

            echo "__openstack_username__" > /opt/config/openstack_username.txt

            echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt

            echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt

            echo "__openstack_region__" > /opt/config/openstack_region.txt

            echo "__keystone_url__" > /opt/config/keystone.txt

            echo "__docker_version__" > /opt/config/docker_version.txt

            echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt

            echo "__cloud_env__" > /opt/config/cloud_env.txt

            echo "__external_dns__" > /opt/config/external_dns.txt

            echo "__mso_repo__" > /opt/config/remote_repo.txt




            # Download and run install script

            curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh

            cd /opt

            chmod +x mso_install.sh

            ./mso_install.sh
  • No labels