+
+
+ # MUSIC instantiation
+ music_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: music_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ music_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: music_private_port }
+
+ music_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1404_image }
+ flavor: { get_param: flavor_large }
+ name:
+ str_replace:
+ template: base-music
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: music_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_artifact_repo__: { get_param: nexus_artifact_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: music_docker }
+ __music_repo__: { get_param: music_repo }
+ __gerrit_branch__: { get_param: music_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_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 "__music_repo__" > /opt/config/remote_repo.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
+
+ # Download and run install script
+ apt-get -y install unzip
+ if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ unzip -j /opt/boot-__artifacts_version__.zip -d /opt music_install.sh
+ cd /opt
+ chmod +x music_install.sh
+ ./music_install.sh
+
+
+ # OOF instantiation
+ oof_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: oof_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ oof_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: oof_private_port }
+
+ oof_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_large }
+ name:
+ str_replace:
+ template: base-oof
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: oof_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_artifact_repo__: { get_param: nexus_artifact_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: oof_docker }
+ __oof_repo__: { get_param: oof_repo }
+ __gerrit_branch__: { get_param: oof_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_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 "__oof_repo__" > /opt/config/remote_repo.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
+
+ # Download and run install script
+ apt-get -y install unzip
+ if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ unzip -j /opt/boot-__artifacts_version__.zip -d /opt oof_install.sh
+ cd /opt
+ chmod +x oof_install.sh
+ ./oof_install.sh
+
+
+ # AAF instantiation
+ aaf_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aaf_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ aaf_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: aaf_private_port }
+
+ aaf_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-aaf
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: aaf_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_artifact_repo__: { get_param: nexus_artifact_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: aaf_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __aaf_repo__: { get_param: aaf_repo }
+ __gerrit_branch__: { get_param: aaf_branch }
+ __local_ip__: { get_param: aaf_ip_addr }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_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
+ echo "__aaf_repo__" > /opt/config/remote_repo.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__local_ip__" > /opt/config/local_ip.txt
+
+ # Download and run install script
+ apt-get -y install unzip
+ if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ unzip -j /opt/boot-__artifacts_version__.zip -d /opt aaf_install.sh
+ cd /opt
+ chmod +x aaf_install.sh
+ ./aaf_install.sh
+
+ # SMS instantiation
+ sms_private_port:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: oam_onap }
+ fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sms_ip_addr }}]
+ security_groups:
+ - { get_resource: onap_sg }
+
+ sms_floating_ip:
+ type: OS::Neutron::FloatingIP
+ properties:
+ floating_network_id: { get_param: public_net_id }
+ port_id: { get_resource: sms_private_port }
+
+ sms_vm:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: ubuntu_1604_image }
+ flavor: { get_param: flavor_medium }
+ name:
+ str_replace:
+ template: base-sms
+ params:
+ base: { get_param: vm_base_name }
+ key_name: { get_resource: vm_key }
+ networks:
+ - port: { get_resource: sms_private_port }
+ user_data_format: RAW
+ user_data:
+ str_replace:
+ params:
+ __nexus_artifact_repo__: { get_param: nexus_artifact_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: sms_docker }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __sms_repo__: { get_param: sms_repo }
+ __gerrit_branch__: { get_param: sms_branch }
+ __local_ip__: { get_param: sms_ip_addr }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_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
+ echo "__sms_repo__" > /opt/config/remote_repo.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
+ echo "__local_ip__" > /opt/config/local_ip.txt
+
+ # Download and run install script
+ apt-get -y install unzip
+ if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ unzip -j /opt/boot-__artifacts_version__.zip -d /opt sms_install.sh
+ cd /opt
+ chmod +x sms_install.sh
+ ./sms_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_artifact_repo__: { get_param: nexus_artifact_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 }
+ __nbi_repo__: { get_param: nbi_repo }
+ __gerrit_branch__: { get_param: nbi_branch }
+ __cloud_env__: { get_param: cloud_env }
+ __external_dns__: { get_param: external_dns }
+ __sdc_ip_addr__: { get_param: sdc_ip_addr }
+ __aai1_ip_addr__: { get_param: aai1_ip_addr }
+ __so_ip_addr__: { get_param: so_ip_addr }
+ template: |
+ #!/bin/bash
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_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 "__nbi_repo__" > /opt/config/remote_repo.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 "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
+ echo "__aai1_ip_addr__" > /opt/config/aai_ip_addr.txt
+ echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
+
+ # Download and run install script
+ apt-get -y install unzip
+ if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ unzip -j /opt/boot-__artifacts_version__.zip -d /opt nbi_install.sh
+ cd /opt
+ chmod +x nbi_install.sh
+ ./nbi_install.sh