From 3426556541256f93d2cba65df3b9c8d1d1772861 Mon Sep 17 00:00:00 2001 From: platania Date: Thu, 16 Feb 2017 11:20:22 -0500 Subject: [PATCH] Initial OpenECOMP Demo commit Change-Id: Ibf8696196a7ac2c84ac8aa7cde1982c9c89fb64d Signed-off-by: platania --- .gitreview | 4 + LICENSE.TXT | 22 + README.md | 23 + boot/.DS_Store | Bin 0 -> 6148 bytes boot/.gitkeep | 0 boot/aaf_serv.sh | 98 + boot/aaf_vm_init.sh | 4 + boot/aai_serv.sh | 98 + boot/aai_vm_init.sh | 28 + boot/appc_serv.sh | 98 + boot/appc_vm_init.sh | 14 + boot/asdc_ext_volume_partitions.txt | 7 + boot/asdc_serv.sh | 98 + boot/asdc_vm_init.sh | 9 + boot/db_openecomp_org | 109 + boot/dcae_serv.sh | 116 + boot/dcae_vm_init.sh | 23 + boot/mr_serv.sh | 116 + boot/mr_vm_init.sh | 22 + boot/mso_serv.sh | 98 + boot/mso_vm_init.sh | 50 + boot/named.conf.local | 12 + boot/named.conf.options | 39 + boot/policy_serv.sh | 98 + boot/policy_vm_init.sh | 9 + boot/portal_serv.sh | 98 + boot/portal_vm_init.sh | 29 + boot/robot_serv.sh | 98 + boot/robot_vm_init.sh | 19 + boot/sdnc_serv.sh | 98 + boot/sdnc_vm_init.sh | 9 + boot/vid_serv.sh | 98 + boot/vid_vm_init.sh | 15 + deploy_scripts/.DS_Store | Bin 0 -> 6148 bytes deploy_scripts/deploy_boot.sh | 11 + deploy_scripts/deploy_heat.sh | 11 + deploy_scripts/deploy_vfw_scripts.sh | 11 + deploy_scripts/deploy_vlb_scripts.sh | 11 + deploy_scripts/repo_config.txt | 4 + heat/.DS_Store | Bin 0 -> 8196 bytes heat/.gitkeep | 0 heat/LICENSE.TXT | 22 + heat/OpenECOMP/.DS_Store | Bin 0 -> 6148 bytes heat/README.md | 120 + heat/vFW/.DS_Store | Bin 0 -> 6148 bytes heat/vLB/.DS_Store | Bin 0 -> 6148 bytes vnfs/.DS_Store | Bin 0 -> 10244 bytes vnfs/.gitkeep | 0 vnfs/LICENSE.TXT | 22 + vnfs/README.md | 118 + vnfs/VES/.DS_Store | Bin 0 -> 6148 bytes vnfs/VES/LICENSE.md | 27 + vnfs/VES/bldjobs/Doxyfile | 1475 ++++++++ vnfs/VES/bldjobs/Makefile | 338 ++ vnfs/VES/code/.DS_Store | Bin 0 -> 6148 bytes vnfs/VES/code/evel_library/double_list.c | 194 ++ vnfs/VES/code/evel_library/double_list.h | 70 + vnfs/VES/code/evel_library/evel.c | 395 +++ vnfs/VES/code/evel_library/evel.h | 3677 ++++++++++++++++++++ vnfs/VES/code/evel_library/evel_event.c | 568 +++ vnfs/VES/code/evel_library/evel_event_mgr.c | 1053 ++++++ vnfs/VES/code/evel_library/evel_fault.c | 337 ++ vnfs/VES/code/evel_library/evel_internal.h | 867 +++++ vnfs/VES/code/evel_library/evel_internal_event.c | 124 + vnfs/VES/code/evel_library/evel_json_buffer.c | 853 +++++ vnfs/VES/code/evel_library/evel_logging.c | 181 + vnfs/VES/code/evel_library/evel_mobile_flow.c | 2036 +++++++++++ vnfs/VES/code/evel_library/evel_option.c | 442 +++ vnfs/VES/code/evel_library/evel_other.c | 231 ++ .../code/evel_library/evel_reporting_measurement.c | 450 +++ .../code/evel_library/evel_scaling_measurement.c | 1711 +++++++++ vnfs/VES/code/evel_library/evel_service.c | 1313 +++++++ vnfs/VES/code/evel_library/evel_signaling.c | 509 +++ vnfs/VES/code/evel_library/evel_state_change.c | 295 ++ vnfs/VES/code/evel_library/evel_strings.c | 477 +++ vnfs/VES/code/evel_library/evel_syslog.c | 500 +++ vnfs/VES/code/evel_library/evel_throttle.c | 2114 +++++++++++ vnfs/VES/code/evel_library/evel_throttle.h | 228 ++ vnfs/VES/code/evel_library/jsmn.c | 311 ++ vnfs/VES/code/evel_library/jsmn.h | 76 + vnfs/VES/code/evel_library/license.md | 95 + vnfs/VES/code/evel_library/metadata.c | 607 ++++ vnfs/VES/code/evel_library/metadata.h | 72 + vnfs/VES/code/evel_library/quickstart.md | 445 +++ vnfs/VES/code/evel_library/readme.md | 236 ++ vnfs/VES/code/evel_library/ring_buffer.c | 206 ++ vnfs/VES/code/evel_library/ring_buffer.h | 109 + vnfs/VES/code/evel_training/.DS_Store | Bin 0 -> 6148 bytes vnfs/VES/code/evel_training/.gitignore | 1 + vnfs/VES/code/evel_unit/evel_unit.c | 3453 ++++++++++++++++++ vnfs/VES/dep.xml | 55 + vnfs/VES/docs/source/evel/README | 1 + vnfs/VES/libs/x86_64/README | 1 + vnfs/VES/libs/x86_64/libevel.a | Bin 0 -> 414098 bytes vnfs/VES/output/.DS_Store | Bin 0 -> 6148 bytes vnfs/VES/output/x86_64/README | 1 + vnfs/VES/pom.xml | 56 + vnfs/VES/readme.md | 28 + vnfs/VESreporting_vFW/LICENSE.TXT | 22 + vnfs/VESreporting_vFW/Makefile | 45 + vnfs/VESreporting_vFW/README.md | 25 + vnfs/VESreporting_vFW/dep.xml | 25 + vnfs/VESreporting_vFW/go-client.sh | 6 + vnfs/VESreporting_vFW/pom.xml | 54 + vnfs/VESreporting_vFW/vpp_measurement_reporter.c | 232 ++ vnfs/VESreporting_vLB/LICENSE.TXT | 22 + vnfs/VESreporting_vLB/Makefile | 41 + vnfs/VESreporting_vLB/README.md | 25 + vnfs/VESreporting_vLB/dep.xml | 25 + vnfs/VESreporting_vLB/go-client.sh | 6 + vnfs/VESreporting_vLB/pom.xml | 55 + vnfs/VESreporting_vLB/vpp_measurement_reporter.c | 246 ++ vnfs/honeycomb_plugin/.DS_Store | Bin 0 -> 6148 bytes vnfs/honeycomb_plugin/sample_plugin/.DS_Store | Bin 0 -> 10244 bytes vnfs/honeycomb_plugin/sample_plugin/LICENSE.TXT | 22 + vnfs/honeycomb_plugin/sample_plugin/README.md | 16 + .../sample_plugin/parent-pom/pom.xml | 244 ++ vnfs/honeycomb_plugin/sample_plugin/pom.xml | 58 + .../sample_plugin/sample-distribution/.DS_Store | Bin 0 -> 6148 bytes .../sample_plugin/sample-distribution/pom.xml | 106 + .../sample-distribution/src/.DS_Store | Bin 0 -> 6148 bytes .../sample-distribution/src/main/.DS_Store | Bin 0 -> 6148 bytes .../sample-distribution/src/main/java/.DS_Store | Bin 0 -> 6148 bytes .../sample-distribution/src/main/java/io/.DS_Store | Bin 0 -> 6148 bytes .../src/main/java/io/fd/.DS_Store | Bin 0 -> 6148 bytes .../src/main/java/io/fd/honeycomb/.DS_Store | Bin 0 -> 6148 bytes .../main/java/io/fd/honeycomb/tutorial/Main.java | 41 + .../sample_plugin/sample-plugin-api/.DS_Store | Bin 0 -> 6148 bytes .../sample_plugin/sample-plugin-api/pom.xml | 76 + .../sample_plugin/sample-plugin-api/src/.DS_Store | Bin 0 -> 6148 bytes .../sample-plugin-api/src/main/.DS_Store | Bin 0 -> 6148 bytes .../src/main/yang/sample-plugin.yang | 77 + .../sample_plugin/sample-plugin-impl/.DS_Store | Bin 0 -> 6148 bytes .../sample_plugin/sample-plugin-impl/Readme.adoc | 3 + .../sample_plugin/sample-plugin-impl/pom.xml | 107 + .../main/java/io/fd/honeycomb/tutorial/Module.java | 71 + .../fd/honeycomb/tutorial/ModuleConfiguration.java | 46 + .../tutorial/init/ConfigDataInitializer.java | 50 + .../tutorial/notif/SampleNotificationProducer.java | 86 + .../tutorial/write/ModuleWriterFactory.java | 63 + .../tutorial/write/PgWriteCustomizer.java | 155 + vnfs/honeycomb_plugin/sample_plugin/settings.xml | 105 + vnfs/pom.xml | 71 + vnfs/settings.xml | 114 + vnfs/vFW/.DS_Store | Bin 0 -> 8196 bytes vnfs/vFW/pg_streams/.DS_Store | Bin 0 -> 6148 bytes vnfs/vFW/pg_streams/dep.xml | 17 + vnfs/vFW/pg_streams/pom.xml | 56 + vnfs/vFW/pg_streams/stream_fw_udp1 | 12 + vnfs/vFW/pg_streams/stream_fw_udp10 | 12 + vnfs/vFW/pg_streams/stream_fw_udp2 | 12 + vnfs/vFW/pg_streams/stream_fw_udp3 | 12 + vnfs/vFW/pg_streams/stream_fw_udp4 | 12 + vnfs/vFW/pg_streams/stream_fw_udp5 | 12 + vnfs/vFW/pg_streams/stream_fw_udp6 | 12 + vnfs/vFW/pg_streams/stream_fw_udp7 | 12 + vnfs/vFW/pg_streams/stream_fw_udp8 | 12 + vnfs/vFW/pg_streams/stream_fw_udp9 | 12 + vnfs/vFW/scripts/.DS_Store | Bin 0 -> 6148 bytes vnfs/vFW/scripts/run_traffic_fw_demo.sh | 13 + vnfs/vFW/scripts/v_firewall_init.sh | 47 + vnfs/vFW/scripts/v_packetgen_init.sh | 61 + vnfs/vFW/scripts/v_sink_init.sh | 7 + vnfs/vFW/scripts/vfirewall.sh | 98 + vnfs/vFW/scripts/vpacketgen.sh | 98 + vnfs/vFW/scripts/vsink.sh | 98 + vnfs/vLB/.DS_Store | Bin 0 -> 10244 bytes vnfs/vLB/DNSClient/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSClient/LICENSE.TXT | 22 + vnfs/vLB/DNSClient/README.txt | 14 + vnfs/vLB/DNSClient/pom.xml | 51 + vnfs/vLB/DNSClient/src/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSClient/src/main/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSClient/src/main/java/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSClient/src/main/java/DNSServer.java | 85 + vnfs/vLB/DNSClient/src/main/java/FDClient.java | 73 + vnfs/vLB/DNSManager/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSManager/LICENSE.TXT | 22 + vnfs/vLB/DNSManager/README.txt | 17 + vnfs/vLB/DNSManager/pom.xml | 51 + vnfs/vLB/DNSManager/src/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSManager/src/main/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/DNSManager/src/main/java/.DS_Store | Bin 0 -> 6148 bytes .../src/main/java/DNSMembershipManager.java | 95 + vnfs/vLB/DNSManager/src/main/java/FDServer.java | 161 + vnfs/vLB/dns_streams/.DS_Store | Bin 0 -> 6148 bytes vnfs/vLB/dns_streams/dep.xml | 17 + vnfs/vLB/dns_streams/pom.xml | 58 + vnfs/vLB/dns_streams/stream_dns1 | 13 + vnfs/vLB/dns_streams/stream_dns10 | 13 + vnfs/vLB/dns_streams/stream_dns2 | 13 + vnfs/vLB/dns_streams/stream_dns3 | 13 + vnfs/vLB/dns_streams/stream_dns4 | 13 + vnfs/vLB/dns_streams/stream_dns5 | 13 + vnfs/vLB/dns_streams/stream_dns6 | 13 + vnfs/vLB/dns_streams/stream_dns7 | 13 + vnfs/vLB/dns_streams/stream_dns8 | 13 + vnfs/vLB/dns_streams/stream_dns9 | 13 + vnfs/vLB/scripts/.DS_Store | Bin 0 -> 8196 bytes vnfs/vLB/scripts/add_dns.sh | 21 + vnfs/vLB/scripts/db_dnsdemo_openecomp_org | 24 + vnfs/vLB/scripts/dnsclient.sh | 6 + vnfs/vLB/scripts/dnsmembership.sh | 5 + vnfs/vLB/scripts/named.conf.local | 12 + vnfs/vLB/scripts/named.conf.options | 39 + vnfs/vLB/scripts/remove_dns.sh | 24 + vnfs/vLB/scripts/run_streams_dns.sh | 9 + vnfs/vLB/scripts/set_gre_tunnel.sh | 21 + vnfs/vLB/scripts/v_dns_init.sh | 5 + vnfs/vLB/scripts/v_lb_init.sh | 52 + vnfs/vLB/scripts/v_packetgen_for_dns_demo_init.sh | 97 + vnfs/vLB/scripts/vdns.sh | 98 + .../scripts/vdnspacketgen_change_streams_ports.sh | 53 + vnfs/vLB/scripts/vlb.sh | 98 + vnfs/vLB/scripts/vpacketgenfordnsdemo.sh | 99 + 215 files changed, 32621 insertions(+) create mode 100644 .gitreview create mode 100644 LICENSE.TXT create mode 100644 README.md create mode 100644 boot/.DS_Store create mode 100644 boot/.gitkeep create mode 100644 boot/aaf_serv.sh create mode 100644 boot/aaf_vm_init.sh create mode 100644 boot/aai_serv.sh create mode 100644 boot/aai_vm_init.sh create mode 100644 boot/appc_serv.sh create mode 100644 boot/appc_vm_init.sh create mode 100644 boot/asdc_ext_volume_partitions.txt create mode 100644 boot/asdc_serv.sh create mode 100644 boot/asdc_vm_init.sh create mode 100644 boot/db_openecomp_org create mode 100644 boot/dcae_serv.sh create mode 100644 boot/dcae_vm_init.sh create mode 100644 boot/mr_serv.sh create mode 100644 boot/mr_vm_init.sh create mode 100644 boot/mso_serv.sh create mode 100644 boot/mso_vm_init.sh create mode 100644 boot/named.conf.local create mode 100644 boot/named.conf.options create mode 100644 boot/policy_serv.sh create mode 100644 boot/policy_vm_init.sh create mode 100644 boot/portal_serv.sh create mode 100644 boot/portal_vm_init.sh create mode 100644 boot/robot_serv.sh create mode 100644 boot/robot_vm_init.sh create mode 100644 boot/sdnc_serv.sh create mode 100644 boot/sdnc_vm_init.sh create mode 100644 boot/vid_serv.sh create mode 100644 boot/vid_vm_init.sh create mode 100644 deploy_scripts/.DS_Store create mode 100755 deploy_scripts/deploy_boot.sh create mode 100755 deploy_scripts/deploy_heat.sh create mode 100755 deploy_scripts/deploy_vfw_scripts.sh create mode 100755 deploy_scripts/deploy_vlb_scripts.sh create mode 100644 deploy_scripts/repo_config.txt create mode 100644 heat/.DS_Store create mode 100644 heat/.gitkeep create mode 100644 heat/LICENSE.TXT create mode 100644 heat/OpenECOMP/.DS_Store create mode 100644 heat/README.md create mode 100644 heat/vFW/.DS_Store create mode 100644 heat/vLB/.DS_Store create mode 100644 vnfs/.DS_Store create mode 100644 vnfs/.gitkeep create mode 100644 vnfs/LICENSE.TXT create mode 100644 vnfs/README.md create mode 100644 vnfs/VES/.DS_Store create mode 100644 vnfs/VES/LICENSE.md create mode 100644 vnfs/VES/bldjobs/Doxyfile create mode 100644 vnfs/VES/bldjobs/Makefile create mode 100644 vnfs/VES/code/.DS_Store create mode 100644 vnfs/VES/code/evel_library/double_list.c create mode 100644 vnfs/VES/code/evel_library/double_list.h create mode 100644 vnfs/VES/code/evel_library/evel.c create mode 100644 vnfs/VES/code/evel_library/evel.h create mode 100644 vnfs/VES/code/evel_library/evel_event.c create mode 100644 vnfs/VES/code/evel_library/evel_event_mgr.c create mode 100644 vnfs/VES/code/evel_library/evel_fault.c create mode 100644 vnfs/VES/code/evel_library/evel_internal.h create mode 100644 vnfs/VES/code/evel_library/evel_internal_event.c create mode 100644 vnfs/VES/code/evel_library/evel_json_buffer.c create mode 100644 vnfs/VES/code/evel_library/evel_logging.c create mode 100644 vnfs/VES/code/evel_library/evel_mobile_flow.c create mode 100644 vnfs/VES/code/evel_library/evel_option.c create mode 100644 vnfs/VES/code/evel_library/evel_other.c create mode 100644 vnfs/VES/code/evel_library/evel_reporting_measurement.c create mode 100644 vnfs/VES/code/evel_library/evel_scaling_measurement.c create mode 100644 vnfs/VES/code/evel_library/evel_service.c create mode 100644 vnfs/VES/code/evel_library/evel_signaling.c create mode 100644 vnfs/VES/code/evel_library/evel_state_change.c create mode 100644 vnfs/VES/code/evel_library/evel_strings.c create mode 100644 vnfs/VES/code/evel_library/evel_syslog.c create mode 100644 vnfs/VES/code/evel_library/evel_throttle.c create mode 100644 vnfs/VES/code/evel_library/evel_throttle.h create mode 100644 vnfs/VES/code/evel_library/jsmn.c create mode 100644 vnfs/VES/code/evel_library/jsmn.h create mode 100644 vnfs/VES/code/evel_library/license.md create mode 100644 vnfs/VES/code/evel_library/metadata.c create mode 100644 vnfs/VES/code/evel_library/metadata.h create mode 100644 vnfs/VES/code/evel_library/quickstart.md create mode 100644 vnfs/VES/code/evel_library/readme.md create mode 100644 vnfs/VES/code/evel_library/ring_buffer.c create mode 100644 vnfs/VES/code/evel_library/ring_buffer.h create mode 100644 vnfs/VES/code/evel_training/.DS_Store create mode 100644 vnfs/VES/code/evel_training/.gitignore create mode 100644 vnfs/VES/code/evel_unit/evel_unit.c create mode 100644 vnfs/VES/dep.xml create mode 100644 vnfs/VES/docs/source/evel/README create mode 100644 vnfs/VES/libs/x86_64/README create mode 100755 vnfs/VES/libs/x86_64/libevel.a create mode 100644 vnfs/VES/output/.DS_Store create mode 100644 vnfs/VES/output/x86_64/README create mode 100644 vnfs/VES/pom.xml create mode 100644 vnfs/VES/readme.md create mode 100644 vnfs/VESreporting_vFW/LICENSE.TXT create mode 100644 vnfs/VESreporting_vFW/Makefile create mode 100644 vnfs/VESreporting_vFW/README.md create mode 100644 vnfs/VESreporting_vFW/dep.xml create mode 100755 vnfs/VESreporting_vFW/go-client.sh create mode 100644 vnfs/VESreporting_vFW/pom.xml create mode 100644 vnfs/VESreporting_vFW/vpp_measurement_reporter.c create mode 100644 vnfs/VESreporting_vLB/LICENSE.TXT create mode 100644 vnfs/VESreporting_vLB/Makefile create mode 100644 vnfs/VESreporting_vLB/README.md create mode 100644 vnfs/VESreporting_vLB/dep.xml create mode 100755 vnfs/VESreporting_vLB/go-client.sh create mode 100644 vnfs/VESreporting_vLB/pom.xml create mode 100644 vnfs/VESreporting_vLB/vpp_measurement_reporter.c create mode 100644 vnfs/honeycomb_plugin/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/LICENSE.TXT create mode 100755 vnfs/honeycomb_plugin/sample_plugin/README.md create mode 100644 vnfs/honeycomb_plugin/sample_plugin/parent-pom/pom.xml create mode 100755 vnfs/honeycomb_plugin/sample_plugin/pom.xml create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/.DS_Store create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/pom.xml create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/java/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/java/io/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/java/io/fd/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/java/io/fd/honeycomb/.DS_Store create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-distribution/src/main/java/io/fd/honeycomb/tutorial/Main.java create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-api/.DS_Store create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-api/pom.xml create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-api/src/.DS_Store create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-api/src/main/.DS_Store create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-api/src/main/yang/sample-plugin.yang create mode 100644 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/.DS_Store create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/Readme.adoc create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/pom.xml create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/Module.java create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/ModuleConfiguration.java create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/init/ConfigDataInitializer.java create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/notif/SampleNotificationProducer.java create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/write/ModuleWriterFactory.java create mode 100755 vnfs/honeycomb_plugin/sample_plugin/sample-plugin-impl/src/main/java/io/fd/honeycomb/tutorial/write/PgWriteCustomizer.java create mode 100644 vnfs/honeycomb_plugin/sample_plugin/settings.xml create mode 100755 vnfs/pom.xml create mode 100644 vnfs/settings.xml create mode 100644 vnfs/vFW/.DS_Store create mode 100644 vnfs/vFW/pg_streams/.DS_Store create mode 100644 vnfs/vFW/pg_streams/dep.xml create mode 100644 vnfs/vFW/pg_streams/pom.xml create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp1 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp10 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp2 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp3 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp4 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp5 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp6 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp7 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp8 create mode 100644 vnfs/vFW/pg_streams/stream_fw_udp9 create mode 100644 vnfs/vFW/scripts/.DS_Store create mode 100755 vnfs/vFW/scripts/run_traffic_fw_demo.sh create mode 100644 vnfs/vFW/scripts/v_firewall_init.sh create mode 100644 vnfs/vFW/scripts/v_packetgen_init.sh create mode 100644 vnfs/vFW/scripts/v_sink_init.sh create mode 100644 vnfs/vFW/scripts/vfirewall.sh create mode 100644 vnfs/vFW/scripts/vpacketgen.sh create mode 100644 vnfs/vFW/scripts/vsink.sh create mode 100644 vnfs/vLB/.DS_Store create mode 100644 vnfs/vLB/DNSClient/.DS_Store create mode 100644 vnfs/vLB/DNSClient/LICENSE.TXT create mode 100644 vnfs/vLB/DNSClient/README.txt create mode 100644 vnfs/vLB/DNSClient/pom.xml create mode 100644 vnfs/vLB/DNSClient/src/.DS_Store create mode 100644 vnfs/vLB/DNSClient/src/main/.DS_Store create mode 100644 vnfs/vLB/DNSClient/src/main/java/.DS_Store create mode 100644 vnfs/vLB/DNSClient/src/main/java/DNSServer.java create mode 100644 vnfs/vLB/DNSClient/src/main/java/FDClient.java create mode 100644 vnfs/vLB/DNSManager/.DS_Store create mode 100644 vnfs/vLB/DNSManager/LICENSE.TXT create mode 100644 vnfs/vLB/DNSManager/README.txt create mode 100644 vnfs/vLB/DNSManager/pom.xml create mode 100644 vnfs/vLB/DNSManager/src/.DS_Store create mode 100644 vnfs/vLB/DNSManager/src/main/.DS_Store create mode 100644 vnfs/vLB/DNSManager/src/main/java/.DS_Store create mode 100644 vnfs/vLB/DNSManager/src/main/java/DNSMembershipManager.java create mode 100644 vnfs/vLB/DNSManager/src/main/java/FDServer.java create mode 100644 vnfs/vLB/dns_streams/.DS_Store create mode 100644 vnfs/vLB/dns_streams/dep.xml create mode 100644 vnfs/vLB/dns_streams/pom.xml create mode 100644 vnfs/vLB/dns_streams/stream_dns1 create mode 100644 vnfs/vLB/dns_streams/stream_dns10 create mode 100644 vnfs/vLB/dns_streams/stream_dns2 create mode 100644 vnfs/vLB/dns_streams/stream_dns3 create mode 100644 vnfs/vLB/dns_streams/stream_dns4 create mode 100644 vnfs/vLB/dns_streams/stream_dns5 create mode 100644 vnfs/vLB/dns_streams/stream_dns6 create mode 100644 vnfs/vLB/dns_streams/stream_dns7 create mode 100644 vnfs/vLB/dns_streams/stream_dns8 create mode 100644 vnfs/vLB/dns_streams/stream_dns9 create mode 100644 vnfs/vLB/scripts/.DS_Store create mode 100644 vnfs/vLB/scripts/add_dns.sh create mode 100644 vnfs/vLB/scripts/db_dnsdemo_openecomp_org create mode 100644 vnfs/vLB/scripts/dnsclient.sh create mode 100644 vnfs/vLB/scripts/dnsmembership.sh create mode 100644 vnfs/vLB/scripts/named.conf.local create mode 100644 vnfs/vLB/scripts/named.conf.options create mode 100644 vnfs/vLB/scripts/remove_dns.sh create mode 100755 vnfs/vLB/scripts/run_streams_dns.sh create mode 100644 vnfs/vLB/scripts/set_gre_tunnel.sh create mode 100755 vnfs/vLB/scripts/v_dns_init.sh create mode 100755 vnfs/vLB/scripts/v_lb_init.sh create mode 100644 vnfs/vLB/scripts/v_packetgen_for_dns_demo_init.sh create mode 100644 vnfs/vLB/scripts/vdns.sh create mode 100644 vnfs/vLB/scripts/vdnspacketgen_change_streams_ports.sh create mode 100644 vnfs/vLB/scripts/vlb.sh create mode 100644 vnfs/vLB/scripts/vpacketgenfordnsdemo.sh diff --git a/.gitreview b/.gitreview new file mode 100644 index 00000000..ab3f0546 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=demo.git diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 00000000..56404742 --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,22 @@ +/* + * ============LICENSE_START========================================== + * =================================================================== + * Copyright © 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============================================ + * + * ECOMP and OpenECOMP are trademarks + * and service marks of AT&T Intellectual Property. + * + */ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..98b68a2c --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +OpenECOMP Platform Instantiation and Demo Applications +--- + +This project contains the source code and scripts to instantiate OpenECOMP and the two demo applications, vFirewall and vLoadBalancer/vDNS. + +This repository includes: + +- README.md: this file + +- LICENSE.TXT: the license file + +- The "boot" directory: the scripts to instantiate OpenECOMP. + +- The "heat" directory: the heat templates to instantiate OpenECOMP and the demo applications. + +- The "vnfs" directory: the scripts and source codes for running the two demo applications. + +Usage +--- + +To instantiate OpenECOMP, please download and run the heat template and environment files in "heat/OpenECOMP". Please follow instructions in "heat/README.md" for further details. + + diff --git a/boot/.DS_Store b/boot/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/aaf_vm_init.sh b/boot/aaf_vm_init.sh new file mode 100644 index 00000000..1f29429c --- /dev/null +++ b/boot/aaf_vm_init.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd dcae-startup-vm-aaf +./deploy.sh diff --git a/boot/aai_serv.sh b/boot/aai_serv.sh new file mode 100644 index 00000000..2e0dbab3 --- /dev/null +++ b/boot/aai_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./aai_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/aai_vm_init.sh b/boot/aai_vm_init.sh new file mode 100644 index 00000000..148fc583 --- /dev/null +++ b/boot/aai_vm_init.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt) +GITLAB_CERTNAME=$(cat /opt/config/gitlab_certname.txt) +GITLAB_USERNAME=$(cat /opt/config/gitlab_username.txt) +GITLAB_PASSWD=$(cat /opt/config/gitlab_password.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO + +docker pull $NEXUS_DOCKER_REPO/ecomp/aai-hbase-1.2.3 +docker rm -f hbase-1.2.3 +docker run -d --net=host --name="hbase-1.2.3" $NEXUS_DOCKER_REPO/ecomp/aai-hbase-1.2.3 + +# Wait 3 minutes before instantiating the A&AI container +sleep 180 + +docker pull $NEXUS_DOCKER_REPO/ecomp/ajsc-aai:latest +docker rm -f aai-service +docker run --name=aai-service --net=host -v /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt -it -e GITLAB_CERTNAME=$GITLAB_CERTNAME -e GITLAB_USERNAME=$GITLAB_USERNAME -e GITLAB_PASSWORD=$GITLAB_PASSWD -e AAI_REPO_PATH=OpenECOMP -e AAI_CHEF_ENV=simpledemo -d -e AAI_CHEF_LOC=/var/chef/aai-data/environments -e docker_gitbranch=develop $NEXUS_DOCKER_REPO/ecomp/ajsc-aai:latest + +docker pull $NEXUS_DOCKER_REPO/ecomp/model-loader:latest +docker rm -f model-loader-service + +docker run --name=model-loader-service -it -d -e DISTR_CLIENT_ASDC_ADDRESS=c2.vm1.asdc.simpledemo.openecomp.org:8443 -e DISTR_CLIENT_ENVIRONMENT_NAME=$DMAAP_TOPIC -e DISTR_CLIENT_USER=aai -e DISTR_CLIENT_PASSWORD=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp -e APP_SERVER_BASE_URL=https://c1.vm1.aai.simpledemo.openecomp.org:8443 -e APP_SERVER_KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o -e APP_SERVER_AUTH_USER=ModelLoader -e APP_SERVER_AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw $NEXUS_DOCKER_REPO/ecomp/model-loader:latest + diff --git a/boot/appc_serv.sh b/boot/appc_serv.sh new file mode 100644 index 00000000..a71db888 --- /dev/null +++ b/boot/appc_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./appc_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/appc_vm_init.sh b/boot/appc_vm_init.sh new file mode 100644 index 00000000..1692a074 --- /dev/null +++ b/boot/appc_vm_init.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt) + +cd /opt/appc + +sed -i "s/DMAAP_TOPIC_ENV=.*/DMAAP_TOPIC_ENV="$DMAAP_TOPIC"/g" /opt/appc/docker-compose.yml + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +/opt/docker/docker-compose pull +/opt/docker/docker-compose up -d diff --git a/boot/asdc_ext_volume_partitions.txt b/boot/asdc_ext_volume_partitions.txt new file mode 100644 index 00000000..b00c6ae2 --- /dev/null +++ b/boot/asdc_ext_volume_partitions.txt @@ -0,0 +1,7 @@ +# partition table of /dev/xvdb +unit: sectors + +/dev/xvdb1 : start= 2048, size=209713152, Id=83 +/dev/xvdb2 : start= 0, size= 0, Id= 0 +/dev/xvdb3 : start= 0, size= 0, Id= 0 +/dev/xvdb4 : start= 0, size= 0, Id= 0 diff --git a/boot/asdc_serv.sh b/boot/asdc_serv.sh new file mode 100644 index 00000000..7d2539eb --- /dev/null +++ b/boot/asdc_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./asdc_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/asdc_vm_init.sh b/boot/asdc_vm_init.sh new file mode 100644 index 00000000..f0777d5f --- /dev/null +++ b/boot/asdc_vm_init.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +ENV_NAME=$(cat /opt/config/env_name.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +bash /data/scripts/docker_run.sh -e $ENV_NAME diff --git a/boot/db_openecomp_org b/boot/db_openecomp_org new file mode 100644 index 00000000..be42b603 --- /dev/null +++ b/boot/db_openecomp_org @@ -0,0 +1,109 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA openecomp.org. admin.openecomp.org. ( + 20161202 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +; name servers - NS records + IN NS openecomp.org. + +; name servers - A records +openecomp.org. IN A 10.0.0.1 + +; +vm1.aai.simpledemo.openecomp.org. IN A 10.0.1.1 +c1.vm1.aai.simpledemo.openecomp.org. IN A 10.0.1.1 +c2.vm1.aai.simpledemo.openecomp.org. IN A 10.0.1.1 +c3.vm1.aai.simpledemo.openecomp.org. IN A 10.0.1.1 + +vm1.appc.simpledemo.openecomp.org. IN A 10.0.2.1 +c1.vm1.appc.simpledemo.openecomp.org. IN A 10.0.2.1 +c2.vm1.appc.simpledemo.openecomp.org. IN A 10.0.2.1 + +vm1.asdc.simpledemo.openecomp.org. IN A 10.0.3.1 +c1.vm1.asdc.simpledemo.openecomp.org. IN A 10.0.3.1 +c2.vm1.asdc.simpledemo.openecomp.org. IN A 10.0.3.1 +c3.vm1.asdc.simpledemo.openecomp.org. IN A 10.0.3.1 +c4.vm1.asdc.simpledemo.openecomp.org. IN A 10.0.3.1 + +vm1.dcae.simpledemo.openecomp.org. IN A 10.0.4.1 +c1.vm1.dcae.simpledemo.openecomp.org. IN A 10.0.4.1 +c2.vm1.dcae.simpledemo.openecomp.org. IN A 10.0.4.1 +c3.vm1.dcae.simpledemo.openecomp.org IN A 10.0.4.1 + +vm1.mso.simpledemo.openecomp.org. IN A 10.0.5.1 +c1.vm1.mso.simpledemo.openecomp.org. IN A 10.0.5.1 +c1.vm1.mso.simpledemo.openecomp.org. IN A 10.0.5.1 + +vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c1.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c2.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c3.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c4.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c5.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c6.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c7.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 +c8.vm1.policy.simpledemo.openecomp.org. IN A 10.0.6.1 + +vm1.sdnc.simpledemo.openecomp.org. IN A 10.0.7.1 +c1.vm1.sdnc.simpledemo.openecomp.org. IN A 10.0.7.1 +c2.vm1.sdnc.simpledemo.openecomp.org. IN A 10.0.7.1 +c3.vm1.sdnc.simpledemo.openecomp.org. IN A 10.0.7.1 +c4.vm1.sdnc.simpledemo.openecomp.org. IN A 10.0.7.1 + +vm1.vid.simpledemo.openecomp.org. IN A 10.0.8.1 +c1.vm1.vid.simpledemo.openecomp.org. IN A 10.0.8.1 +c2.vm1.vid.simpledemo.openecomp.org. IN A 10.0.8.1 + +vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 +c1.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 +c2.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 + +vm1.aaf.simpledemo.openecomp.org. IN A 10.0.12.1 + +vm1.mr.simpledemo.openecomp.org. IN A 10.0.11.1 + +;CNAMES +;A&AI +aai.api.simpledemo.openecomp.org. IN CNAME vm1.aai.simpledemo.openecomp.org. +aai.hbase.simpledemo.openecomp.org. IN CNAME vm1.aai.simpledemo.openecomp.org. + +;APPC +appc.api.simpledemo.openecomp.org. IN CNAME vm1.appc.simpledemo.openecomp.org. + +;ASDC +asdc.api.simpledemo.openecomp.org. IN CNAME vm1.asdc.simpledemo.openecomp.org. + +;DCAE +dcae.api.simpledemo.openecomp.org. IN CNAME vm1.dcae.simpledemo.openecomp.org. + +;MSO +mso.api.simpledemo.openecomp.org. IN CNAME vm1.mso.simpledemo.openecomp.org. + +;Policy +policy.api.simpledemo.openecomp.org. IN CNAME vm1.policy.simpledemo.openecomp.org. + +;SDNC +sdnc.api.simpledemo.openecomp.org. IN CNAME vm1.sdnc.simpledemo.openecomp.org. + +;VID +vid.api.simpledemo.openecomp.org. IN CNAME vm1.vid.simpledemo.openecomp.org. + +;PORTAL +portal.api.simpledemo.openecomp.org. IN CNAME vm1.portal.simpledemo.openecomp.org. + +;Message Router +;mr.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. +ueb.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. +mr.api.simpledemo.openecomp.org. IN A 10.0.4.102 +collector.api.simpledemo.openecomp.org. IN A 10.0.4.102 +;dbc.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. +;drprov.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. + +;AAF +aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org. \ No newline at end of file diff --git a/boot/dcae_serv.sh b/boot/dcae_serv.sh new file mode 100644 index 00000000..f20a37bf --- /dev/null +++ b/boot/dcae_serv.sh @@ -0,0 +1,116 @@ + +############################################################################# +# +# Copyright © 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. +# +############################################################################# + +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./dcae_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/dcae_vm_init.sh b/boot/dcae_vm_init.sh new file mode 100644 index 00000000..1802ed4e --- /dev/null +++ b/boot/dcae_vm_init.sh @@ -0,0 +1,23 @@ + +############################################################################# +# +# Copyright © 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. +# +############################################################################# + +#!/bin/bash + +cd /opt/dcae-startup-vm-controller +bash init.sh +make up diff --git a/boot/mr_serv.sh b/boot/mr_serv.sh new file mode 100644 index 00000000..77f86395 --- /dev/null +++ b/boot/mr_serv.sh @@ -0,0 +1,116 @@ + +############################################################################# +# +# Copyright © 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. +# +############################################################################# + +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./mr_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/mr_vm_init.sh b/boot/mr_vm_init.sh new file mode 100644 index 00000000..4cd6caf0 --- /dev/null +++ b/boot/mr_vm_init.sh @@ -0,0 +1,22 @@ + +############################################################################# +# +# Copyright © 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. +# +############################################################################# + +#!/bin/bash + +cd /opt/dcae-startup-vm-message-router +bash deploy.sh diff --git a/boot/mso_serv.sh b/boot/mso_serv.sh new file mode 100644 index 00000000..00ee4170 --- /dev/null +++ b/boot/mso_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./mso_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/mso_vm_init.sh b/boot/mso_vm_init.sh new file mode 100644 index 00000000..f878f535 --- /dev/null +++ b/boot/mso_vm_init.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +OPENSTACK_USERNAME=$(cat /opt/config/openstack_username.txt) +OPENSTACK_APIKEY=$(cat /opt/config/api_key.txt) +DMAAP_TOPIC=$(cat /opt/config/dmaap_topic.txt) +export MSO_DOCKER_IMAGE_VERSION=1.0.0 + +# Update the MSO configuration file. +read -d '' MSO_CONFIG_UPDATES <<-EOF +{ +"default_attributes": + { + "asdc-connections": + { + "asdc-controller1": + { + "environmentName": "$DMAAP_TOPIC" + } + }, + "mso-po-adapter-config": + { + "identity_services": + [ + {"dcp_clli": "RAX_KEYSTONE", + "identity_url": "https://identity.api.rackspacecloud.com/v2.0", + "mso_id": "$OPENSTACK_USERNAME", + "mso_pass": "$OPENSTACK_APIKEY", + "admin_tenant": "service", + "member_role": "admin", + "tenant_metadata": "true", + "identity_server_type": "KEYSTONE", + "identity_authentication_type": "RACKSPACE_APIKEY" + + } + ] + } + } +} +EOF +export MSO_CONFIG_UPDATES + + +# Deploy the environment +cd /opt/test_lab +chmod +x deploy.sh +#This script takes in input 2 nexus repos (the first one for the MSO image, the second one for mariadb) +./deploy.sh $NEXUS_DOCKER_REPO $NEXUS_USERNAME $NEXUS_PASSWD ecomp-nexus:51211 release sfWU3DFVdBr7GVxB85mTYgAW diff --git a/boot/named.conf.local b/boot/named.conf.local new file mode 100644 index 00000000..3cc9f0d3 --- /dev/null +++ b/boot/named.conf.local @@ -0,0 +1,12 @@ +// +// Do any local configuration here +// + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + +zone "openecomp.org" { + type master; + file "/etc/bind/zones/db.openecomp.org"; # zone file path +}; diff --git a/boot/named.conf.options b/boot/named.conf.options new file mode 100644 index 00000000..2b23f7e7 --- /dev/null +++ b/boot/named.conf.options @@ -0,0 +1,39 @@ +acl "trusted" { + #x.x.x.x; +}; +options { + directory "/var/cache/bind"; + + #recursion no; # enables recursive queries + #allow-recursion { trusted; }; # allows recursive queries from "trusted” clients i.e. LB only + listen-on { 10.0.0.1; }; # ns1 IP address - listen on this address only + allow-transfer { none; }; # disable zone transfers by default + + forwarders { + 8.8.8.8; + 8.8.4.4; + }; + + // If there is a firewall between you and nameservers you want + // to talk to, you may need to fix the firewall to allow multiple + // ports to talk. See http://www.kb.cert.org/vuls/id/800113 + + // If your ISP provided one or more IP addresses for stable + // nameservers, you probably want to use them as forwarders. + // Uncomment the following block, and insert the addresses replacing + // the all-0's placeholder. + + // forwarders { + // 0.0.0.0; + // }; + + //======================================================================== + // If BIND logs error messages about the root key being expired, + // you will need to update your keys. See https://www.isc.org/bind-keys + //======================================================================== + dnssec-validation auto; + + auth-nxdomain no; # conform to RFC1035 + listen-on-v6 { any; }; +}; + diff --git a/boot/policy_serv.sh b/boot/policy_serv.sh new file mode 100644 index 00000000..2e7195b9 --- /dev/null +++ b/boot/policy_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./policy_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/policy_vm_init.sh b/boot/policy_vm_init.sh new file mode 100644 index 00000000..ad71cf0e --- /dev/null +++ b/boot/policy_vm_init.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) + +cd /opt/policy +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +/opt/docker/docker-compose up -d diff --git a/boot/portal_serv.sh b/boot/portal_serv.sh new file mode 100644 index 00000000..cf0c412d --- /dev/null +++ b/boot/portal_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./portal_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/portal_vm_init.sh b/boot/portal_vm_init.sh new file mode 100644 index 00000000..744c4fc9 --- /dev/null +++ b/boot/portal_vm_init.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/ecomp/portaldb:1610.3 +docker pull $NEXUS_DOCKER_REPO/ecomp/portalapps:1610.3 + +docker create --name data_vol_portal -v /var/lib/mysql mariadb + +docker tag 6ce6ea8c6e52 ecompdb:portal +docker tag 925a8a953d4c ep:1610-1 + +docker rm -f ecompdb_portal +docker rm -f 1610-1 + +./dbstart.sh +./new_start.sh + +sleep 60 + +if [ ! -e /opt/config/boot.txt ] +then + IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) + mysql -u root -p'Aa123456' -h $IP_ADDRESS < users.sql + echo "yes" > /opt/config/boot.txt +fi \ No newline at end of file diff --git a/boot/robot_serv.sh b/boot/robot_serv.sh new file mode 100644 index 00000000..7c4419d1 --- /dev/null +++ b/boot/robot_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./robot_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/robot_vm_init.sh b/boot/robot_vm_init.sh new file mode 100644 index 00000000..582a3f2e --- /dev/null +++ b/boot/robot_vm_init.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +NEXUS_REPO=$(cat /opt/config/nexus_repo.txt) + +# +# Deploy latest robot configuration +# +wget --user=$NEXUS_USERNAME --password=$NEXUS_PASSWD --no-check-certificate -O /opt/eteshare/config/robot_properties_ete.py $NEXUS_REPO/org.openecomp.boot/robot_properties_ete.py +wget --user=$NEXUS_USERNAME --password=$NEXUS_PASSWD --no-check-certificate -O /opt/eteshare/config/robot_preload_parameters.py $NEXUS_REPO/org.openecomp.boot/robot_preload_parameters.py +wget --user=$NEXUS_USERNAME --password=$NEXUS_PASSWD --no-check-certificate -O /opt/eteshare/config/vm_config2robot.sh $NEXUS_REPO/org.openecomp.boot/vm_config2robot.sh +/bin/bash /opt/eteshare/config/vm_config2robot.sh + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/openecompete +docker rm -f openecompete_container +docker run -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $NEXUS_DOCKER_REPO/openecompete diff --git a/boot/sdnc_serv.sh b/boot/sdnc_serv.sh new file mode 100644 index 00000000..58f03f1c --- /dev/null +++ b/boot/sdnc_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./sdnc_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/sdnc_vm_init.sh b/boot/sdnc_vm_init.sh new file mode 100644 index 00000000..a642a530 --- /dev/null +++ b/boot/sdnc_vm_init.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) + +cd /opt/sdnc +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +/opt/docker/docker-compose up -d diff --git a/boot/vid_serv.sh b/boot/vid_serv.sh new file mode 100644 index 00000000..445196c3 --- /dev/null +++ b/boot/vid_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./vid_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/vid_vm_init.sh b/boot/vid_vm_init.sh new file mode 100644 index 00000000..fa019760 --- /dev/null +++ b/boot/vid_vm_init.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +docker pull $NEXUS_DOCKER_REPO/ecomp/vid:1.0.0 + +docker rm -f vid-mariadb +docker rm -f vid-server + +docker run --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -e MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY -v /opt/vid-my.cnf:/etc/mysql/my.cnf -v /opt/vid-pre-init.sql:/docker-entrypoint-initdb.d/vid-pre-init.sql -v /var/lib/mysql -d mariadb:10 + +docker run -e VID_MYSQL_DBNAME=vid_openecomp -e VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d $NEXUS_DOCKER_REPO/ecomp/vid:1.0.0 diff --git a/deploy_scripts/.DS_Store b/deploy_scripts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0j5F4K)k~ffAO-$Q z1;q2g!XmJxF;^%b9q42VfLO+6X;{ZRKyoaNEseQCNyRZ$_P{ii=@f%0I`&&49I>S_ zSE%T~6djnJnduCL$=Q)-$#7sTh2%*AQeasDvG!LmXHOu2_;mix`(DI7>=ifEXDsi2 zNW)qo!<(jwW_d;dW)fBNkC ziH1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0KgYBz;$nz%G7hZVULH9{_NTY5lsofNRz5EEO8t)!S;d*Y0`-m!Mq z3279`2Tt6$apA&mP8>LLL?8}GT;YKD6KIb;!JCLf#fC&I8yaXC2usfiM=i*AVk#OWRB0+nA9cTcDHrP;4XzKyZfM!55pc&8% zXa@cZ3}DU{Ej6xC_nHCCfM#Hy0TCZeyaeV$>?xF?13Os)Adca%Y$#(LAZ^SL^C9*W zN>iLuRSzUIC1Hs{lsP^(g*swB#GXQB4n&y)3Exb@3WdnGqn#<$f#enHUNfK>NHQR5 zcLO%DYIlJS)bAZ|pbITv;1(U;upMqoU4YjR&;2QzobXV4d)x1X_V?|M!~7td{gsT2 zjy?7Cu~ho_xcC?o$8VK4`F1(5g05e%yft~pn$!;Ek`-+Bt!|HDr*Ltbt6;q=oXrmESIh@pV`b|!A>eIK6T^F?(SUn zm05Exm))B+cQ0Sg&YHQoOM839d#Tjf7cX90tabL@|M-(nKl}WPFTeXkx|sV7jZ`#mQnW_EWo0) zX+tw+Ar5+ej#!Ms3Tl=Iwcsbzin=+}8d_&wyn+tAaOLGAa%Mk65{Qzn$$=~e5iGCu-+=N2RF~2;KW6)kZ=5ZW@M6t$J zm<`A`{cP~NVMOx5iD#ZYX-u4&oS2%(WHP6p%bb~>K3g{?ZL4v+<%vi>&mHa+oGx8! zd8}FPSPka3ssVjBD6>1XZk&p#F4N}Q4~8l`9n_h6Fd(OU-J{f%^DS*`_%x_S4R-2~NGx<_Dn1b_| z1r{+N-G)2x0el2s!ME@u{04u(eR7OUlNZQ&k|VE@tKWFZ+Khjtyw%|h-{?#S|sq~ic86TwQR>Nu6d9FqP4 zDu*fXBmze*8j6N6@O*tlfkymY|@YZ`L%vg}w0c(jbQWHvU9z*r%+6GjO5(9?cK zyRG{lWBU*LDZA}GNhu9!j~(lHPdt53Pwz?gCnH&mG2Sbp7Go}B%mGEL)SC6BVvSljC1x0N1X@6oZvxW2|qj-|ujo$SiL*fAPvjb+h)wsc&s# zad)=P{E?dZd5{-bFPOa7Eg8k3wFf~yTH0@wN^a~RJeKin=`3J&|do zW<6D;QFiK^@lIrvkB08k!6cqS>L5ttW0}cNCNlr%)UgcR{rSAzZ8b!z`(n`$^G>JP z5C<<07Yp~oah^SIzdCw1UVOT|`uyeV^|$Xo%t~