Env variables for Health Check SDC Distribution
[demo.git] / heat / ONAP / onap_openstack.yaml
index 2bc32a1..d956162 100644 (file)
@@ -207,6 +207,8 @@ parameters:
     type: string
   aaf_ip_addr:
     type: string
+  nbi_ip_addr:
+    type: string
 
   ###########################
   #                         #
@@ -214,6 +216,10 @@ parameters:
   #                         #
   ###########################
 
+  dcae_deployment_profile:
+    type: string
+    description: DCAE deployment profile.  Currently supported profiles R1, R2MVP.
+
   dnsaas_config_enabled:
     type: string
     description: whether the DNSaaS configuration section is enabled
@@ -337,6 +343,8 @@ parameters:
     type: string
   aaf_docker:
     type: string
+  nbi_docker:
+    type: string
 
   vfc_nokia_docker:
     type: string
@@ -370,6 +378,10 @@ parameters:
     type: string
   vfc_wfengine_activiti_docker:
     type: string
+  vfc_ztevmanagerdriver_docker:
+    type: string
+  vfc_multivimproxy_docker:
+    type: string
 
   cbam_username:
     type: string
@@ -547,6 +559,7 @@ resources:
             __music_ip_addr__: { get_param: music_ip_addr }
             __oof_ip_addr__: { get_param: oof_ip_addr }
             __aaf_ip_addr__: { get_param: aaf_ip_addr }
+            __nbi_ip_addr__: { get_param: nbi_ip_addr }
             __cloud_env__: { get_param: cloud_env }
             __external_dns__: { get_param: external_dns }
             __dns_forwarder__: { get_param: dns_forwarder }
@@ -577,6 +590,7 @@ resources:
             echo "__music_ip_addr__" > /opt/config/music_ip_addr.txt
             echo "__oof_ip_addr__" > /opt/config/oof_ip_addr.txt
             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
+            echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
 
@@ -973,6 +987,8 @@ resources:
             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
+            echo "__sdc_ip_addr__" > /opt/config/sdc_be_ip_addr.txt
+            echo "__sdc_ip_addr__" > /opt/config/sdc_fe_ip_addr.txt
             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
@@ -982,7 +998,7 @@ resources:
             echo "__aaf_ip_addr__" > /opt/config/aaf_ip_addr.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
-            echo "__vm_image_name__" > /opt/config/vm_image_name.txt
+            echo "__vm_flavor__" > /opt/config/vm_flavor.txt
             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
             echo "__script_version__" > /opt/config/script_version.txt
@@ -1667,7 +1683,7 @@ resources:
     type: OS::Nova::Server
     properties:
       image: { get_param: ubuntu_1604_image }
-      flavor: { get_param: flavor_small }
+      flavor: { get_param: flavor_large }
       name:
         str_replace:
           template: base-dcae-bootstrap
@@ -1691,6 +1707,7 @@ resources:
             __nexus_username__: { get_param: nexus_username }
             __nexus_password__: { get_param: nexus_password }
             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
+            __dcae_deployment_profile__: { get_param: dcae_deployment_profile }
             __mac_addr__: { get_attr: [dcae_c_private_port, mac_address] }
             __dcae_ip_addr__: { get_param: dcae_ip_addr }
             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
@@ -1762,6 +1779,7 @@ resources:
             echo "__nexus_password__" > /opt/config/nexus_password.txt
             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
             # conf for the ONAP environment where the DCAE bootstrap vm/conatiner runs
+            echo "__dcae_deployment_profile__" > /opt/config/dcae_deployment_profile.txt
             echo "__mac_addr__" > /opt/config/mac_addr.txt
             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
@@ -1800,6 +1818,7 @@ resources:
             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
             echo "__openo_ip_addr__" > /opt/config/openo_ip_addr.txt
+            echo "__openo_ip_addr__" > /opt/config/msb_ip_addr.txt
             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
             # floating IPs
@@ -2006,3 +2025,65 @@ resources:
             cd /opt
             chmod +x aaf_install.sh
             ./aaf_install.sh
+
+  # NBI instantiation
+  nbi_private_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: oam_onap }
+      fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: nbi_ip_addr }}]
+      security_groups:
+      - { get_resource: onap_sg }
+
+  nbi_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: { get_param: public_net_id }
+      port_id: { get_resource: nbi_private_port }
+
+  nbi_vm:
+    type: OS::Nova::Server
+    properties:
+      image: { get_param: ubuntu_1604_image }
+      flavor: { get_param: flavor_small }
+      name:
+        str_replace:
+          template: base-nbi
+          params:
+            base: { get_param: vm_base_name }
+      key_name: { get_resource: vm_key }
+      networks:
+        - port: { get_resource: nbi_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 }
+            __artifacts_version__: { get_param: artifacts_version }
+            __dns_ip_addr__: { get_param: dns_ip_addr }
+            __docker_version__: { get_param: nbi_docker }
+            __cloud_env__: { get_param: cloud_env }
+            __external_dns__: { get_param: external_dns }
+          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 "__docker_version__" > /opt/config/docker_version.txt
+            echo "__cloud_env__" > /opt/config/cloud_env.txt
+            echo "__external_dns__" > /opt/config/external_dns.txt
+
+            # Download and run install script
+            curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/nbi_install.sh -o /opt/nbi_install.sh
+            cd /opt
+            chmod +x nbi_install.sh
+            ./nbi_install.sh