summaryrefslogtreecommitdiffstats
path: root/heat
diff options
context:
space:
mode:
authorRene Robert <rene.robert@orange.com>2018-03-28 12:25:41 +0000
committerRene Robert <rene.robert@orange.com>2018-03-28 17:38:26 +0000
commitdbae803ae3612907a9e91637b850543f51ddcc7a (patch)
treee38867702be5f10d9e62626e6bcf0367b782943b /heat
parentae54354b42b5aa58017ca9232b8fa63ebef54833 (diff)
add externalAPI/NBI project
and correct end of lines Issue-ID: INT-456 Change-Id: Ib61780eace2d204f1a3763f497943540cfb33889 Signed-off-by: Rene Robert <rene.robert@orange.com>
Diffstat (limited to 'heat')
-rw-r--r--heat/ONAP/onap_openstack.yaml66
-rw-r--r--heat/ONAP/onap_openstack_light.yaml66
2 files changed, 132 insertions, 0 deletions
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index 2bc32a15..3196443b 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -207,6 +207,8 @@ parameters:
type: string
aaf_ip_addr:
type: string
+ nbi_ip_addr:
+ type: string
###########################
# #
@@ -337,6 +339,8 @@ parameters:
type: string
aaf_docker:
type: string
+ nbi_docker:
+ type: string
vfc_nokia_docker:
type: string
@@ -2006,3 +2010,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
diff --git a/heat/ONAP/onap_openstack_light.yaml b/heat/ONAP/onap_openstack_light.yaml
index a258d90c..89ee63be 100644
--- a/heat/ONAP/onap_openstack_light.yaml
+++ b/heat/ONAP/onap_openstack_light.yaml
@@ -207,6 +207,8 @@ parameters:
type: string
aaf_ip_addr:
type: string
+ nbi_ip_addr:
+ type: string
###########################
# #
@@ -337,6 +339,8 @@ parameters:
type: string
aaf_docker:
type: string
+ nbi_docker:
+ type: string
vfc_nokia_docker:
type: string
@@ -2005,3 +2009,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