diff options
167 files changed, 4035 insertions, 7775 deletions
diff --git a/bootstrap/vagrant-onap/CONTRIBUTING.md b/bootstrap/vagrant-onap/CONTRIBUTING.md deleted file mode 100644 index 7341a10db..000000000 --- a/bootstrap/vagrant-onap/CONTRIBUTING.md +++ /dev/null @@ -1,30 +0,0 @@ -First off, thank you for considering contributing to ONAP on Vagrant project. -It's people like you that make it such a great tool. - -ONAP on Vagrant is an open source project and we love to receive contributions -from our community — you! There are many ways to contribute, from writing -tutorials or blog posts, improving the documentation, submitting bug reports and -feature requests or writing code which can be incorporated into ONAP on Vagrant -itself. - -Unit Testing -============ - -The **_tests_** folder contains ~~scripts~~ _test suites_ that ensure the proper -implementation of the _functions_ created on **_lib_** folder. In order to -display the Usage information you must execute the script with question mark as -an argument like follows: - - $ ./tools/run.sh - -or using PowerShell - - PS C:\> Set-ExecutionPolicy Bypass -Scope CurrentUser - PS C:\> .\tools\Run.ps1 testing -? - -Examples --------- - - $ ./tools/run.sh -y testing # Executes all the Unit Tests unattended mode - $ ./tools/run.sh -s functions testing # Executes all the Unit Tests of Functions Test Suite - $ ./tools/run.sh -s functions -c install_maven testing # Executes the install_maven Unit Test of Functions Test Suite diff --git a/bootstrap/vagrant-onap/LICENSE b/bootstrap/vagrant-onap/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/bootstrap/vagrant-onap/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - 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. diff --git a/bootstrap/vagrant-onap/README.md b/bootstrap/vagrant-onap/README.md index 1afe53361..8a8d1bd9b 100644 --- a/bootstrap/vagrant-onap/README.md +++ b/bootstrap/vagrant-onap/README.md @@ -1,92 +1,4 @@ -# ONAP on Vagrant +# Deprecated -This vagrant project pretends to collect information about a way to deploy -and build [ONAP project](https://www.onap.org/) into a development environment. +ONAP on Vagrant tool's code has been migrated to [Devtool repo](https://git.onap.org/integration/devtool/) -### Problem Being Solved - -* Reduce the barrier of entry to allow new ONAP developers to ramp up on to -active development quickly -* Reduce the cost to the community in responding to simple environment setup -questions faced by new developers - ---- - -| Component | Requirement | -|------------------|---------------------------------------| -| Vagrant | >= 1.8.6 | -| Provider | VirtualBox, Libvirt or OpenStack | -| Operating System | Linux, Mac OS or Windows | -| Hard Disk | > 8 GB of free disk | -| Memory | > 12 GB | - ---- - -## Execution: - -#### deploying a single application - -* Windows - - PS C:\> cd integration\bootstrap\vagrant-onap - PS C:\integration\bootstrap\vagrant-onap> Set-ExecutionPolicy Bypass -Scope CurrentUser - PS C:\integration\bootstrap\vagrant-onap> .\tools\Run.ps1 <app_name> - -* Linux or Mac OS - - $ cd integration/bootstrap/vagrant-onap - $ ./tools/run.sh <app_name> - -current options include: - -| app_name | description | -|:----------:|-------------------------------------| -| aai | Active and Available Inventory | -| appc | Application Controller | -| ccsdk | Common Controller SDK | -| dcae | Data Collection Analytics & Events | -| mr | Message Router | -| mso | Master Service Orchestrator | -| msb | Microservices Bus Project | -| multicloud | Multi Cloud | -| oom | ONAP Operations Manager | -| policy | Policy | -| portal | Portal | -| robot | Robot | -| sdc | Service Design & Creation | -| sdnc | Software Defined Network Controller | -| vfc | Virtual Function Controller | -| vid | Virtual Infrastructure Development | -| vnfsdk | VNF SDK | -| vvp | VNF Validation Program | - -| app_name | description | -|:----------:|------------------------------------------| -| all_in_one | All ONAP services in a VM (experimental) | -| testing | Unit Test VM | - -| app_name | description | -|:----------:|----------------------| -| openstack | OpenStack Deployment | - -#### Generating documentation - -The documentation of this project was written in reStructuredText -format which is located under the [docs folder](../blob/master/doc/source/index.rst). -It's possible to format these documents to HTML using Sphinix python -tool. - - $ tox -e docs - -This results in the creation of a new *doc/build/html* folder with -the documentation converted in HTML pages that can be viewed through -the preferred Web Browser. - -## Contributing - -Bug reports and patches are most welcome. -See the [contribution guidelines](CONTRIBUTING.md). - -## License - -Apache-2.0 diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile deleted file mode 100644 index 4b10392fd..000000000 --- a/bootstrap/vagrant-onap/Vagrantfile +++ /dev/null @@ -1,528 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') - -configuration = { - # Generic parameters used across all ONAP components - 'key_name' => 'ecomp_key', - 'pub_key' => '', - 'nexus_repo' => 'https://nexus.onap.org/content/sites/raw', - 'nexus_repo_root' => 'https://nexus.onap.org', - 'nexus_url_snapshot' => 'https://nexus.onap.org/content/repositories/snapshots', - 'nexus_docker_repo' => 'nexus3.onap.org:10001', - 'nexus_username' => 'docker', - 'nexus_password' => 'docker', - 'dmaap_topic' => 'AUTO', - 'artifacts_version' => '1.0.0', - 'docker_version' => 'latest', - # Parameters for DCAE instantiation - 'dcae_zone' => 'iad4', - 'dcae_state' => 'vi', - 'openstack_tenant_id' => '', - 'openstack_username' => '', - 'openstack_api_key' => '', - 'openstack_password' => '', - 'odl_version' => '0.5.3-Boron-SR3', - # Parameters for enabling features - 'debug' => 'True', - 'build_image' => 'True', - 'clone_repo' => 'True', - 'compile_repo' => 'False', - 'enable_oparent' => 'True', - 'skip_get_images' => 'False', - 'skip_install' => 'True' -} - -box = { - :virtualbox => 'ubuntu/trusty64', - :libvirt => 'elastic/ubuntu-14.04-x86_64', - :openstack => nil -} - -nodes = [ - { - :name => "aai", - :ips => ['10.252.0.6', "192.168.50.6"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 8 * 1024, - :groups => ["individual"], - :args => ["aai"], - :fwds => [ - { :guest => 8446, :host => 8446, :guest_ip => '192.168.50.6' }, - { :guest => 9446, :host => 9446, :guest_ip => '192.168.50.6' }, - ] - }, - { - :name => "all-in-one", - :ips => ['10.252.1.3', "192.168.51.3"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 12 * 1024, - :groups => ["all-in-one"], - :flavor => 'm1.xlarge', - :args => ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk', 'multicloud', 'vnfsdk', 'vpp', 'msb'], - }, - { - :name => "appc", - :ips => ['10.252.0.14', "192.168.50.14"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["appc"], - }, - { - :name => "ccsdk", - :ips => ['10.252.0.19', "192.168.50.19"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["ccsdk"], - }, - { - :name => "dcae", - :ips => ['10.252.0.12', "192.168.50.12"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["dcae"], - }, - { - :name => "dns", - :ips => ['10.252.0.3', "192.168.50.3"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 1 * 1024, - :groups => ["individual"], - :flavor => 'm1.small', - :args => [" "] - }, - { - :name => "message-router", - :ips => ['10.252.0.4', "192.168.50.4"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["mr"], - }, - { - :name => "mso", - :ips => ['10.252.0.20', "192.168.50.20"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["mso"], - }, - { - :name => "msb", - :ips => ['10.252.0.7', "192.168.50.7"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["msb"], - }, - { - :name => "multicloud", - :ips => ['10.252.0.16', "192.168.50.16"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["multicloud"], - :fwds => [ - { :guest => 9003, :host => 9003, :guest_ip => '192.168.50.16' }, - ] - }, - { - :name => "oom", - :ips => ['10.252.0.21', "192.168.50.21"], - :macs => [], - :cpus => 16, - :cpu => "50", - :ram => 64 * 1024, - :groups => ["individual"], - :args => ["oom"], - :hd => { :virtualbox => "61440", :libvirt => "60G", }, - :fwds => [ - { :guest => 8880, :host => 8880, :guest_ip => '192.168.50.21' }, - { :guest => 8989, :host => 8989, :guest_ip => '192.168.50.21' }, - ] - }, - { - :name => "policy", - :ips => ['10.252.0.13', "192.168.50.13"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["policy"], - }, - { - :name => "portal", - :ips => ['10.252.0.11', "192.168.50.11"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["portal"], - }, - { - :name => "robot", - :ips => ['10.252.0.8', "192.168.50.8"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["robot"], - }, - { - :name => "sdc", - :ips => ['10.252.0.5', "192.168.50.5"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 6 * 1024, - :groups => ["individual"], - :args => ["sdc"], - :hd => { :virtualbox => "20480", :libvirt => "20G", }, - :fwds => [ - { :guest => 8285, :host => 8285, :guest_ip => '192.168.50.5' }, - ] - }, - { - :name => "sdnc", - :ips => ['10.252.0.10', "192.168.50.10"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ["sdnc"], - }, - { - :name => "testing", - :ips => ['10.252.2.3', "192.168.52.3"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["testing"], - :flavor => 'm1.small', - :args => [""], - }, - { - :name => "vfc", - :ips => ['10.252.0.15', "192.168.50.15"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ['vfc'], - }, - { - :name => "vid", - :ips => ['10.252.0.9', "192.168.50.9"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ['vid'], - }, - { - :name => "vnfsdk", - :ips => ['10.252.0.18', "192.168.50.18"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ['vnfsdk'], - }, - { - :name => "vvp", - :ips => ['10.252.0.17', "192.168.50.17"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 4 * 1024, - :groups => ["individual"], - :args => ['vvp'], - }, - { - :name => "openstack", - :ips => ['10.252.3.3', "192.168.53.3"], - :macs => [], - :cpus => 2, - :cpu => "50", - :ram => 8 * 1024, - :groups => ["individual"], - :args => ['openstack'], - :fwds => [ - { :guest => 80, :host => 8888, :guest_ip => '192.168.53.4' }, - { :guest => 6080, :host => 6080, :guest_ip => '192.168.53.4' }, - ] - } -] - -run_path = 'vagrant_utils/postinstall.sh' -sdc_volume = 'vol1-sdc-data.vdi' - -Vagrant.require_version ">= 1.8.6" - -# Determine the provider used -provider = (ENV['VAGRANT_DEFAULT_PROVIDER'] || :virtualbox).to_sym -puts "[INFO] Provider: #{provider} " - -vd_conf = ENV.fetch('VD_CONF', 'etc/settings.yaml') -if File.exist?(vd_conf) - require 'yaml' - user_conf = YAML.load_file(vd_conf) - configuration.update(user_conf) -end - -# Set network interface -net_interface = 'vboxnet0' -is_windows = Gem.win_platform? -if is_windows - net_interface = 'VirtualBox Host-Only Ethernet Adapter #2' -end -puts "[INFO] Net interface: #{net_interface}" - - -# If argument is given use it. Otherwise use Env: DEPLOY_MODE else use default -requested_machine = ARGV[1] - -deploy_mode = ENV.fetch('DEPLOY_MODE', 'individual') -if requested_machine != nil - if requested_machine.include?("all-in-one") || requested_machine.include?("testing") - deploy_mode = requested_machine - end -end - -# Catch the status of all machines -if ARGV[0] == 'status' || ARGV[0] == 'destroy' - deploy_mode = 'NA' -end - -puts "[INFO] Deploy Mode: #{deploy_mode}" - -# In case of all-in-one or testing clean the nodes list -case deploy_mode - when 'all-in-one' - nodes.select! do |node| - if node[:name].include?("all-in-one") - true if node[:name] - end - end - - when 'individual' - nodes.select! do |node| - if node[:groups][0].include?("individual") - true if node[:name] - end - end - - when 'testing' - nodes.select! do |node| - if node[:name].include?("testing") - true if node[:name] - end - end -end - -Vagrant.configure("2") do |config| - - # PROXY definitions - if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil - if not Vagrant.has_plugin?('vagrant-proxyconf') - system 'vagrant plugin install vagrant-proxyconf' - raise 'vagrant-proxyconf was installed but it requires to execute again' - end - config.proxy.enabled = { docker: false } - config.proxy.http = ENV['http_proxy'] - config.proxy.https = ENV['https_proxy'] - configuration['socks_proxy'] = ENV['socks_proxy'] - end - - if Vagrant.has_plugin?('vagrant-vbguest') - puts 'vagrant-vbguest auto_update feature will be disable to avoid sharing conflicts' - config.vbguest.auto_update = false - end - - sync_type = "virtualbox" - if provider == :libvirt - if not Vagrant.has_plugin?('vagrant-libvirt') - system 'vagrant plugin install vagrant-libvirt' - raise 'vagrant-libvirt was installed but it requires to execute again' - end - sync_type = "nfs" - end - - if provider == :openstack - config.ssh.username = 'ubuntu' - if not Vagrant.has_plugin?('vagrant-openstack-provider') - system 'vagrant plugin install vagrant-openstack-provider' - raise 'vagrant-openstack-provider was installed but it requires to execute again' - end - end - - nodes.each do |node| - config.vm.define node[:name] do |nodeconfig| - - # NO_PROXY definitions - if ENV['no_proxy'] != nil - if not Vagrant.has_plugin?('vagrant-proxyconf') - system 'vagrant plugin install vagrant-proxyconf' - raise 'vagrant-proxyconf was installed but it requires to execute again' - end - config.proxy.no_proxy = node[:ips].join(",") + "," + ENV['no_proxy'] - end - - # Common Settings: - - nodeconfig.vm.provider "virtualbox" do |vbox| - vbox.customize ['modifyvm', :id, '--nictype1', 'virtio'] - vbox.customize ['modifyvm', :id, '--audio', 'none'] - vbox.customize ['modifyvm', :id, '--vram', '1'] - vbox.customize ['modifyvm', :id, "--cpuhotplug", "off"] - vbox.customize ['modifyvm', :id, "--cpuexecutioncap", node[:cpu]] - vbox.customize ['modifyvm', :id, "--cpus", node[:cpus]] - vbox.customize ["modifyvm", :id, "--memory", node[:ram]] - - # Set Network - nodeconfig.vm.network :private_network, - :adapter => 2, - :name => net_interface, - :ip => node[:ips][0] - - nodeconfig.vm.network :private_network, - :adapter => 3, - :ip => node[:ips][1], - :type => :static - - # Set Storage - if node.has_key? :hd - volume_file = node[:name] + '-vol1-data.vdi' - unless File.exist?(volume_file) - vbox.customize ['createmedium', 'disk', '--filename', volume_file, '--size', node[:hd][provider]] - end - vbox.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', volume_file] - end - end - - nodeconfig.vm.provider "libvirt" do |lbox| - lbox.memory = node[:ram] - lbox.nested = true - lbox.cpu_mode = 'host-passthrough' - lbox.cpus = node[:cpus] - - # Set Network - nodeconfig.vm.network :private_network, - :ip => node[:ips][0] - - nodeconfig.vm.network :private_network, - :ip => node[:ips][1], - :type => :static - - # Set Storage - if node.has_key? :hd - lbox.storage :file, bus: 'sata', device: 'sda', size: node[:hd][provider] - end - end - if node.has_key? :fwds - node[:fwds].each do |fwd| - nodeconfig.vm.network :forwarded_port, - :guest => fwd[:guest], - :guest_ip => fwd[:guest_ip], - :host => fwd[:host], - :host_ip => "0.0.0.0" - end - end - - nodeconfig.vm.provider :openstack do |obox| - obox.openstack_auth_url = ENV.fetch('OS_AUTH_URL', '') - obox.tenant_name = ENV.fetch('OS_TENANT_NAME', '') - obox.username = ENV.fetch('OS_USERNAME', '') - obox.password = ENV.fetch('OS_PASSWORD', '') - obox.region = ENV.fetch('OS_REGION_NAME', '') - obox.identity_api_version = ENV.fetch('OS_IDENTITY_API_VERSION', '') - obox.domain_name = ENV.fetch('OS_PROJECT_DOMAIN_ID', '') - obox.project_name = ENV.fetch('OS_PROJECT_NAME', '') - obox.floating_ip_pool = ENV.fetch('OS_FLOATING_IP_POOL', '') - obox.floating_ip_pool_always_allocate = (ENV['OS_FLOATING_IP_ALWAYS_ALLOCATE'] == 'true') - obox.image = ENV.fetch('OS_IMAGE', '') - obox.security_groups = [ENV.fetch('OS_SEC_GROUP', '')] - obox.networks = ENV.fetch('OS_NETWORK', '') - obox.flavor = node[:flavor] - obox.server_name = node[:name] - end - - # Set Box type - if "openstack" == node[:name] - box = { - :virtualbox => 'ubuntu/xenial64', - :libvirt => 'elastic/ubuntu-16.04-x86_64' - } - end - nodeconfig.vm.box = box[provider] - - # Set Node name - nodeconfig.vm.hostname = node[:name] - - # Set Sync Folder - nodeconfig.vm.synced_folder ".", "/vagrant", disabled: true - nodeconfig.vm.synced_folder './opt', '/opt/onap/', create: true, type: sync_type - nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true, type: sync_type - if !is_windows - nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true - end - - # Specific settings: - - if node[:name].include? "testing" - nodeconfig.vm.synced_folder './tests', '/var/onap_tests/', create: true - test_suite = ENV.fetch('TEST_SUITE', '*') - test_case = ENV.fetch('TEST_CASE', '*') - # Override variables - run_path = 'vagrant_utils/unit_testing.sh' - node[:args] = [test_suite, test_case] - else - configuration['skip_get_images'] = ENV.fetch('SKIP_GET_IMAGES', configuration['skip_get_images']) - configuration['skip_install'] = ENV.fetch('SKIP_INSTALL', configuration['skip_install']) - end - - if node[:name].include? "vfc" - nodeconfig.vm.provision 'docker' - end - - nodeconfig.vm.provision 'shell' do |s| - s.path = run_path - s.args = node[:args] - s.env = configuration - end - - end #nodeconfig - end #node -end #config diff --git a/bootstrap/vagrant-onap/doc/source/conf.py b/bootstrap/vagrant-onap/doc/source/conf.py deleted file mode 100644 index 906f249d4..000000000 --- a/bootstrap/vagrant-onap/doc/source/conf.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -# 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. - -import os -import sys - -BASE_DIR = os.path.dirname(os.path.abspath(__file__)) -ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", "..")) - -sys.path.insert(0, ROOT) -sys.path.insert(0, BASE_DIR) - -# -- General configuration ---------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = [ - 'sphinx.ext.autodoc', - #'sphinx.ext.intersphinx' -] - -# The suffix of source filenames. -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'ONAP on Vagrant' diff --git a/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst b/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst deleted file mode 100644 index df08605ac..000000000 --- a/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst +++ /dev/null @@ -1,72 +0,0 @@ -======================= -Modify execution values -======================= - -In order to provide a flexible platform that adjusts to different developer -needs, there are two mechanisms to configure the execution of this project. - -Settings configuration file ---------------------------- - -The first mechanism refers to the process to replace default configuration -values in the settings configuration file. This file needs to be placed into -the *./etc* folder and named *settings.yaml*. It must contain the key/pair -configuration values that will be overriden. - -.. note:: - - There are sample files (e. g. settings.yaml.development and - settings.yaml.testing) placed into the *./etc* folder. Their purpose is to - provide a reference of different configurations. - -.. end - -Configuration values: - -+------------------+-------------------+---------------------------------------+ -| Key | Values | Description | -+==================+===================+=======================================+ -| build_image | "True" or "False" | Determines if the Docker image is | -| | | retrieved from public hub or built | -| | | from source code. | -+------------------+-------------------+---------------------------------------+ -| clone_repo | "True" or "False" | Determines if all the source code | -| | | repositories of a given component are | -| | | cloned locally. | -+------------------+-------------------+---------------------------------------+ -| compile_repo | "True" or "False" | Determines if all the source code | -| | | repositories of a given component are | -| | | going to be compiled. | -+------------------+-------------------+---------------------------------------+ -| enable_oparent | "True" or "False" | Determines if the OParent project | -| | | will be used during the maven | -| | | compilation. | -+------------------+-------------------+---------------------------------------+ -| skip_get_images | "True" or "False" | Determines if the process to build or | -| | | retrieve docker images of a given | -| | | component are going to skipped. | -+------------------+-------------------+---------------------------------------+ -| skip_install | "True" or "False" | Determines if the process to start | -| | | the services of a given component | -| | | will be started. | -+------------------+-------------------+---------------------------------------+ - -Parameters ----------- - -The **skip_get_images** and **skip_install** are the only two configuration -values that can be overriden using *-g* and *-i* respectively by the run scripts -(*./tools/run.sh* and *.\\tools\\Run.ps1*). - -.. note:: - - The script parameters take precendence of the configuration file. - -.. end - -.. code-block:: console - - $ ./tools/run.sh sdc -g - -.. end - diff --git a/bootstrap/vagrant-onap/doc/source/features/consuming_scripts.rst b/bootstrap/vagrant-onap/doc/source/features/consuming_scripts.rst deleted file mode 100644 index dd4f14ba7..000000000 --- a/bootstrap/vagrant-onap/doc/source/features/consuming_scripts.rst +++ /dev/null @@ -1,91 +0,0 @@ -============================== -Using the provisioning scripts -============================== - -Vagrant is a platform that uses prebaked images called -*vagrant boxes* to guarranty that running multiple times a -provisioning script will result in an expected output. This -mechanism is crucial for reducing the number of external factors -during the creation, development and testing of provisioning scripts. -However, it's possible to provide an ONAP development enviroment -without having to install Vagrant tool. This document explains how to -consume the provisioning scripts localed in **./lib** folder to -provision a development environment and the environment variables -that modifies their behavior. - -This project was built on an Ubuntu 14.04 ("Trusty") Operating System, -therefore it's necessary to have an user who has *sudo* permissions to -access to a Bare Metal or Virtual Machine. - -The following instructions retrieve the provisioning scripts and place -them into the */var/onap/* folder. - -.. code-block:: console - - $ sudo su - - # apt-get install git -y - # git clone https://git.onap.org/integration - # mv integration/bootstrap/vagrant-onap/lib/ /var/onap/ - -.. end - -Loading a provisioning script will be based on the desired ONAP -service, for example to setup the development environment for Active -and Available Inventory (AAI) service will be required to load the -*/var/onap/aai* script. - -.. note:: - - The **git_src_folder** environment variable specifies the - source code destination folder, it's default value is */opt/* - but it can be changed only after is loaded the provisioning - scripts. - -.. end - -.. code-block:: console - - # source /var/onap/aai - -.. end - -Lastly, every script has defined a initialization function with -*init_* as prefix. This function is the starting point to provision -the chosen ONAP service. This example uses the *init_aai* function -to provision a AAI Developement environment. - -.. note:: - - The **compile_repo** environment variable defines whether or not - the source code located on the repositories of the service. - Enabling this value can impact the provisioning time of the - service. - -.. end -.. note:: - - **nexus_docker_repo**, **nexus_username** and **nexus_password** - environment variables specify the connectivity to a private Docker - Hub. - -.. end -.. note:: - - **build_image** environment variable allows the Docker images - from source code. Enabling this value can impact the - provisioning time of the service. - -.. end - -.. code-block:: console - - # export nexus_docker_repo="nexus3.onap.org:10001" - # export nexus_username="docker" - # export nexus_password="docker" - # init_aai - -.. end - -As result, the source code is pulled into */opt/aai/* folder and the -AAI services are up and running with the proper connection to the -Titan Distributed Graph Database. diff --git a/bootstrap/vagrant-onap/doc/source/features/example_usage.rst b/bootstrap/vagrant-onap/doc/source/features/example_usage.rst deleted file mode 100644 index 293c543fa..000000000 --- a/bootstrap/vagrant-onap/doc/source/features/example_usage.rst +++ /dev/null @@ -1,151 +0,0 @@ -================================================= -Example usage to bring up a developer environment -================================================= - -In the example, we will bring up a single ONAP component using the Vagrant ONAP -tool. - -There are multiple scenarios in which this tool can be made use of by a -developer, they usually fall in the following use cases. - -Use case 1: Use Vagrant ONAP to just clone project related source code ----------------------------------------------------------------------- - -In this use case, the developer needs just the source code of the project to work on. - -Since the Vagrant ONAP project supports building docker containers and compiling -source files, we need to first edit the settings.yaml file to add key value pairs -indicating we need to only clone repo and not build docker image or compile then. -By default, Vagrant ONAP clones repo, but to not run the build process and cloning -docker images, the following are required to be added in the settings file. - -.. code-block:: console - - skip_get_images: "True" - -.. end - -The reason this is done is because as mentioned in the -`configure execution docs. <https://git.onap.org/integration/tree/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst>`, -the default values taken are: - -.. code-block:: console - - 'build_image' => 'True', - 'clone_repo' => 'True', - 'compile_repo' => 'False', - 'enable_oparent' => 'True', - 'skip_get_images' => 'False', - 'skip_install' => 'True' - -.. end - -We override them and skip_get_images is given precedence over build_image. - -Use case 2: Use Vagrant ONAP to clone project related source code and clone Docker Images ------------------------------------------------------------------------------------------ - -In this use case, the developer needs to clone docker images of the project to work on. - -For this case, we will edit the settings.yaml file to add key value pairs indicating we -need to clone repo and clone docker image from Nexus. - -.. code-block:: console - - build_images: "False" - compile_repo: "True" - skip_get_images: "False" - skip_install: "True" - -.. end - -Use case 3: Use Vagrant ONAP to clone project related source code and build Docker Images locally -------------------------------------------------------------------------------------------------- - -In this use case, the developer needs to build docker images of the project to work on. - -For this case, we will edit the settings.yaml file to add key value pairs indicating we need to -clone repo and build docker image locally and not fetch them from Nexus. - -.. code-block:: console - - build_images: "True" - compile_repo: "True" - skip_get_images: "False" - skip_install: "True" - -.. end - -Use case 4: Use Vagrant ONAP to clone project related source code and build Docker Images and start services ------------------------------------------------------------------------------------------------------------- - -In this use case, the developer needs to build docker images of the project he or -she wanted to work on and start the services running inside them. - -For this case, we will edit the settings.yaml file to add key value pairs indicating -we need to clone repo, compile repo, build docker image and run the image. - -.. code-block:: console - - build_images: "True" - compile_repo: "True" - skip_get_images: "False" - skip_install: "False" - -.. end - -Once the required changes to the settings file is added, we can use the run.sh -script in tools directory to setup the development environment. - -Example steps for setting up a development environment for VFC project. ------------------------------------------------------------------------ - -In this example we will be using vagrant ONAP to get all the source code of VFC -project and the developer can point the IDE to the cloned repo in the ./opt directory -and start the development process. - -.. code-block:: console - - $ ./tools/run.sh vfc - -.. end - -At the end of the setup process, all the VFC related source code will be present -in the vagrant-onap/opt/ directory. The developer can point an IDE to this directory -and start contributing. When the changes are done, the developer can SSH into the VM -running VFC and tests can be executed by running Maven for Java and Tox for Python -from the ~/opt/vfc directory. - -.. code-block:: console - - $ vagrant ssh vfc - $ cd ~/opt/vfc/<vfc-subrepo> - $ tox -e py27 - -.. end - -This way the tool helps the developer to clone repos of a particular project, -without having to manually search for repos and setup an environment. - -Also, if something gets messed up in the VM, the developer can tear down the VM -and spin a fresh one without having to lose the changes made to the source code since -the ./opt files are in sync from the host to the VM. - -.. code-block:: console - - $ vagrant destroy vfc - -.. end - -Testing -------- - -Use the run.sh script to test if the provisioning scripts run without errors. - -And example test to check the number of covered repositories with this tool. - -.. code-block:: console - - $ ./tools/run.sh testing -y -c coverity_repos -s functions - -.. end
\ No newline at end of file diff --git a/bootstrap/vagrant-onap/doc/source/features/features.rst b/bootstrap/vagrant-onap/doc/source/features/features.rst deleted file mode 100644 index 2f88c52e7..000000000 --- a/bootstrap/vagrant-onap/doc/source/features/features.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. _features: - -================= -Advanced features -================= - -.. toctree:: - :maxdepth: 1 - - openstack.rst - consuming_scripts.rst - configure_execution.rst - example_usage.rst - -This chapter explains how to use ONAP on Vagrant Advanced features -like different providers. diff --git a/bootstrap/vagrant-onap/doc/source/features/openstack.rst b/bootstrap/vagrant-onap/doc/source/features/openstack.rst deleted file mode 100644 index f44bc62f9..000000000 --- a/bootstrap/vagrant-onap/doc/source/features/openstack.rst +++ /dev/null @@ -1,89 +0,0 @@ -================== -OpenStack Provider -================== - -It's possible to use Vagrant to provision VMs on OpenStack using the -`Vagrant OpenStack Cloud Provider <https://github.com/ggiamarchi/vagrant-openstack-provider/>`. -The only requirement for the Cloud provider is to have an Ubuntu Cloud -image accesible to your tenant and a Security Rule that allows to do -SSH into the instance. - -Environment variables ---------------------- - -The usage of environment variables in OpenStack command-line clients -is to avoid repeating some values. These variables have *OS_* as -prefix. This provider will use them for authentication to Keystone -service. - -.. code-block:: console - - export OS_AUTH_URL=http://<keystone_ip>:5000/v3 - export OS_TENANT_NAME=<project_or_tenant_name> - export OS_PROJECT_NAME=<project_or_tenant_name> - export OS_USERNAME=<openstack_username> - export OS_PASSWORD=<openstack_password> - export OS_REGION_NAME=<openstack_region_name> - export OS_IDENTITY_API_VERSION=<keystone_version_number> - export OS_PROJECT_DOMAIN_ID=<openstack_domain_name> - -.. end - -OpenStack Vagrant provider needs additional information about the -name of the image to be used and the networking where the instance -will be provisioned. That information can be passed using the -following variables - -.. code-block:: console - - export OS_IMAGE=<ubuntu_cloud_image_name> - export OS_NETWORK=<neutron_private_network> - export OS_FLOATING_IP_POOL=<neutron_floating_ip_pool> - export OS_SEC_GROUP=<onap-ssh-secgroup> - -.. end - -Tenant setup ------------- - -The *tools/setup_openstack.sh* script can be useful to get an idea -of the process to setup the OpenStack environment with the necessary -requirements. This script depends on the Environment Variables -explained previously. - ----- - -Devstack --------- - -It's possible to use this plugin to provision instances on -`Devstack <https://docs.openstack.org/devstack/latest/>`. This is -an example of the *local.conf* file that can be used as input -for Devstack - -.. path local.conf -.. code-block:: ini - - [[local|localrc]] - ADMIN_PASSWORD=<password> - DATABASE_PASSWORD=<password> - RABBIT_PASSWORD=<password> - SERVICE_PASSWORD=<password> - SERVICE_TOKEN=<token> - - # Used to only upload the Ubuntu Cloud Image - DOWNLOAD_DEFAULT_IMAGES=False - IMAGE_URLS+="http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img" - - # (Optional) These values helps to improve the experience deploying and using Devstack - GIT_BASE=https://git.openstack.org - FORCE_CONFIG_DRIVE="True" - disable_service tempest - -.. end - -.. note:: - - There is a validation that checks if the - *vagrant-openstack-provider* plugin is installed raising an error - for those cases when it isn't. diff --git a/bootstrap/vagrant-onap/doc/source/index.rst b/bootstrap/vagrant-onap/doc/source/index.rst deleted file mode 100644 index af5777ccd..000000000 --- a/bootstrap/vagrant-onap/doc/source/index.rst +++ /dev/null @@ -1,23 +0,0 @@ -ONAP on Vagrant tool -==================== - -This project collects instructions to setup a development environment -using different providers like VirtualBox, Libvirt or OpenStack. - -.. seealso:: - - You may want to read the `Bootstrap documentation`__ to get an idea of the - concepts. - - __ https://wiki.onap.org/display/DW/ONAP+on+Vagrant - -Table of contents ------------------ - -.. toctree:: - :maxdepth: 2 - - Installation Guide <install/index> - Known Issues <install/known_issues> - Advanced Features <features/features> - diff --git a/bootstrap/vagrant-onap/doc/source/install/index.rst b/bootstrap/vagrant-onap/doc/source/install/index.rst deleted file mode 100644 index 62f57e66f..000000000 --- a/bootstrap/vagrant-onap/doc/source/install/index.rst +++ /dev/null @@ -1,102 +0,0 @@ -================== -Installation Guide -================== - -This project collects instructions related to the automatic creation -of a development environment. However, this requires only two -components previous to its execution. These are an automation -building tool (Vagrant) and a provider platform (VirtualBox, Libvirt -and OpenStack). This section explains how to install the most common -set of configuration(Vagrant/VirtualBox) in different Operating -Systems. - -Ubuntu 14.04 ("Trusty") ------------------------ - -.. code-block:: console - - $ wget -q https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb - $ sudo dpkg -i vagrant_2.0.1_x86_64.deb - - $ echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list - $ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - - $ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - - $ sudo apt-get update -y - $ sudo apt-get install -y virtualbox-5.1 dkms - - $ sudo apt install -y nfs-kernel-server - -.. end - -CentOS ------- - -.. code-block:: console - - $ wget -q https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.rpm - $ sudo yum install vagrant_2.0.1_x86_64.rpm - - $ wget -q http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo -P /etc/yum.repos.d - $ sudo yum --enablerepo=epel install dkms - $ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import - - $ sudo yum install -y VirtualBox-5.1 - - $ sudo yum install -y nfs-utils nfs-utils-lib - -.. end - -Mac OS ------- - -.. code-block:: console - - $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - $ brew cask install vagrant - $ brew cask install virtualbox - -.. end - -Windows 7+ (PowerShell v2+) ---------------------------- - -.. code-block:: console - - PS C:\> Set-ExecutionPolicy AllSigned - PS C:\> iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - PS C:\> choco install vagrant - PS C:\> choco install virtualbox - -.. end - -.. note:: - - Some corporations use Proxy Servers to protect their assets - from security threats. This project uses the Proxy Environment - variables to connect to those servers in order to download the - content required during the setup. The methods to setup these - variables depends on the Operating system that is used. - - * Linux or Mac OS - - .. code-block:: console - - $ export http_proxy=<proxy> - $ export https_proxy=<proxy> - $ export no_proxy=<no_proxy_urls> - - .. end - - * Windows - - .. code-block:: console - - C:\> setx http_proxy <proxy> - C:\> setx https_proxy <proxy> - C:\> setx no_proxy <no_proxy_urls> - - .. end - -.. note:: - - Vagrant can be configured to use a different default provider - through the environment variable **VAGRANT_DEFAULT_PROVIDER**. diff --git a/bootstrap/vagrant-onap/doc/source/install/known_issues.rst b/bootstrap/vagrant-onap/doc/source/install/known_issues.rst deleted file mode 100644 index 8db55e72c..000000000 --- a/bootstrap/vagrant-onap/doc/source/install/known_issues.rst +++ /dev/null @@ -1,63 +0,0 @@ -============ -Known Issues -============ - -Virtualbox guest additions conflict with shared directories ------------------------------------------------------------ - -If the **vagrant-vbguest** plugin is installed on the host, then an -updated version of the Virtualbox guest additions will be installed -on the guest in the /opt directory. Once this projects Vagrantfile -mounts the ./opt directory on the host to the /opt directory on the -guest during the provisioning process, the guest addtions on the -guest are hidden and subsequent mounts of shared directories with the -host will fail. - -The simplest workaround appears to be uninstalling the -*vagrant-vbguest* plugin on the host system. This has been observed -to work on a Windows 10 host using virtualbox 5.1.26. - -Check if vagrant-vbguest plugin is installed - -- Linux or Mac - -.. code-block:: console - - $ vagrant plugin list -.. end - -- Windows - -.. code-block:: console - - C:\> vagrant plugin list -.. end - -Remove vagrant-vbguest plugin - -- Linux or Mac - -.. code-block:: console - - $ vagrant plugin uninstall vagrant-vbguest -.. end - -- Windows - -.. code-block:: console - - C:\> vagrant plugin uninstall vagrant-vbguest -.. end - - -Network configuration in Windows --------------------------------- - -Some Virtual Machines present a problem in their network configuration so to -make sure the install will work as it should install the virtualbox from the -cmd window with the following command: - -.. code-block:: console - - c:\downloads\VirtualBox-5.1.20-114628-Win.exe -msiparams NETWORKTYPE=NDIS5 -.. end diff --git a/bootstrap/vagrant-onap/etc/settings.yaml.development b/bootstrap/vagrant-onap/etc/settings.yaml.development deleted file mode 100644 index 7e1a1ec0b..000000000 --- a/bootstrap/vagrant-onap/etc/settings.yaml.development +++ /dev/null @@ -1,6 +0,0 @@ -build_image: "True" -clone_repo: "True" -compile_repo: "False" -enable_oparent: "True" -skip_get_images: "False" -skip_install: "True" diff --git a/bootstrap/vagrant-onap/etc/settings.yaml.testing b/bootstrap/vagrant-onap/etc/settings.yaml.testing deleted file mode 100644 index 0a81e2d0c..000000000 --- a/bootstrap/vagrant-onap/etc/settings.yaml.testing +++ /dev/null @@ -1,6 +0,0 @@ -build_image: "False" -clone_repo: "False" -compile_repo: "False" -enable_oparent: "False" -skip_get_images: "False" -skip_install: "False" diff --git a/bootstrap/vagrant-onap/lib/_composed_functions b/bootstrap/vagrant-onap/lib/_composed_functions deleted file mode 100755 index 9f2d0a1d8..000000000 --- a/bootstrap/vagrant-onap/lib/_composed_functions +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# build_docker_image() - Build Docker container image from source code -function build_docker_image { - local src_folder=$1 - local profile=$2 - install_maven - install_docker - pushd $src_folder - - # Cleanup external repo - sed -i 's|${docker.push.registry}/||g' pom.xml - local mvn_docker="mvn clean package docker:build" - if [ $profile ]; then - mvn_docker+=" -P $profile" - fi - if [ $http_proxy ]; then - if ! grep -ql "docker.buildArg.http_proxy" pom.xml ; then - mvn_docker+=" -Ddocker.buildArg.http_proxy=$http_proxy" - fi - if ! grep -ql "docker.buildArg.HTTP_PROXY" pom.xml ; then - mvn_docker+=" -Ddocker.buildArg.HTTP_PROXY=$http_proxy" - fi - fi - if [ $https_proxy ]; then - if ! grep -ql "docker.buildArg.https_proxy" pom.xml ; then - mvn_docker+=" -Ddocker.buildArg.https_proxy=$https_proxy" - fi - if ! grep -ql "docker.buildArg.HTTPS_PROXY" pom.xml ; then - mvn_docker+=" -Ddocker.buildArg.HTTPS_PROXY=$https_proxy" - fi - fi - eval $mvn_docker - popd -} diff --git a/bootstrap/vagrant-onap/lib/_onap_functions b/bootstrap/vagrant-onap/lib/_onap_functions deleted file mode 100755 index c65e58958..000000000 --- a/bootstrap/vagrant-onap/lib/_onap_functions +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash - -# create_configuration_files() - Store credentials in files -function create_configuration_files { - local onap_config_folder="/opt/config" - - mkdir -p $onap_config_folder - pushd $onap_config_folder - echo $nexus_docker_repo > nexus_docker_repo.txt - echo $nexus_username > nexus_username.txt - echo $nexus_password > nexus_password.txt - echo $openstack_username > openstack_username.txt - echo $openstack_tenant_id > tenant_id.txt - echo $dmaap_topic > dmaap_topic.txt - echo $docker_version > docker_version.txt - popd -} - -# docker_openecomp_login() - Login to OpenECOMP Docker Hub -function docker_openecomp_login { - install_docker - docker login -u ${nexus_username:-docker} -p ${nexus_password:-docker} ${nexus_docker_repo:-nexus3.onap.org:10001} -} - -# pull_openecomp_image() - Pull Docker container image from a Docker Registry Hub -function pull_openecomp_image { - local image=$1 - local tag=$2 - docker_openecomp_login - pull_docker_image ${nexus_docker_repo:-nexus3.onap.org:10001}/openecomp/${image}:${docker_version:-latest} $tag - docker logout -} - -# pull_onap_image() - Pull Docker container image from a Docker Registry Hub -function pull_onap_image { - local image=$1 - local tag=$2 - docker_openecomp_login - pull_docker_image ${nexus_docker_repo:-nexus3.onap.org:10001}/onap/${image}:${docker_version:-latest} $tag - docker logout -} - -# configure_bind()- Configure bind utils -function configure_bind { - _install_bind - mkdir /etc/bind/zones - - curl -k $nexus_repo/org.openecomp.demo/boot/$artifacts_version/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org - curl -k $nexus_repo/org.openecomp.demo/boot/$artifacts_version/named.conf.options -o /etc/bind/named.conf.options - curl -k $nexus_repo/org.openecomp.demo/boot/$artifacts_version/named.conf.local -o /etc/bind/named.conf.local - - modprobe ip_gre - sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9 - service bind9 restart -} - -# _configure_maven() - This function creates a maven configuration file in case that doesn't exist -function _configure_maven { - local proxies_start=" <!--" - local proxies=" \|" - local proxies_end=" \|-->" - local mvn_http="" - local mvn_https="" - - if [ $http_proxy ] | [ $https_proxy ]; then - proxies_start=" <proxies>" - proxies=" " - proxies_end=" <\/proxies>" - if [ $http_proxy ]; then - proxy_domain=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $1}'` - proxy_port=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $2}'` - mvn_http="<proxy>\n <id>http</id>\n <active>true</active>\n <protocol>http</protocol>\n <host>$proxy_domain</host>\n <port>$proxy_port</port>\n <nonProxyHosts>${no_proxy}</nonProxyHosts>\n </proxy>" - fi - if [ $https_proxy ]; then - proxy_domain=`echo $https_proxy | awk -F/ '{print $3}' | awk -F: '{print $1}'` - proxy_port=`echo $https_proxy | awk -F/ '{print $3}' | awk -F: '{print $2}'` - mvn_https="<proxy>\n <id>https</id>\n <active>true</active>\n <protocol>https</protocol>\n <host>$proxy_domain</host>\n <port>$proxy_port</port>\n <nonProxyHosts>${no_proxy}</nonProxyHosts>\n </proxy>" - fi - fi - - mkdir -p $(dirname $mvn_conf_file) - if [ ! -f $mvn_conf_file ]; then - if [[ "$enable_oparent" == "True" ]]; then - clone_repo oparent - cp $git_src_folder/oparent/settings.xml $mvn_conf_file - sed -i "s|<\/profiles>|<\/profiles>\n%PROXIES_START%\n%PROXIES% %HTTP_PROXY%\n%PROXIES% %HTTPS_PROXY%\n%PROXIES_END%|g" $mvn_conf_file - else - cp /var/onap/files/settings.xml $mvn_conf_file - fi - - sed -e " - s|%PROXIES_START%|$proxies_start|g; - s|%PROXIES%|$proxies|g; - s|%HTTP_PROXY%|$mvn_http|g; - s|%HTTPS_PROXY%|$mvn_https|g; - s|%PROXIES_END%|$proxies_end|g - " -i $mvn_conf_file - fi -} - -# configure_service() - Download and configure a specific service in upstart -function configure_service { - local service_script=$1 - curl -k $nexus_repo/org.openecomp.demo/boot/$artifacts_version/$service_script -o /etc/init.d/$service_script - chmod +x /etc/init.d/$service_script - update-rc.d $service_script defaults -} diff --git a/bootstrap/vagrant-onap/lib/aai b/bootstrap/vagrant-onap/lib/aai deleted file mode 100755 index 1ce3485c6..000000000 --- a/bootstrap/vagrant-onap/lib/aai +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -hbase_version=1.2.0 - -# install_hadoop() - Function that installs Hadoop -function install_hadoop { - local release=titan - local version=1.0.0 - local filename=$release-$version-hadoop1 - local dest_folder=/opt/hadoop/current - - if [ ! -d $dest_folder ]; then - curl http://s3.thinkaurelius.com/downloads/$release/$filename.zip -o /tmp/${filename}.zip - install_package unzip - mkdir -p $dest_folder - unzip /tmp/${filename}.zip -d $dest_folder - fi - - pushd $dest_folder/${filename} - # Change commitlog_directory and data_file_directories values (https://stackoverflow.com/a/26856246/1707651) - sed -i "s|db/cassandra/data|/tmp/data|g" conf/cassandra/cassandra.yaml - sed -i "s|db/cassandra/commitlog|/tmp/commitlog|g" conf/cassandra/cassandra.yaml - - install_java - ./bin/titan.sh start - popd -} - -# install_haproxy() - Function that install HAProxy -function install_haproxy { - if is_package_installed haproxy; then - return - fi - install_package software-properties-common - add-apt-repository -y ppa:vbernat/haproxy-1.7 - update_repos - install_package haproxy - cp /var/onap/files/haproxy.cfg /etc/haproxy/ - cp /var/onap/files/aai.pem /etc/ssl/private/ - chmod 640 /etc/ssl/private/aai.pem - chown root:ssl-cert /etc/ssl/private/aai.pem - mkdir -p /usr/local/etc/haproxy - #echo "127.0.0.1 localhost aai-traversal.api.simpledemo.openecomp.org aai-resources.api.simpledemo.openecomp.org" >> /etc/hosts - - service haproxy restart -} - -# compile_aai_repos() - Function that compiles AAI source repo. -function compile_aai_repos { - local repos="aai/aai-common aai/resources aai/logging-service aai/traversal" - if [[ "$compile_repo" == "True" ]]; then - repos="${repos[aai]}" - fi - - for repo in ${repos[@]}; do - compile_src ${src_folders[aai]}${repo#*aai} - done -} - -# setup_titan() - Function that configures AAI services to connect to Hadoop Titan -function setup_titan { - local subdirectory="bundleconfig-local/etc/appprops" - install_python_package crudini - - for dirc in resources/aai-resources traversal/aai-traversal; do - for file in titan-cached.properties titan-realtime.properties; do - crudini --set "${src_folders[aai]}/$dirc/$subdirectory/$file" "" "storage.backend" "cassandra" - crudini --set "${src_folders[aai]}/$dirc/$subdirectory/$file" "" "storage.hostname" "localhost" - done - done - - # Add the schema to the local instance - compile_src ${src_folders[aai]}/resources/aai-resources/ - uninstall_packages default-jre openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless - pushd ${src_folders[aai]} - java -DAJSC_HOME=${src_folders[aai]}/resources/aai-resources -DBUNDLECONFIG_DIR="bundleconfig-local" -cp aai-common/aai-core/target/aai-core-*.jar:resources/aai-resources/target/aai-resources.jar:resources/aai-resources/target/userjars/* org.onap.aai.dbgen.GenTester - popd -} - -# _start_data_managment() - Funtion that start a data management service -function _start_data_managment { - local service=$1 - local debug_port=$2 - - install_maven - pushd ${src_folders[aai]}/$service - export MAVEN_OPTS="-Xms1024m -Xmx5120m -XX:PermSize=2024m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$debug_port,server=y,suspend=n" - mvn -P runAjsc & - popd -} - -# start_aai_microservices() - Function that starts AAI microservices -function start_aai_microservices { - _start_data_managment resources 9446 - sleep 360 - _start_data_managment traversal 9447 -} - -# install_aai() - Install AAI Services -function install_aai { - install_docker_compose - pushd ${src_folders[aai]}/test-config - ./deploy_vm2.sh - ./deploy_vm1.sh - popd -} - -# get_aai_images() - Function that pulls or creates AAI docker images -function get_aai_images { - pull_docker_image elasticsearch:2.4.1 - docker_openecomp_login - pull_docker_image ${nexus_docker_repo:-nexus3.onap.org:10001}/aaionap/hbase:${hbase_version} - - if [[ "$build_image" == "True" ]]; then - unset MAVEN_OPTS - for project in resources/aai-resources traversal/aai-traversal search-data-service data-router model-loader sparky-be; do - build_docker_image ${src_folders[aai]}/$project - done - else - for image in aai-resources aai-traversal search-data-service data-router model-loader sparky-be; do - pull_onap_image $image - done - fi -} - -# init_aai() - Function that initialize AAI services -function init_aai { - install_hadoop - install_haproxy - - if [[ "$clone_repo" == "True" ]]; then - clone_repos "aai" - fi - compile_aai_repos - - setup_titan - #start_aai_microservices - - if [[ "$skip_get_images" == "False" ]]; then - get_aai_images - fi - if [[ "$skip_install" == "False" ]]; then - install_aai - fi -} diff --git a/bootstrap/vagrant-onap/lib/appc b/bootstrap/vagrant-onap/lib/appc deleted file mode 100755 index 95654fc10..000000000 --- a/bootstrap/vagrant-onap/lib/appc +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -source /var/onap/sdnc -source /var/onap/functions - -# _build_appc_images() - Function that creates APPC images from source code. -function _build_appc_images { - get_sdnc_images - build_docker_image ${src_folders[appc]}/deployment/installation/appc docker -} - -# get_appc_images() - Function that gets or build APPC docker images -function get_appc_images { - if [[ "$build_image" == "True" ]]; then - _build_appc_images - else - for image in appc-image dgbuilder-sdnc-image; do - pull_openecomp_image $image openecomp/$image:latest - done - fi -} - -# install_appc() - Function that clones and installs the APPC services from source code -function install_appc { - run_docker_compose ${src_folders[appc]}/deployment/docker-compose -} - -# init_appc() - Function that initialize APPC services -function init_appc { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "appc" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "appc" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_appc_images - if [[ "$skip_install" == "False" ]]; then - install_appc - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/ccsdk b/bootstrap/vagrant-onap/lib/ccsdk deleted file mode 100755 index 93ee0c85d..000000000 --- a/bootstrap/vagrant-onap/lib/ccsdk +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_ccsdk_images() - Build CCSDK Docker images from source code -function _build_ccsdk_images { - install_package unzip - compile_src ${src_folders[ccsdk]}/distribution - for image in ubuntu opendaylight odlsli dgbuilder-docker; do - build_docker_image ${src_folders[ccsdk]}/distribution/$image docker - done -} - -# get_ccsdk_images() - Get CCSDK Docker images -function get_ccsdk_images { - if [[ "$build_image" == "True" ]]; then - _build_ccsdk_images - else - for image in ubuntu odl dgbuilder; do - pull_onap_image ccsdk-$image-image - done - fi -} - -# init_ccsdk() - Function that initialize Multi Cloud services -function init_ccsdk { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "ccsdk" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "ccsdk" - fi - fi - if [[ "$skip_get_images" == "False" ]]; then - get_ccsdk_images - fi -} diff --git a/bootstrap/vagrant-onap/lib/commons b/bootstrap/vagrant-onap/lib/commons deleted file mode 100755 index 90f73d230..000000000 --- a/bootstrap/vagrant-onap/lib/commons +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash - -# update_repos() - Function that updates linux repositories -function update_repos { - echo "Updating repositories list..." - if [ -f /var/onap/files/sources.list ]; then - cp /var/onap/files/sources.list /etc/apt/sources.list - fi - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - zypper -n ref - ;; - ubuntu|debian) - if [[ "$debug" == "False" ]]; then - apt-get update > /dev/null - else - apt-get update - fi - ;; - rhel|centos|fedora) - yum updateinfo - ;; - esac -} - -# is_package_installed() - Function to tell if a package is installed -function is_package_installed { - if [[ -z "$@" ]]; then - return 1 - fi - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - CHECK_CMD="zypper search --match-exact --installed" - ;; - ubuntu|debian) - CHECK_CMD="dpkg -l" - ;; - rhel|centos|fedora) - CHECK_CMD="rpm -q" - ;; - esac - ${CHECK_CMD} "$@" &> /dev/null -} - -# install_packages() - Install a list of packages -function install_packages { - local package=$@ - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - apt-get install -y -qq $package - ;; - rhel|centos|fedora) - ;; - esac -} - -# install_package() - Install specific package if doesn't exist -function install_package { - local package=$1 - - if ! is_package_installed $package; then - echo "Installing $package..." - - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - zypper install -y $package - ;; - ubuntu|debian) - if [[ "$debug" == "False" ]]; then - apt-get install -y -qq -o=Dpkg::Use-Pty=0 $package - else - apt-get install -y $package - fi - ;; - rhel|centos|fedora) - PKG_MANAGER=$(which dnf || which yum) - ${PKG_MANAGER} -y install $package - ;; - esac - fi -} - -# uninstall_packages() - Uninstall a list of packages -function uninstall_packages { - local packages=$@ - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - apt-get purge -y -qq $packages - ;; - rhel|centos|fedora) - ;; - esac -} - -# uninstall_package() - Uninstall specific package if exists -function uninstall_package { - local package=$1 - if is_package_installed $package; then - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - apt-get purge -y -qq $package - ;; - rhel|centos|fedora) - ;; - esac - fi -} diff --git a/bootstrap/vagrant-onap/lib/config/env-vars b/bootstrap/vagrant-onap/lib/config/env-vars deleted file mode 100755 index 7712de88e..000000000 --- a/bootstrap/vagrant-onap/lib/config/env-vars +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -# Source code destination folder -git_src_folder=/opt/onap - -declare -A src_folders -src_folders=( -["aai"]="$git_src_folder/aai" -["appc"]="$git_src_folder/appc" -["ccsdk"]="$git_src_folder/ccsdk" -["dcae"]="$git_src_folder/dcae" -["mr"]="$git_src_folder/dcae/message-router" -["msb"]="$git_src_folder/msb" -["mso"]="$git_src_folder/mso" -["multicloud"]="$git_src_folder/multicloud" -["oom"]="$git_src_folder/oom" -["policy"]="$git_src_folder/policy" -["portal"]="$git_src_folder/portal" -["robot"]="$git_src_folder/testsuite" -["sdc"]="$git_src_folder/sdc" -["sdnc"]="$git_src_folder/openecomp/sdnc" -["vfc"]="$git_src_folder/vfc" -["vid"]="$git_src_folder/vid" -["vnfsdk"]="$git_src_folder/vnfsdk" -["vvp"]="$git_src_folder/vvp" -) - -# Repositories list -declare -A repos -repos=( -["aai"]="aai/aai-common aai/aai-config aai/aai-data aai/aai-service \ -aai/babel aai/champ aai/data-router aai/esr-gui aai/esr-server aai/gizmo \ -aai/logging-service aai/model-loader aai/resources aai/rest-client \ -aai/router-core aai/search-data-service aai/test-config aai/traversal \ -aai/sparky-fe aai/sparky-be" -["appc"]="appc appc/deployment" -["ccsdk"]="ccsdk ccsdk/dashboard ccsdk/distribution ccsdk/parent \ -ccsdk/platform/blueprints ccsdk/platform/nbapi \ -ccsdk/platform/plugins ccsdk/sli ccsdk/sli/adaptors ccsdk/sli/core \ -ccsdk/sli/northbound ccsdk/sli/plugins ccsdk/storage \ -ccsdk/storage/esaas ccsdk/storage/pgaas ccsdk/utils" -["dcae"]="dcae dcae/apod dcae/apod/analytics dcae/apod/buildtools \ -dcae/apod/cdap dcae/collectors dcae/collectors/ves dcae/controller \ -dcae/controller/analytics dcae/dcae-inventory dcae/demo \ -dcae/demo/startup dcae/demo/startup/aaf dcae/demo/startup/controller \ -dcae/demo/startup/message-router dcae/dmaapbc dcae/operation \ -dcae/operation/utils dcae/orch-dispatcher dcae/pgaas dcae/utils \ -dcae/utils/buildtools" -["msb"]="msb/apigateway msb/discovery msb/java-sdk msb/swagger-sdk" -["mso"]="mso mso/chef-repo mso/docker-config mso/libs mso/mso-config" -["multicloud"]="multicloud multicloud/framework multicloud/openstack \ -multicloud/openstack/vmware multicloud/openstack/windriver \ -multicloud/azure" -["oom"]="oom oom/registrator" -["policy"]="policy/api policy/common policy/docker \ -policy/drools-applications policy/drools-pdp policy/engine \ -policy/gui policy/pap policy/pdp" -["portal"]="portal portal/sdk ecompsdkos ui/dmaapbc" -["robot"]="testsuite testsuite/heatbridge testsuite/properties \ -testsuite/python-testing-utils" -["sdc"]="sdc sdc/jtosca sdc/sdc-distribution-client \ -sdc/sdc-docker-base sdc/sdc-titan-cassandra sdc/sdc-tosca \ -sdc/sdc-vnfdesign sdc/sdc-workflow-designer sdc/sdc_common" -["sdnc"]="sdnc/adaptors sdnc/architecture sdnc/core sdnc/features \ -sdnc/northbound sdnc/oam sdnc/parent sdnc/plugins" -["vfc"]="vfc/gvnfm vfc/gvnfm/vnflcm vfc/gvnfm/vnfmgr \ -vfc/gvnfm/vnfres vfc/nfvo vfc/nfvo/catalog vfc/nfvo/driver \ -vfc/nfvo/driver/ems vfc/nfvo/driver/sfc vfc/nfvo/driver/vnfm \ -vfc/nfvo/driver/vnfm/gvnfm vfc/nfvo/driver/vnfm/svnfm vfc/nfvo/lcm \ -vfc/nfvo/resmanagement vfc/nfvo/wfengine" -["vid"]="vid vid/asdcclient" -["vnfsdk"]="vnfsdk/compliance vnfsdk/functest vnfsdk/lctest \ -vnfsdk/model vnfsdk/pkgtools vnfsdk/refrepo vnfsdk/validation" -["vvp"]="vvp/ansible-ice-bootstrap vvp/cms vvp/devkit \ -vvp/documentation vvp/engagementmgr vvp/gitlab vvp/image-scanner \ -vvp/jenkins vvp/portal vvp/postgresql vvp/test-engine \ -vvp/validation-scripts" -) - diff --git a/bootstrap/vagrant-onap/lib/dcae b/bootstrap/vagrant-onap/lib/dcae deleted file mode 100755 index 25efddddc..000000000 --- a/bootstrap/vagrant-onap/lib/dcae +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _create_config_file() - Creates a configuration yaml file for the controller -function _create_config_file { - cat > ${src_folders[dcae]}/controller/config.yaml << EOL -ZONE: $dcae_zone -STATE: $dcae_state -DCAE-VERSION: $artifacts_version -HORIZON-URL: https://mycloud.rackspace.com/cloud/$tenant_id -KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0 -OPENSTACK-TENANT-ID: $tenant_id -OPENSTACK-TENANT-NAME: OPEN-ECOMP -OPENSTACK-REGION: $openstack_region -OPENSTACK-PRIVATE-NETWORK: $openstack_private_network_name -OPENSTACK-USER: $openstack_user -OPENSTACK-PASSWORD: $openstack_password -OPENSTACK-KEYNAME: ${key_name}${rand_str}_dcae -OPENSTACK-PUBKEY: $pub_key - -NEXUS-URL-ROOT: $nexus_repo_root -NEXUS-USER: $nexus_username -NEXUS-PASSWORD: $nexus_password -NEXUS-URL-SNAPSHOTS: $nexus_url_snapshots -NEXUS-RAWURL: $nexus_repo - -DOCKER-REGISTRY: $nexus_docker_repo - -GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git -EOL -} - -# _build_dcae_images() Function that builds DCAE docker images from source code. -function _build_dcae_images { - if [[ "$compile_repo" != "True" ]]; then - compile_repos "dcae" - fi - build_docker_image ${src_folders[dcae]}/dmaapbc openecomp/dcae-dmaapbc - build_docker_image ${src_folders[dcae]}/orch-dispatcher dcae/orch-dispatcher - - pushd ${src_folders[dcae]}/demo - bash dcae-demo-controller/src/main/docker-build/build.sh - popd - - build_docker_image ${src_folders[dcae]}/dcae-inventory -} - -# get_dcae_images() - Function that retrieves or builds DCAE docker images. -function get_dcae_images { - if [[ "$build_image" == "True" ]]; then - _build_dcae_images - else - pull_openecomp_image dcae-dmaapbc openecomp/dcae-dmaapbc - pull_openecomp_image dcae-controller - fi -} - -# install_dcae() - Function that clones and installs the DCAE controller services from source code -function install_dcae { - pushd ${src_folders[dcae]}/demo/startup/controller - if [[ "$build_image" == "True" ]]; then - dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'` - sed -i "s|DOCKER-REGISTRY/openecomp/dcae-controller:DCAE-VERSION|$dcae_image|g" docker-compose.yml - sed -i "s|MTU|$MTU|g" docker-compose.yml - run_docker_compose . - else - bash init.sh - install_package make - make up - fi - popd - # run_docker_image -p 8080:8080 -d -v <some local directory>/config.yml:/opt/config.yml --name dcae-inventory <docker registry>/dcae-inventory:<version> -} - -# init_dcae() - Function that initialize DCAE Controller services -function init_dcae { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "dcae" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "dcae" - fi - fi - - _create_config_file - if [[ "$skip_get_images" == "False" ]]; then - get_dcae_images - if [[ "$skip_install" == "False" ]]; then - install_dcae - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/files/aai.pem b/bootstrap/vagrant-onap/lib/files/aai.pem deleted file mode 100644 index d446705c7..000000000 --- a/bootstrap/vagrant-onap/lib/files/aai.pem +++ /dev/null @@ -1,102 +0,0 @@ -Bag Attributes - friendlyName: aaiopenecomp - localKeyID: 54 69 6D 65 20 31 34 39 35 35 31 32 38 30 33 36 34 39 -subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=SimpleDemo/CN=aai.api.simpledemo.openecomp.org/emailAddress=aai-host@api.simpledemo.openecomp.org -issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org ------BEGIN CERTIFICATE----- -MIIEiTCCA3GgAwIBAgIJAIPKfDLcn3MpMA0GCSqGSIb3DQEBCwUAMIGtMQswCQYD -VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV -BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzEqMCgGA1UEAwwhT3Bl -bkVDT01QIHNpbXBsZWRlbW8gU2VydmVyIENBIFgxMScwJQYJKoZIhvcNAQkBFhhz -aW1wbGVkZW1vQG9wZW5lY29tcC5vcmcwHhcNMTYxMTMwMTUzODM5WhcNMTcxMTMw -MTUzODM5WjCBuTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5KMRMwEQYDVQQHDApC -ZWRtaW5zdGVyMRIwEAYDVQQKDAlPcGVuRUNPTVAxEzARBgNVBAsMClNpbXBsZURl -bW8xKTAnBgNVBAMMIGFhaS5hcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAub3JnMTQw -MgYJKoZIhvcNAQkBFiVhYWktaG9zdEBhcGkuc2ltcGxlZGVtby5vcGVuZWNvbXAu -b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwQrQl8A0rT0Jjlos -Mr/7LEhT5UOif4GGPOk+3NCIxT3lOqAbUf+d9ZXyT2jWFRiKWua03vQ+Dxc8c2h2 -RRuH8LwEiOiWqPjWRxNqsARzZMI3ryHFCFBZh0FcpjH9kEeKVlLDYuV68k+ZucKd -NiqUNn61lD7kbmEGwvzKwf91FrJ09+CBMx1OnWKm3gCNKDqAEFMZCOdn2MgesJYB -/03lzPBS1jDfBXImXRcTBzpgA+wdCLn0cIQ1eLWUwS5tUqUJNh36nHdVyJ0P2Yjd -JLuxhFcmBKOz1ShyyO+BBtKBO8EGbU6qKflOiwOw0Fsn8LjKcrHQ58NPui5y04BU -Rypf3QIDAQABo4GdMIGaMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/BAQDAgO4MB0G -A1UdDgQWBBQyMUOsE2J+CKzK0qd8KFBD2gaWyjBbBgNVHSAEVDBSMFAGBFUdIAAw -SDBGBggrBgEFBQcCAjA6GjhLZWVwIGF3YXkgZnJvbSBjaGlsZHJlbi4gIFRoaXMg -Y2VydGlmaWNhdGUgaXMgbm90IGEgdG95LjANBgkqhkiG9w0BAQsFAAOCAQEAnkoy -2tWJOyyyIQwtVojUxv1GWQPnw3WCUcKpuX4CJhHXLxNErW1fBg7bmo08BNmBPPpq -WrJsy5lbBgUo9kgpViux5Stfy1rRIRsRLfl/icgCvJmUAxkmRCZL7yUvwG4K7s+8 -DwT+nW/XuWNP6Hd/qHccexB6COJ8KwvTdVoxAkCdX8qw4MCb/f7Kb1yle/vwBM5Q -UUONCJ4bEns1vnb9DGlNDUJNwCfwORAaVJpVS38Mv4UnSTmb2KMePtCWcx/dNsYR -2XrSGqLDnTvHwOpyhbfFTmackysGoSuDytORXy8YbwEiF13BwEK8i3rgNN0Z2ojf -cpmE2xxmaa+A2uuN6g== ------END CERTIFICATE----- -Bag Attributes - friendlyName: root - 2.16.840.1.113894.746875.1.1: <Unsupported tag 6> -subject=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Server CA X1/emailAddress=simpledemo@openecomp.org -issuer=/C=US/ST=NJ/L=Bedminster/O=OpenECOMP/OU=simpledemo/CN=OpenECOMP simpledemo Root Certification Authority/emailAddress=simpledemo@openecomp.org ------BEGIN CERTIFICATE----- -MIIFpTCCA42gAwIBAgIJAJqx8dKnCZZoMA0GCSqGSIb3DQEBCwUAMIG9MQswCQYD -VQQGEwJVUzELMAkGA1UECAwCTkoxEzARBgNVBAcMCkJlZG1pbnN0ZXIxEjAQBgNV -BAoMCU9wZW5FQ09NUDETMBEGA1UECwwKc2ltcGxlZGVtbzE6MDgGA1UEAwwxT3Bl -bkVDT01QIHNpbXBsZWRlbW8gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEn -MCUGCSqGSIb3DQEJARYYc2ltcGxlZGVtb0BvcGVuZWNvbXAub3JnMB4XDTE2MTEy -ODIxMTQyNloXDTIxMTEyNzIxMTQyNlowga0xCzAJBgNVBAYTAlVTMQswCQYDVQQI -DAJOSjETMBEGA1UEBwwKQmVkbWluc3RlcjESMBAGA1UECgwJT3BlbkVDT01QMRMw -EQYDVQQLDApzaW1wbGVkZW1vMSowKAYDVQQDDCFPcGVuRUNPTVAgc2ltcGxlZGVt -byBTZXJ2ZXIgQ0EgWDExJzAlBgkqhkiG9w0BCQEWGHNpbXBsZWRlbW9Ab3BlbmVj -b21wLm9yZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALr4rivKQuRk -YNf5Ig40e1nqj6s6LB1vgMOYbKfRziOFpPcUpsHPOhusHowiUsrU1vdFSzPz6Ej7 -PjlmNSg2Qka8YCn9kd6QgM7U0KcPJvIucBp+qjifH3EvP0jgDPhDeVRYxzV454dv -5kQ9uCpswJP7YAnX51dkWeH8nwPUoagt31bOl9LXENSrgxEThxdLYMJnQJWk2CmV -otXM4tT1dxyJxFUrZ6uJCEAYw5VtlplqihHf8lHy+sWQavtsLz/4dc+sGeXSTfoI -voKvoh3uZ5gEhGV8yfJxk1veX5y5/AxP80vQ+smWYjTnQL5QQ57y4bciez4XVBmQ -SWimWtOi4e8CAwEAAaOBtTCBsjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE -AwIBhjAdBgNVHQ4EFgQUTqdsYgGNGubdJHq9tsaJhM9HE5wwcAYDVR0gBGkwZzBl -BgRVHSAAMF0wWwYIKwYBBQUHAgIwTxpNSWYgeW91IHRydXN0IHRoaXMgY2VydCB0 -aGVuIHdlIGhhdmUgYSBicmlkZ2UgdGhhdCB5b3UgbWlnaHQgYmUgaW50ZXJlc3Rl -ZCBpbi4wDQYJKoZIhvcNAQELBQADggIBAKNNlRqFuE/JgV1BHyYK0xoSXH4aZP/7 -IoHtDVcSaZAOOuFOUrwVMUbzRBebbb6RpFwt/X+NLFUGysd+XNLF7W7lzxKtmFNX -n4OpNkBe0y5O7yurus8rERHzu3jiOSgVo+WzDlGpYSRnG3hI2qPWqD+Puzx/WwI8 -XUTuzEQQ3gUSyVFfXHpay3VpYmLZiLJ9WKY5SDw7Ie6Sxrju4Qm1HwnFY8wHZGcs -2KMQzorJ1ZNQf523yUTghbT0rKaSFaD8zugPtI2ONfFG/QgrkQXo78opzPsHnHwa -SxGSiAgeLbwAUCvPNl27zr6k6+7TcNjV0VUivAs0OG3VEAdgi7UWYB+30KfWwHwE -zGmvd4IAGqIqlqLcSVArN5z8JK1B5nfjQn5UrclU1vK+dnuiKE2X4rKuBTRYRFR/ -km+mj4koYFPKFHndmJl1uv2OCJK9l5CSIuKWeI1qv8BASKqgNdoT/SKBXqxgYlCb -o+j4IDjxrxChRO+e5vl9lA7INfRrbljCkUjfLRa+v2q9tWQ3+EQUwwnSrSfihh2T -j0Tksr6b8dDsvMlCdOKG1B+JPcEXORSFKNXVTEfjqpJG8s16kFAocWt3S6xO0k1t -qbQp+3tWQgW2TGnX0rMZzB6NGRNfWhlYmq2zHgXkiCIZ26Ztgt/LNbwEvN3+VlLo -z/Rd+SKtlrfb ------END CERTIFICATE----- -Bag Attributes - friendlyName: aaiopenecomp - localKeyID: 54 69 6D 65 20 31 34 39 35 35 31 32 38 30 33 36 34 39 -Key Attributes: <No Attributes> ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDBCtCXwDStPQmO -Wiwyv/ssSFPlQ6J/gYY86T7c0IjFPeU6oBtR/531lfJPaNYVGIpa5rTe9D4PFzxz -aHZFG4fwvASI6Jao+NZHE2qwBHNkwjevIcUIUFmHQVymMf2QR4pWUsNi5XryT5m5 -wp02KpQ2frWUPuRuYQbC/MrB/3UWsnT34IEzHU6dYqbeAI0oOoAQUxkI52fYyB6w -lgH/TeXM8FLWMN8FciZdFxMHOmAD7B0IufRwhDV4tZTBLm1SpQk2Hfqcd1XInQ/Z -iN0ku7GEVyYEo7PVKHLI74EG0oE7wQZtTqop+U6LA7DQWyfwuMpysdDnw0+6LnLT -gFRHKl/dAgMBAAECggEBAJko2HkeIW01mUhdWOXnFgR7WjzzXZEmlffr41lVBr7f -rejGsQZs9cms73R7rCdOsi8PDoA6bqaQfADg571K659fvYVWbHqh+3im+iWvUlKm -GYIVG/vNrEq43CZsUU7Qw/xba/QiOFraNxCATTV1sORPwgddouXEi5XW9ZPX9/FJ -wORx4L/K0DfHX1rr+rtOoHCJdZYhn3Ij87kmR8Mwg0fNeWhHqtxUEyM/itRjCvOe -mgt2V8DORhmq12L4+5QJctBrkBVRp9Rh6YSZZBGnKbTSgf4q648BdkJDLSK4cguT -D6BAw3gxj5V4wt5W0wn2JpjadFwnixrTzvMP/yAqfK0CgYEA93nBAoUPw8nzQkwk -8iWBjfJ999Rw92hnnvk3xbcQcGfgUYuB4dxwe6FQTmFIVylt81er1YUvMb3ao7fo -5ZcGnI5p1idjsd27kbZJLxb5Oh919hKu5IfkfYsVgnC0UdKCTgH5CaH0U4ATuXwt -RL6qm0XcLALs5y2OO6z3s+mYhisCgYEAx7EQ8MA45bkXnRQiHBhGcIIcr2sRDfVJ -OhHmGxx3EcYgtsIYKTqtQOyIt/nQxo6iyNL9bzfzBTybFJLuj63ZG1Ef4LosJedl -eAU2NsKv5MlKYDSdNbLAJ0Op9I2Xu/pXQecPwY/3MkIQArdQCLevMLEGywCsuJTn -BjkJNDkb9hcCgYAhoFiaiAwJVYKJSqFmibQd3opBR4uGApi54DE021gPff3b9rHS -R8q88cFgtRVISqfW/d2qaKtt/dcckdvCfo/2a99zqux/+ZoIBZXSITQCMs4rfoRn -JxPj/ycQD1JhH9J22QvGxEvXoLqNZJMeGS5DZO2yyT75dpYyA6Gwv5fq+wKBgQC5 -AhV917lfLELyZurLOLpaFlHZO8rLMcusH1UfHRo7v2IjsGOOHyzRD9QDD1IcA55R -jRj8Z8uhuGq9fvvC5gBVTK3KGPI6E85wifOWfH1V7CAaTeSxEXDxb8EQL/a6U89v -4VE5tdYCHC6VNZzS1staw0hV38QmJt57Z3Bdj+OV9QKBgE/b9fxpo+SVQ37BzNNY -SEKTTijaddz8fdomApg6a2eFJL93Ej/op7N7gnHtPWMivPnRRza9ZjfnG+aZ7n2J -sWyBiZK9xliS2TsF3l3q9Z0Vaq3i1nOlV7Bd20ZS8KjQjDtKnIRfLkQDkvmXbU5L -emwkdsQZbpPFJch3mCGtI7JW ------END PRIVATE KEY----- diff --git a/bootstrap/vagrant-onap/lib/files/all-in-one b/bootstrap/vagrant-onap/lib/files/all-in-one deleted file mode 100644 index efdb2bfce..000000000 --- a/bootstrap/vagrant-onap/lib/files/all-in-one +++ /dev/null @@ -1,585 +0,0 @@ -# These initial groups are the only groups required to be modified. The -# additional groups are for more control of the environment. -[control] -localhost ansible_connection=local - -[network] -localhost ansible_connection=local - -[compute] -localhost ansible_connection=local - -[storage] -localhost ansible_connection=local - -[monitoring] -localhost ansible_connection=local - -[deployment] -localhost ansible_connection=local - -# You can explicitly specify which hosts run each project by updating the -# groups in the sections below. Common services are grouped together. -[chrony-server:children] -haproxy - -[chrony:children] -network -compute -storage -monitoring - -[collectd:children] -compute - -[baremetal:children] -control - -[grafana:children] -monitoring - -[etcd:children] -control -compute - -[karbor:children] -control - -[kibana:children] -control - -[telegraf:children] -compute -control -monitoring -network -storage - -[elasticsearch:children] -control - -[haproxy:children] -network - -[hyperv] -#hyperv_host - -[hyperv:vars] -#ansible_user=user -#ansible_password=password -#ansible_port=5986 -#ansible_connection=winrm -#ansible_winrm_server_cert_validation=ignore - -[mariadb:children] -control - -[rabbitmq:children] -control - -[outward-rabbitmq:children] -control - -[qdrouterd:children] -control - -[mongodb:children] -control - -[keystone:children] -control - -[glance:children] -control - -[nova:children] -control - -[neutron:children] -network - -[openvswitch:children] -network -compute -manila-share - -[opendaylight:children] -network - -[cinder:children] -control - -[cloudkitty:children] -control - -[freezer:children] -control - -[memcached:children] -control - -[horizon:children] -control - -[swift:children] -control - -[barbican:children] -control - -[heat:children] -control - -[murano:children] -control - -[ceph:children] -control - -[ironic:children] -control - -[influxdb:children] -monitoring - -[magnum:children] -control - -[sahara:children] -control - -[solum:children] -control - -[mistral:children] -control - -[manila:children] -control - -[panko:children] -control - -[gnocchi:children] -control - -[ceilometer:children] -control - -[aodh:children] -control - -[congress:children] -control - -[tacker:children] -control - -# Tempest -[tempest:children] -control - -[senlin:children] -control - -[vmtp:children] -control - -[trove:children] -control - -[watcher:children] -control - -[rally:children] -control - -[searchlight:children] -control - -[octavia:children] -control - -[designate:children] -control - -[placement:children] -control - -[bifrost:children] -deployment - -[zun:children] -control - -[skydive:children] -monitoring - -[redis:children] -control - -# Additional control implemented here. These groups allow you to control which -# services run on which hosts at a per-service level. -# -# Word of caution: Some services are required to run on the same host to -# function appropriately. For example, neutron-metadata-agent must run on the -# same host as the l3-agent and (depending on configuration) the dhcp-agent. - -# Glance -[glance-api:children] -glance - -[glance-registry:children] -glance - -# Nova -[nova-api:children] -nova - -[nova-conductor:children] -nova - -[nova-consoleauth:children] -nova - -[nova-novncproxy:children] -nova - -[nova-scheduler:children] -nova - -[nova-spicehtml5proxy:children] -nova - -[nova-compute-ironic:children] -nova - -[nova-serialproxy:children] -nova - -# Neutron -[neutron-server:children] -control - -[neutron-dhcp-agent:children] -neutron - -[neutron-l3-agent:children] -neutron - -[neutron-lbaas-agent:children] -neutron - -[neutron-metadata-agent:children] -neutron - -[neutron-vpnaas-agent:children] -neutron - -[neutron-bgp-dragent:children] -neutron - -# Ceph -[ceph-mon:children] -ceph - -[ceph-rgw:children] -ceph - -[ceph-osd:children] -storage - -# Cinder -[cinder-api:children] -cinder - -[cinder-backup:children] -storage - -[cinder-scheduler:children] -cinder - -[cinder-volume:children] -storage - -# Cloudkitty -[cloudkitty-api:children] -cloudkitty - -[cloudkitty-processor:children] -cloudkitty - -# Freezer -[freezer-api:children] -freezer - -# iSCSI -[iscsid:children] -compute -storage -ironic-conductor - -[tgtd:children] -storage - -# Karbor -[karbor-api:children] -karbor - -[karbor-protection:children] -karbor - -[karbor-operationengine:children] -karbor - -# Manila -[manila-api:children] -manila - -[manila-scheduler:children] -manila - -[manila-share:children] -network - -[manila-data:children] -manila - -# Swift -[swift-proxy-server:children] -swift - -[swift-account-server:children] -storage - -[swift-container-server:children] -storage - -[swift-object-server:children] -storage - -# Barbican -[barbican-api:children] -barbican - -[barbican-keystone-listener:children] -barbican - -[barbican-worker:children] -barbican - -# Trove -[trove-api:children] -trove - -[trove-conductor:children] -trove - -[trove-taskmanager:children] -trove - -# Heat -[heat-api:children] -heat - -[heat-api-cfn:children] -heat - -[heat-engine:children] -heat - -# Murano -[murano-api:children] -murano - -[murano-engine:children] -murano - -# Ironic -[ironic-api:children] -ironic - -[ironic-conductor:children] -ironic - -[ironic-inspector:children] -ironic - -[ironic-pxe:children] -ironic - -# Magnum -[magnum-api:children] -magnum - -[magnum-conductor:children] -magnum - -# Solum -[solum-api:children] -solum - -[solum-worker:children] -solum - -[solum-deployer:children] -solum - -[solum-conductor:children] -solum - -# Mistral -[mistral-api:children] -mistral - -[mistral-executor:children] -mistral - -[mistral-engine:children] -mistral - -# Aodh -[aodh-api:children] -aodh - -[aodh-evaluator:children] -aodh - -[aodh-listener:children] -aodh - -[aodh-notifier:children] -aodh - -# Panko -[panko-api:children] -panko - -# Gnocchi -[gnocchi-api:children] -gnocchi - -[gnocchi-statsd:children] -gnocchi - -[gnocchi-metricd:children] -gnocchi - -# Sahara -[sahara-api:children] -sahara - -[sahara-engine:children] -sahara - -# Ceilometer -[ceilometer-api:children] -ceilometer - -[ceilometer-central:children] -ceilometer - -[ceilometer-notification:children] -ceilometer - -[ceilometer-collector:children] -ceilometer - -[ceilometer-compute:children] -compute - -# Congress -[congress-api:children] -congress - -[congress-datasource:children] -congress - -[congress-policy-engine:children] -congress - -# Multipathd -[multipathd:children] -compute - -# Watcher -[watcher-api:children] -watcher - -[watcher-engine:children] -watcher - -[watcher-applier:children] -watcher - -# Senlin -[senlin-api:children] -senlin - -[senlin-engine:children] -senlin - -# Searchlight -[searchlight-api:children] -searchlight - -[searchlight-listener:children] -searchlight - -# Octavia -[octavia-api:children] -octavia - -[octavia-health-manager:children] -octavia - -[octavia-housekeeping:children] -octavia - -[octavia-worker:children] -octavia - -# Designate -[designate-api:children] -designate - -[designate-central:children] -designate - -[designate-mdns:children] -network - -[designate-worker:children] -designate - -[designate-sink:children] -designate - -[designate-backend-bind9:children] -designate - -# Placement -[placement-api:children] -placement - -# Zun -[zun-api:children] -zun - -[zun-compute:children] -compute - -# Skydive -[skydive-analyzer:children] -skydive - -[skydive-agent:children] -compute -network - -# Tacker -[tacker-server:children] -tacker - -[tacker-conductor:children] -tacker diff --git a/bootstrap/vagrant-onap/lib/files/globals.yml b/bootstrap/vagrant-onap/lib/files/globals.yml deleted file mode 100644 index d10cc3d83..000000000 --- a/bootstrap/vagrant-onap/lib/files/globals.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -openstack_release: "master" diff --git a/bootstrap/vagrant-onap/lib/files/haproxy.cfg b/bootstrap/vagrant-onap/lib/files/haproxy.cfg deleted file mode 100644 index ac4b75498..000000000 --- a/bootstrap/vagrant-onap/lib/files/haproxy.cfg +++ /dev/null @@ -1,120 +0,0 @@ -global - log /dev/log local0 - stats socket /usr/local/etc/haproxy/haproxy.socket mode 660 level admin - stats timeout 30s - user root - group root - daemon - ################################# - # Default SSL material locations# - ################################# - ca-base /etc/ssl/certs - crt-base /etc/ssl/private - - # Default ciphers to use on SSL-enabled listening sockets. - # For more information, see ciphers(1SSL). This list is from: - # https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ - # An alternative list with additional directives can be obtained from - # https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy - tune.ssl.default-dh-param 2048 - -defaults - log global - mode http - option httplog -# option dontlognull -# errorfile 400 /etc/haproxy/errors/400.http -# errorfile 403 /etc/haproxy/errors/403.http -# errorfile 408 /etc/haproxy/errors/408.http -# errorfile 500 /etc/haproxy/errors/500.http -# errorfile 502 /etc/haproxy/errors/502.http -# errorfile 503 /etc/haproxy/errors/503.http -# errorfile 504 /etc/haproxy/errors/504.http - - option http-server-close - option forwardfor except 127.0.0.1 - retries 6 - option redispatch - maxconn 50000 - timeout connect 50000 - timeout client 480000 - timeout server 480000 - timeout http-keep-alive 30000 - - -frontend IST_8443 - mode http - bind 0.0.0.0:8443 name https ssl crt /etc/ssl/private/aai.pem -# log-format %ci:%cp\ [%t]\ %ft\ %b/%s\ %Tq/%Tw/%Tc/%Tr/%Tt\ %ST\ %B\ %CC\ %CS\ %tsc\ %ac/%fc/%bc/%sc/%rc\ %sq/%bq\ %hr\ %hs\ {%[ssl_c_verify],%{+Q}[ssl_c_s_dn],%{+Q}[ssl_c_i_dn]}\ %{+Q}r - log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC \ %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r" - option httplog - log global - option logasap - option forwardfor - capture request header Host len 100 - capture response header Host len 100 - option log-separate-errors - option forwardfor - http-request set-header X-Forwarded-Proto https if { ssl_fc } - http-request set-header X-AAI-Client-SSL TRUE if { ssl_c_used } - http-request set-header X-AAI-SSL %[ssl_fc] - http-request set-header X-AAI-SSL-Client-Verify %[ssl_c_verify] - http-request set-header X-AAI-SSL-Client-DN %{+Q}[ssl_c_s_dn] - http-request set-header X-AAI-SSL-Client-CN %{+Q}[ssl_c_s_dn(cn)] - http-request set-header X-AAI-SSL-Issuer %{+Q}[ssl_c_i_dn] - http-request set-header X-AAI-SSL-Client-NotBefore %{+Q}[ssl_c_notbefore] - http-request set-header X-AAI-SSL-Client-NotAfter %{+Q}[ssl_c_notafter] - http-request set-header X-AAI-SSL-ClientCert-Base64 %{+Q}[ssl_c_der,base64] - http-request set-header X-AAI-SSL-Client-OU %{+Q}[ssl_c_s_dn(OU)] - http-request set-header X-AAI-SSL-Client-L %{+Q}[ssl_c_s_dn(L)] - http-request set-header X-AAI-SSL-Client-ST %{+Q}[ssl_c_s_dn(ST)] - http-request set-header X-AAI-SSL-Client-C %{+Q}[ssl_c_s_dn(C)] - http-request set-header X-AAI-SSL-Client-O %{+Q}[ssl_c_s_dn(O)] - reqadd X-Forwarded-Proto:\ https - reqadd X-Forwarded-Port:\ 8443 - -####################### -#ACLS FOR PORT 8446#### -####################### - - acl is_Port_8446_generic path_reg -i ^/aai/v[0-9]+/search/generic-query$ - acl is_Port_8446_nodes path_reg -i ^/aai/v[0-9]+/search/nodes-query$ - acl is_Port_8446_version path_reg -i ^/aai/v[0-9]+/query$ - acl is_named-query path_beg -i /aai/search/named-query - acl is_search-model path_beg -i /aai/search/model - use_backend IST_AAI_8446 if is_Port_8446_generic or is_Port_8446_nodes or is_Port_8446_version or is_named-query or is_search-model - - default_backend IST_Default_8447 - - -####################### -#DEFAULT BACKEND 847### -####################### - -backend IST_Default_8447 - balance roundrobin - http-request set-header X-Forwarded-Port %[src_port] - http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload; - server aai aai:8447 port 8447 ssl verify none - -####################### -# BACKEND 8446######### -####################### - -backend IST_AAI_8446 - balance roundrobin - http-request set-header X-Forwarded-Port %[src_port] - http-response set-header Strict-Transport-Security max-age=16000000;\ includeSubDomains;\ preload; - server aai aai:8446 port 8446 ssl verify none - -listen IST_AAI_STATS - mode http - bind *:8080 - stats uri /stats - stats enable - stats refresh 30s - stats hide-version - stats auth admin:admin - stats show-legends - stats show-desc IST AAI APPLICATION NODES - stats admin if TRUE diff --git a/bootstrap/vagrant-onap/lib/files/kolla-build.conf b/bootstrap/vagrant-onap/lib/files/kolla-build.conf deleted file mode 100644 index 8dd14e6c6..000000000 --- a/bootstrap/vagrant-onap/lib/files/kolla-build.conf +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -base = ubuntu -profile = main - -[profiles] diff --git a/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py b/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py deleted file mode 100644 index 6b5a6e9f6..000000000 --- a/bootstrap/vagrant-onap/lib/files/kubectl_config_generator.py +++ /dev/null @@ -1,40 +0,0 @@ -import requests -import os -import base64 - -RANCHER_URL = str(os.environ['RANCHER_URL']) -RANCHER_ENVIRONMENT_ID = str(os.environ['RANCHER_ENVIRONMENT']) -data = requests.post(RANCHER_URL + '/v1/projects/' + RANCHER_ENVIRONMENT_ID + '/apikeys', - {"accountId": RANCHER_ENVIRONMENT_ID, - "description": "ONAP on Kubernetes", - "name": "ONAP on Kubernetes", - "publicValue": "string", - "secretValue": "password"}) -json_dct = data.json() -access_key = json_dct['publicValue'] -secret_key = json_dct['secretValue'] -auth_header = 'Basic ' + base64.b64encode(access_key + ':' + secret_key) -token = "\"" + str(base64.b64encode(auth_header)) + "\"" -dct = \ -""" -apiVersion: v1 -kind: Config -clusters: -- cluster: - api-version: v1 - insecure-skip-tls-verify: true - server: "{}/r/projects/{}/kubernetes:6443" - name: "onap_on_kubernetes" -contexts: -- context: - cluster: "onap_on_kubernetes" - user: "onap_on_kubernetes" - name: "onap_on_kubernetes" -current-context: "onap_on_kubernetes" -users: -- name: "onap_on_kubernetes" - user: - token: {} -""".format(RANCHER_URL, RANCHER_ENVIRONMENT_ID, token) -with open("config", "w") as file: - file.write(dct) diff --git a/bootstrap/vagrant-onap/lib/files/passwords.yml b/bootstrap/vagrant-onap/lib/files/passwords.yml deleted file mode 100644 index f376e31f0..000000000 --- a/bootstrap/vagrant-onap/lib/files/passwords.yml +++ /dev/null @@ -1,216 +0,0 @@ ---- -################### -# Ceph options -#################### -# These options must be UUID4 values in string format -# XXXXXXXX-XXXX-4XXX-XXXX-XXXXXXXXXXXX -ceph_cluster_fsid: -ceph_rgw_keystone_password: -# for backward compatible consideration, rbd_secret_uuid is only used for nova, -# cinder_rbd_secret_uuid is used for cinder -rbd_secret_uuid: -cinder_rbd_secret_uuid: - -################### -# Database options -#################### -database_password: - -#################### -# Docker options -#################### -# This should only be set if you require a password for your Docker registry -docker_registry_password: - -###################### -# OpenDaylight options -###################### -opendaylight_password: - -#################### -# OpenStack options -#################### -aodh_database_password: -aodh_keystone_password: - -barbican_database_password: -barbican_keystone_password: -barbican_p11_password: -barbican_crypto_key: - -keystone_admin_password: -keystone_database_password: - -grafana_database_password: -grafana_admin_password: - -glance_database_password: -glance_keystone_password: - -gnocchi_database_password: -gnocchi_keystone_password: - -karbor_database_password: -karbor_keystone_password: -karbor_openstack_infra_id: - -kuryr_keystone_password: - -nova_database_password: -nova_api_database_password: -nova_keystone_password: - -placement_keystone_password: - -neutron_database_password: -neutron_keystone_password: -metadata_secret: - -cinder_database_password: -cinder_keystone_password: - -cloudkitty_database_password: -cloudkitty_keystone_password: - -panko_database_password: -panko_keystone_password: - -freezer_database_password: -freezer_keystone_password: - -sahara_database_password: -sahara_keystone_password: - -designate_database_password: -designate_pool_manager_database_password: -designate_keystone_password: -# This option must be UUID4 value in string format -designate_pool_id: -# This option must be HMAC-MD5 value in string format -designate_rndc_key: - -swift_keystone_password: -swift_hash_path_suffix: -swift_hash_path_prefix: - -heat_database_password: -heat_keystone_password: -heat_domain_admin_password: - -murano_database_password: -murano_keystone_password: -murano_agent_rabbitmq_password: - -ironic_database_password: -ironic_keystone_password: - -ironic_inspector_database_password: -ironic_inspector_keystone_password: - -magnum_database_password: -magnum_keystone_password: - -mistral_database_password: -mistral_keystone_password: - -trove_database_password: -trove_keystone_password: - -ceilometer_database_password: -ceilometer_keystone_password: - -watcher_database_password: -watcher_keystone_password: - -congress_database_password: -congress_keystone_password: - -rally_database_password: - -senlin_database_password: -senlin_keystone_password: - -solum_database_password: -solum_keystone_password: - -horizon_secret_key: -horizon_database_password: - -telemetry_secret_key: - -manila_database_password: -manila_keystone_password: - -octavia_database_password: -octavia_keystone_password: -octavia_ca_password: - -searchlight_keystone_password: - -tacker_database_password: -tacker_keystone_password: - -zun_database_password: -zun_keystone_password: - -memcache_secret_key: - -#HMAC secret key -osprofiler_secret: - -nova_ssh_key: - private_key: - public_key: - -kolla_ssh_key: - private_key: - public_key: - -keystone_ssh_key: - private_key: - public_key: - -bifrost_ssh_key: - private_key: - public_key: - -#################### -# Gnocchi options -#################### -gnocchi_project_id: -gnocchi_resource_id: -gnocchi_user_id: - -#################### -# Qdrouterd options -#################### -qdrouterd_password: - -#################### -# RabbitMQ options -#################### -rabbitmq_password: -rabbitmq_cluster_cookie: -outward_rabbitmq_password: -outward_rabbitmq_cluster_cookie: - -#################### -# HAProxy options -#################### -haproxy_password: -keepalived_password: - -#################### -# Kibana options -#################### -kibana_password: - -#################### -# etcd options -#################### -etcd_cluster_token: - -#################### -# redis options -#################### -redis_master_password: diff --git a/bootstrap/vagrant-onap/lib/files/settings.xml b/bootstrap/vagrant-onap/lib/files/settings.xml deleted file mode 100644 index 862a3e865..000000000 --- a/bootstrap/vagrant-onap/lib/files/settings.xml +++ /dev/null @@ -1,369 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> - <!-- offline | Determines whether maven should attempt to connect to the - network when executing a build. | This will have an effect on artifact downloads, - artifact deployment, and others. | | Default: false <offline>false</offline> --> - <!-- proxies | This is a list of proxies which can be used on this machine - to connect to the network. | Unless otherwise specified (by system property - or command-line switch), the first proxy | specification in this list marked - as active will be used. | --> -%PROXIES_START% -%PROXIES% %HTTP_PROXY% -%PROXIES% %HTTPS_PROXY% -%PROXIES_END% - <!-- mirrors | This is a list of mirrors to be used in downloading artifacts - from remote repositories. | | It works like this: a POM may declare a repository - to use in resolving certain artifacts. | However, this repository may have - problems with heavy traffic at times, so people have mirrored | it to several - places. | | That repository definition will have a unique id, so we can create - a mirror reference for that | repository, to be used as an alternate download - site. The mirror site will be the preferred | server for that repository. - | --> - <!-- profiles | This is a list of profiles which can be activated in a variety - of ways, and which can modify | the build process. Profiles provided in the - settings.xml are intended to provide local machine- | specific paths and - repository locations which allow the build to work in the local environment. - | | For example, if you have an integration testing plugin - like cactus - - that needs to know where | your Tomcat instance is installed, you can provide - a variable here such that the variable is | dereferenced during the build - process to configure the cactus plugin. | | As noted above, profiles can - be activated in a variety of ways. One way - the activeProfiles | section - of this document (settings.xml) - will be discussed later. Another way essentially - | relies on the detection of a system property, either matching a particular - value for the property, | or merely testing its existence. Profiles can also - be activated by JDK version prefix, where a | value of '1.4' might activate - a profile when the build is executed on a JDK version of '1.4.2_07'. | Finally, - the list of active profiles can be specified directly from the command line. - | | NOTE: For profiles defined in the settings.xml, you are restricted to - specifying only artifact | repositories, plugin repositories, and free-form - properties to be used as configuration | variables for plugins in the POM. - | | --> - <profiles> - <profile> - <id>00_maven</id> - <repositories> - <repository> - <id>00_maven</id> - <url>https://maven.restlet.com</url> - </repository> - </repositories> - </profile> - <profile> - <id>10_nexus</id> - <repositories> - <repository> - <id>10_nexus</id> - <url>http://repo.maven.apache.org/maven2/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>10_nexus</id> - <url>http://repo.maven.apache.org/maven2/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>20_openecomp-public</id> - <repositories> - <repository> - <id>20_openecomp-public</id> - <name>20_openecomp-public</name> - <url>https://nexus.onap.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>20_openecomp-public</id> - <name>20_openecomp-public</name> - <url>https://nexus.onap.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>30_openecomp-staging</id> - <repositories> - <repository> - <id>30_openecomp-staging</id> - <name>30_openecomp-staging</name> - <url>https://nexus.onap.org/content/repositories/staging/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>30_openecomp-staging</id> - <name>30_openecomp-staging</name> - <url>https://nexus.onap.org/content/repositories/staging/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>40_openecomp-release</id> - <repositories> - <repository> - <id>40_openecomp-release</id> - <name>40_openecomp-release</name> - <url>https://nexus.onap.org/content/repositories/releases/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>40_openecomp-release</id> - <name>40_openecomp-release</name> - <url>https://nexus.onap.org/content/repositories/releases/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>50_openecomp-snapshots</id> - <repositories> - <repository> - <id>50_openecomp-snapshot</id> - <name>50_openecomp-snapshot</name> - <url>https://nexus.onap.org/content/repositories/snapshots/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>50_openecomp-snapshot</id> - <name>50_openecomp-snapshot</name> - <url>https://nexus.onap.org/content/repositories/snapshots/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>60_opendaylight-release</id> - <repositories> - <repository> - <id>60_opendaylight-mirror</id> - <name>60_opendaylight-mirror</name> - <url>https://nexus.opendaylight.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>60_opendaylight-mirror</id> - <name>60_opendaylight-mirror</name> - <url>https://nexus.opendaylight.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - <updatePolicy>daily</updatePolicy> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>70_opendaylight-snapshots</id> - <repositories> - <repository> - <id>70_opendaylight-snapshot</id> - <name>70_opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>70_opendaylight-snapshot</id> - <name>70_opendaylight-snapshot</name> - <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - <profile> - <id>80_onap</id> - <repositories> - <repository> - <id>onap-snapshots</id> - <name>onap-snapshots</name> - <url>https://nexus.onap.org/content/repositories/snapshots/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </repository> - <repository> - <id>onap-staging</id> - <name>onap-staging</name> - <url>https://nexus.onap.org/content/repositories/staging/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>onap-releases</id> - <name>onap-releases</name> - <url>https://nexus.onap.org/content/repositories/releases/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>onap-public</id> - <name>onap-public</name> - <url>https://nexus.onap.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>onap-snapshots</id> - <name>onap-snapshots</name> - <url>https://nexus.onap.org/content/repositories/snapshots/</url> - <releases> - <enabled>false</enabled> - </releases> - <snapshots> - <enabled>true</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>onap-staging</id> - <name>onap-staging</name> - <url>https://nexus.onap.org/content/repositories/staging/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>onap-releases</id> - <name>onap-releases</name> - <url>https://nexus.onap.org/content/repositories/releases/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>onap-public</id> - <name>onap-public</name> - <url>https://nexus.onap.org/content/repositories/public/</url> - <releases> - <enabled>true</enabled> - </releases> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - </pluginRepositories> - </profile> - </profiles> - <activeProfiles> - <activeProfile>00_maven</activeProfile> - <activeProfile>10_nexus</activeProfile> - <activeProfile>20_openecomp-public</activeProfile> - <activeProfile>30_openecomp-staging</activeProfile> - <activeProfile>40_openecomp-release</activeProfile> - <activeProfile>50_openecomp-snapshots</activeProfile> - <activeProfile>60_opendaylight-release</activeProfile> - <activeProfile>70_opendaylight-snapshots</activeProfile> - <activeProfile>80_onap</activeProfile> - </activeProfiles> -</settings> diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions deleted file mode 100755 index f40761f59..000000000 --- a/bootstrap/vagrant-onap/lib/functions +++ /dev/null @@ -1,450 +0,0 @@ -#!/bin/bash - -source /var/onap/commons -source /var/onap/config/env-vars -source /var/onap/_composed_functions -source /var/onap/_onap_functions - -export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' |sort -n | head -1) -export NIC=$(ip route get 8.8.8.8 | awk '{ print $5; exit }') -export IP_ADDRESS=$(ifconfig $NIC | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) - -mvn_conf_file=/root/.m2/settings.xml - -# configure_dns() - DNS/GW IP address configuration -function configure_dns { - echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head - resolvconf -u -} - -# get_next_ip() - Function that provides the next ip -function get_next_ip { - local ip=${1:-$IP_ADDRESS} - ip_hex=$(printf '%.2X%.2X%.2X%.2X\n' `echo $ip | sed -e 's/\./ /g'`) - next_ip_hex=$(printf %.8X `echo $(( 0x$ip_hex + 1 ))`) - echo $(printf '%d.%d.%d.%d\n' `echo $next_ip_hex | sed -r 's/(..)/0x\1 /g'`) -} - -# _git_timed() - git can sometimes get itself infinitely stuck with transient network -# errors or other issues with the remote end. This wraps git in a -# timeout/retry loop and is intended to watch over non-local git -# processes that might hang. -function _git_timed { - local count=0 - local timeout=0 - - install_package git - until timeout -s SIGINT ${timeout} git "$@"; do - # 124 is timeout(1)'s special return code when it reached the - # timeout; otherwise assume fatal failure - if [[ $? -ne 124 ]]; then - exit 1 - fi - - count=$(($count + 1)) - if [ $count -eq 3 ]; then - exit 1 - fi - sleep 5 - done -} - -# clone_repo() - Clone Git repository into specific folder -function clone_repo { - local repo_url=${3:-"https://git.onap.org/"} - local repo=$1 - local dest_folder=${2:-$git_src_folder/$repo} - if [ ! -d $dest_folder ]; then - if [[ "$debug" == "False" ]]; then - _git_timed clone --quiet ${repo_url}${repo} $dest_folder - else - _git_timed clone ${repo_url}${repo} $dest_folder - fi - fi -} - -# clone_repos() - Function that clones source repositories for a given project -function clone_repos { - local project=$1 - local repo_name=${2:-$project} - - for repo in ${repos[$project]}; do - clone_repo $repo ${src_folders[$project]}${repo#*$repo_name} - done -} - -# _install_bind() - Install bind utils -function _install_bind { - install_packages bind9 bind9utils -} - -# install_java() - Install java binaries -function install_java { - if is_package_installed openjdk-8-jdk; then - return - fi - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - install_package software-properties-common - add-apt-repository -y ppa:openjdk-r/ppa - ;; - rhel|centos|fedora) - ;; - esac - update_repos - - # Remove Java 7 - uninstall_packages default-jre openjdk-7-jdk openjdk-7-jre openjdk-7-jre-headless - - install_package openjdk-8-jdk - # ca-certificates-java is not a dependency in the Oracle JDK/JRE so this must be explicitly installed. - /var/lib/dpkg/info/ca-certificates-java.postinst configure -} - -# install_maven() - Install maven binaries -function install_maven { - if is_package_installed maven3; then - return - fi - install_java - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - install_package software-properties-common - add-apt-repository -y ppa:andrei-pozolotin/maven3 - ;; - rhel|centos|fedora) - ;; - esac - update_repos - install_package maven3 - - # Remove Java 7 - uninstall_package openjdk-7-jdk - - _configure_maven -} - -# _configure_docker_settings() - Configures Docker settings -function _configure_docker_settings { - local docker_conf_backup=/tmp/docker.backup - local docker_conf=/etc/default/docker - local chameleonsocks_filename=chameleonsocks.sh - local max_concurrent_downloads=${1:-3} - - cp ${docker_conf} ${docker_conf_backup} - if [ $http_proxy ]; then - echo "export http_proxy=$http_proxy" >> $docker_conf - fi - if [ $https_proxy ]; then - echo "export https_proxy=$https_proxy" >> $docker_conf - #If you have a socks proxy, then use that to connect to the nexus repo - #via a redsocks container - if [ $socks_proxy ]; then - wget https://raw.githubusercontent.com/crops/chameleonsocks/master/$chameleonsocks_filename - chmod 755 $chameleonsocks_filename - socks=$(echo $socks_proxy | sed -e "s/^.*\///" | sed -e "s/:.*$//") - port=$(echo $socks_proxy | sed -e "s/^.*://") - PROXY=$socks PORT=$port ./$chameleonsocks_filename --install - rm $chameleonsocks_filename - cp ${docker_conf_backup} ${docker_conf} - fi - fi - rm ${docker_conf_backup} - - echo "DOCKER_OPTS=\"-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --max-concurrent-downloads $max_concurrent_downloads \"" >> $docker_conf - usermod -aG docker $USER - - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - service docker restart - sleep 10 - ;; - rhel|centos|fedora) - ;; - esac -} - -# install_nodejs() - Download and install NodeJS -function install_nodejs { - if is_package_installed nodejs; then - return - fi - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - - install_package nodejs - - # Update NPM to latest version - npm install npm -g -} - -# install_python() - Install Python 2.7 and other tools necessary for development. -function install_python { - install_packages python2.7 python-dev -} - -# _install_pip() - Install Python Package Manager -function _install_pip { - install_python - if ! which pip; then - curl -sL https://bootstrap.pypa.io/get-pip.py | python - fi -} - -# install_python_package() - Install python modules -function install_python_package { - local python_packages=$@ - - _install_pip - pip install $python_packages -} - -# install_python_requirements() - Install a list of python modules defined in requirement.txt file -function install_python_requirements { - local python_project_path=$1 - - _install_pip - pushd $python_project_path - pip install -r requirements.txt - popd -} - -# install_docker() - Download and install docker-engine -function install_docker { - if $(docker version &>/dev/null); then - return - fi - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - install_packages software-properties-common linux-image-extra-$(uname -r) linux-image-extra-virtual apt-transport-https ca-certificates curl - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - add-apt-repository \ - "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) stable" - ;; - rhel|centos|fedora) - ;; - esac - update_repos - - install_package docker-ce - _configure_docker_settings -} - -# pull_docker_image() - Pull Docker container image from the Public Docker Registry Hub -function pull_docker_image { - install_docker - local image=$1 - local tag=$2 - docker pull ${image} - if [ ${tag} ]; then - docker tag ${image} $tag - fi -} - -# wait_docker_pull() - Function that waits for all docker pull processes -function wait_docker_pull { - local counter=60 - local delay=${1:-60} - - sleep $delay - while [ $(ps -ef | grep "docker pull" | wc -l) -gt 1 ]; do - sleep $delay - counter=$((counter - 1)) - if [ "$counter" -eq 0 ]; then - break - fi - done -} - -# run_docker_image() - Starts a Docker instance -function run_docker_image { - install_docker - docker run $@ -} - -# run_docker_compose() - Ensures that docker compose is installed and run it in background -function run_docker_compose { - local folder=$1 - - install_docker_compose - pushd $folder - /opt/docker/docker-compose up -d - popd -} - -# install_docker_compose() - Download and install docker-engine -function install_docker_compose { - local docker_compose_version=${1:-1.12.0} - if [ ! -d /opt/docker ]; then - mkdir /opt/docker - curl -L https://github.com/docker/compose/releases/download/$docker_compose_version/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose - chmod +x /opt/docker/docker-compose - fi -} - -# install_chefdk() - Install ChefDK package -function install_chefdk { - local chefdk_version="2.4.17" - - if is_package_installed chefdk; then - return - fi - pushd $(mktemp -d) - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - chefdk_pkg="chefdk_$chefdk_version-1_amd64.deb" - chefdk_url="https://packages.chef.io/files/stable/chefdk/$chefdk_version/ubuntu/$VERSION_ID/$chefdk_pkg" - - wget $chefdk_url - dpkg -i $chefdk_pkg - apt-get install -f -y - ;; - rhel|centos|fedora) - rpm -Uvh "https://packages.chef.io/files/stable/chefdk/$chefdk_version/el/7/chefdk-$chefdk_version-1.el7.x86_64.rpm" - ;; - esac - popd -} - -# _install_ODL() - Download and Install OpenDayLight SDN controller -function _install_ODL { - if [ ! -d /opt/opendaylight/current ]; then - mkdir -p /opt/opendaylight/ - wget "https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/integration/distribution-karaf/"$odl_version"/distribution-karaf-"$odl_version".tar.gz" -P /opt/ - tar xvf "/opt/distribution-karaf-"$odl_version".tar.gz" -C /tmp/ - mv "/tmp/distribution-karaf-"$odl_version /opt/opendaylight/current - rm -rf "/opt/distribution-karaf-"$odl_version".tar.gz" - fi -} - -# start_ODL() - Start OpenDayLight SDN controller -function start_ODL { - _install_ODL - if [ -d /opt/opendaylight ]; then - export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre - /opt/opendaylight/current/bin/start - sleep 180 - /opt/opendaylight/current/bin/client feature:install odl-dlux-all - fi -} - -# compile_src() - Function that compiles the java source code thru maven -function compile_src { - local src_folder=$1 - pushd $src_folder - local mvn_build='mvn clean install -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none' - if [[ "$debug" == "False" ]]; then - mvn_build+=" -q" - fi - if [ -f pom.xml ]; then - install_maven - echo "Compiling $src_folder folder..." - eval $mvn_build - fi - popd -} - -# compile_repos() - Function that compiles source repositories for a given project -function compile_repos { - local project=$1 - - for repo in ${repos[$project]}; do - compile_src ${src_folders[$project]}${repo#*$project} - done -} - -# build_docker_image() - Build Docker container image from source code -function build_docker_image { - local src_folder=$1 - local profile=$2 - install_docker - pushd $src_folder - - if [ -f pom.xml ]; then - install_maven - # Cleanup external repo - sed -i 's|${docker.push.registry}/||g' pom.xml - local docker_build="mvn clean package docker:build -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true" - if [ $profile ]; then - docker_build+=" -P $profile" - fi - if [[ "$debug" == "False" ]]; then - docker_build+=" -q" - fi - if [ $http_proxy ]; then - if ! grep -ql "docker.buildArg.http_proxy" pom.xml ; then - docker_build+=" -Ddocker.buildArg.http_proxy=$http_proxy" - fi - if ! grep -ql "docker.buildArg.HTTP_PROXY" pom.xml ; then - docker_build+=" -Ddocker.buildArg.HTTP_PROXY=$http_proxy" - fi - fi - if [ $https_proxy ]; then - if ! grep -ql "docker.buildArg.https_proxy" pom.xml ; then - docker_build+=" -Ddocker.buildArg.https_proxy=$https_proxy" - fi - if ! grep -ql "docker.buildArg.HTTPS_PROXY" pom.xml ; then - docker_build+=" -Ddocker.buildArg.HTTPS_PROXY=$https_proxy" - fi - fi - elif [ -f Dockerfile ]; then - # NOTE: Workaround for dmmapbc images - sed -i '/LocalKey/d' Dockerfile - sed -i "s/nexus3.onap.org\:10003\///g" Dockerfile - local docker_build="docker build -t $profile -f ./Dockerfile ." - if [ $http_proxy ]; then - docker_build+=" --build-arg http_proxy=$http_proxy" - docker_build+=" --build-arg HTTP_PROXY=$http_proxy" - fi - if [ $https_proxy ]; then - docker_build+=" --build-arg https_proxy=$https_proxy" - docker_build+=" --build-arg HTTPS_PROXY=$https_proxy" - fi - fi - echo $docker_build - eval $docker_build - popd -} - -# mount_external_partition() - Create partition and mount the external volume -function mount_external_partition { - local dev_name="/dev/$1" - local mount_dir=$2 - - sfdisk $dev_name << EOF -; -EOF - mkfs -t ext4 ${dev_name}1 - mkdir -p $mount_dir - mount ${dev_name}1 $mount_dir - echo "${dev_name}1 $mount_dir ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab -} - -# add_no_proxy_value() - Add no_proxy values into environment file, used for internal IPs generated at deploy time -function add_no_proxy_value { - if [[ `grep "no_proxy" /etc/environment` ]]; then - sed -i.bak "s/^no_proxy.*$/&,$1/" /etc/environment - else - echo "no_proxy=$1" >> /etc/environment - fi - if [[ `grep "NO_PROXY" /etc/environment` ]]; then - sed -i.bak "s/^NO_PROXY.*$/&,$1/" /etc/environment - else - echo "NO_PROXY=$1" >> /etc/environment - fi -} - diff --git a/bootstrap/vagrant-onap/lib/mr b/bootstrap/vagrant-onap/lib/mr deleted file mode 100755 index bba748618..000000000 --- a/bootstrap/vagrant-onap/lib/mr +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# get_mr_images() - Function that retrieves the Message Router Docker images -function get_mr_images { - pull_docker_image attos/dmaap - pull_docker_image wurstmeister/zookeeper -} - -# install_message_router() - Downloads and configure message router source code -function install_message_router { - install_docker_compose - - pushd ${src_folders[mr]} - bash deploy.sh - popd -} - -# init_mr() - Function that initialize Message Router services -function init_mr { - if [[ "$clone_repo" == "True" ]]; then - clone_repo dcae/demo/startup/message-router ${src_folders[mr]} - fi - if [[ "$skip_get_images" == "False" ]]; then - get_mr_images - if [[ "$skip_install" == "False" ]]; then - install_message_router - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/msb b/bootstrap/vagrant-onap/lib/msb deleted file mode 100755 index bcf27fe75..000000000 --- a/bootstrap/vagrant-onap/lib/msb +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_msb_images() - Function that creates Microservices Docker images from source code -function _build_msb_images { - if [[ "$compile_repo" != "True" ]]; then - compile_repos "msb" - fi - - build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/basedocker onap/msb/msb_base - build_docker_image ${src_folders[msb]}/apigateway/distributions/msb-apigateway/src/main/docker onap/msb/msb_apigateway - build_docker_image ${src_folders[msb]}/discovery/distributions/msb-discovery/src/main/docker onap/msb/msb_discovery -} - -# get_msb_images() - Function that retrieves the Microservices Bus images -function get_msb_images { - pull_docker_image "consul:0.9.3" - if [[ "$build_image" == "True" ]]; then - _build_msb_images - else - unset docker_version - for image in base apigateway discovery; do - pull_onap_image msb/msb_$image - done - fi -} - -# install_msb() - Downloads and configure Microservices Bus source code -function install_msb { - run_docker_image -d --net=host --name msb_consul consul:0.9.3 - run_docker_image -d --net=host --name msb_discovery nexus3.onap.org:10001/onap/msb/msb_discovery - run_docker_image -d --net=host -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway -} - -# init_msb() - Function that initialize Message Router services -function init_msb { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "msb" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "msb" - fi - fi - if [[ "$skip_get_images" == "False" ]]; then - get_msb_images - if [[ "$skip_install" == "False" ]]; then - install_msb - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/mso b/bootstrap/vagrant-onap/lib/mso deleted file mode 100755 index 6dd0676eb..000000000 --- a/bootstrap/vagrant-onap/lib/mso +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# get_mso_images() - Function that retrieves or create MSO Docker images -function get_mso_images { - if [[ "$build_image" == "True" ]]; then - export GIT_NO_PROJECT=/opt/ - compile_src ${src_folders[mso]} - build_docker_image ${src_folders[mso]}/packages/docker docker - fi -} - -# install_mso() - Install MSO Docker configuration project -function install_mso { - MSO_ENCRYPTION_KEY=$(cat /opt/mso/docker-config/encryption.key) - echo -n "$openstack_api_key" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt - - # Deployments in OpenStack require a keystone file - if [ -e /opt/config/keystone.txt ]; then - KEYSTONE_URL=$(cat /opt/config/keystone.txt) - DCP_CLLI="DEFAULT_KEYSTONE" - AUTH_TYPE="USERNAME_PASSWORD" - else - KEYSTONE_URL="https://identity.api.rackspacecloud.com/v2.0" - DCP_CLLI="RAX_KEYSTONE" - AUTH_TYPE="RACKSPACE_APIKEY" - fi - - # 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": "$DCP_CLLI", - "identity_url": "$KEYSTONE_URL", - "mso_id": "$openstack_username", - "mso_pass": "$openstack_password", - "admin_tenant": "service", - "member_role": "admin", - "tenant_metadata": "true", - "identity_server_type": "KEYSTONE", - "identity_authentication_type": "$AUTH_TYPE" - } - ] - } - } -} -EOF - export MSO_CONFIG_UPDATES - export MSO_DOCKER_IMAGE_VERSION=$docker_version - - install_docker - install_docker_compose - # Deploy the environment - pushd ${src_folders[mso]}/docker-config - chmod +x deploy.sh - if [[ "$build_image" == "True" ]]; then - bash deploy.sh - else - # This script takes in input 2 nexus repos (the first one for the MSO image, the second one for mariadb) - bash deploy.sh $nexus_docker_repo $nexus_username $nexus_password $nexus_docker_repo $nexus_username $nexus_password - fi - popd -} - -# init_mso() - Function that initialize MSO services -function init_mso { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "mso" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "mso" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_mso_images - if [[ "$skip_install" == "False" ]]; then - install_mso - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/multicloud b/bootstrap/vagrant-onap/lib/multicloud deleted file mode 100755 index ff6f9708c..000000000 --- a/bootstrap/vagrant-onap/lib/multicloud +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -openstack_release="newton" - -# _build_multicloud_images() - Function that builds docker images from source code -function _build_multicloud_images { - install_docker - pushd ${src_folders[multicloud]}/openstack/$openstack_release - install_python_requirements . - python setup.py develop - #bash build_image.sh - popd -} - -# get_multicloud_images() - -function get_multicloud_images { - if [[ "$build_image" == "True" ]]; then - _build_multicloud_images - else - pull_onap_image multicloud/openstack-$openstack_release - fi -} - -# install_multicloud() - -function install_multicloud { - #run_docker_compose ${src_folders[multicloud]}/openstack/$openstack_release - if [[ "$build_image" == "True" ]]; then - multicloud-api --port 9003 --host 0.0.0.0 & - else - docker_id=`docker images | grep onap/multicloud/openstack-$openstack_release | grep latest | awk '{print $3; exit}'` - docker run -d -p 0.0.0.0:9003:9003 $docker_id - fi -} - -# init_multicloud() - Function that initialize Multi Cloud services -function init_multicloud { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "multicloud" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "multicloud" - fi - fi - if [[ "$skip_get_images" == "False" ]]; then - get_multicloud_images - if [[ "$skip_install" == "False" ]]; then - install_multicloud - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/oom b/bootstrap/vagrant-onap/lib/oom deleted file mode 100755 index d52c029e4..000000000 --- a/bootstrap/vagrant-onap/lib/oom +++ /dev/null @@ -1,207 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -RANCHER_PORT=8880 -oom_delay=30 -export RANCHER_URL=http://localhost:$RANCHER_PORT -export RANCHER_ACCESS_KEY='access_key' -export RANCHER_SECRET_KEY='secret_key' - -# _install_docker() - Function that installs Docker version for Rancher -function _install_docker { - if ! $(docker version &>/dev/null); then - curl https://releases.rancher.com/install-docker/1.12.sh | sh - _configure_docker_settings 15 - fi -} - -# _pull_rancher_images() - Function that retrieves Rancher images required for k8s -function _pull_rancher_images { - for image in "net:v0.13.5" "k8s:v1.8.5-rancher3" \ -"lb-service-rancher:v0.7.17" "network-manager:v0.7.18" "metadata:v0.9.5" \ -"kubectld:v0.8.5" "kubernetes-agent:v0.6.6" "dns:v0.15.3" \ -"kubernetes-auth:v0.0.8" "healthcheck:v0.3.3" "etcd:v2.3.7-13" \ -"etc-host-updater:v0.0.3" "net:holder"; do - pull_docker_image rancher/$image & - done -} - -# _pull_k8s_images() - Function that retrieves Google k8s images -function _pull_k8s_images { - for image in "kubernetes-dashboard-amd64:v1.7.1" \ -"k8s-dns-sidecar-amd64:1.14.5" "k8s-dns-kube-dns-amd64:1.14.5" \ -"k8s-dns-dnsmasq-nanny-amd64:1.14.5" "heapster-influxdb-amd64:v1.3.3" \ -"heapster-grafana-amd64:v4.4.3" "heapster-amd64:v1.4.0" "pause-amd64:3.0"; do - pull_docker_image gcr.io/google_containers/$image & - done -} - -# _install_rancher() - Function that installs Rancher CLI and container -function _install_rancher { - local rancher_version=v0.6.5 - local rancher_server_version=v1.6.10 - local rancher_server=rancher/server:$rancher_server_version - - if [ ! -d /opt/rancher/current ]; then - mkdir -p /opt/rancher/current - wget https://github.com/rancher/cli/releases/download/$rancher_version/rancher-linux-amd64-$rancher_version.tar.gz - tar -xzf rancher-linux-amd64-$rancher_version.tar.gz -C /tmp - mv /tmp/rancher-$rancher_version/rancher /opt/rancher/current/ - fi - - _install_docker - pull_docker_image $rancher_server - run_docker_image -d --restart=unless-stopped -p $RANCHER_PORT:8080 $rancher_server - while true; do - if curl --fail -X GET $RANCHER_URL; then - break - fi - echo "waiting for racher" - sleep $oom_delay - done -} - -# _install_kubernetes() - Function that deploys kubernetes via RancherOS host registration -function _install_kubernetes { - local rancher_agent_version=v1.2.7 - local rancher_agent=rancher/agent:$rancher_agent_version - - _install_rancher - - _pull_rancher_images - _pull_k8s_images - pull_docker_image $rancher_agent - wait_docker_pull - - pushd /opt/rancher/current/ - export RANCHER_ENVIRONMENT=`./rancher env create -t kubernetes onap_on_kubernetes` - popd - - install_python_package rancher-agent-registration - export no_proxy=$no_proxy,$IP_ADDRESS - rancher-agent-registration --host-ip $IP_ADDRESS --url http://$IP_ADDRESS:$RANCHER_PORT --environment $RANCHER_ENVIRONMENT --key $RANCHER_ACCESS_KEY --secret $RANCHER_SECRET_KEY -} - -# _install_kubectl() - Function that installs kubectl as client for kubernetes -function _install_kubectl { - if ! $(kubectl version &>/dev/null); then - rm -rf ~/.kube - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl - chmod +x ./kubectl - mv ./kubectl /usr/local/bin/kubectl - mkdir ~/.kube - pushd ~/.kube - python /var/onap/files/kubectl_config_generator.py - popd - fi -} - -# _install_helm() - Function that install Kubernetes Package Manager -function _install_helm { - local helm_version=v2.3.0 - - if ! $(helm version &>/dev/null); then - wget http://storage.googleapis.com/kubernetes-helm/helm-${helm_version}-linux-amd64.tar.gz - tar -zxvf helm-${helm_version}-linux-amd64.tar.gz -C /tmp - mv /tmp/linux-amd64/helm /usr/local/bin/helm - helm init - fi -} - -# _pull_images_from_yaml() - Function that parses a yaml file and pull their images -function _pull_images_from_yaml_file { - local values_file=$1 - local prefix=$2 - local s='[[:space:]]*' - local w='[a-zA-Z0-9_]*' - fs=`echo @|tr @ '\034'` - - for line in $(sed -ne "s|^\($s\):|\1|" \ --e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ --e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $values_file | -awk -F$fs '{ -indent = length($1)/2; -vname[indent] = $2; -for (i in vname) { - if (i > indent) { - delete vname[i]} - } - if (length($3) > 0) { - vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])(".")} - printf("%s%s%s=%s\n", "'$prefix'",vn, $2, $3); - } -}' | grep image); do - echo $line - if echo $line | grep -q Version ; then - pull_docker_image "$image_name:$(echo $line | awk -F "=" '{print $2}')" & - else - image_name=`echo ${line#*=}` - if [[ ${image_name#*${nexus_docker_repo:-nexus3.onap.org:10001}} == *:* ]]; then - pull_docker_image $image_name & - else - pull_docker_image $image_name:latest - fi - fi - done -} - -# get_oom_images() - Function that retrieves ONAP images from official hub -function get_oom_images { - if [[ "$build_image" == "True" ]]; then - # TODO(electrocucaracha): Create a function for calling the build docker function of every ONAP project - echo "Not Implemented" - else - if [[ "$clone_repo" != "True" ]]; then - clone_repos "oom" - fi - - docker_openecomp_login - for values_file in `find ${src_folders[oom]}/kubernetes -name values.yaml -type f`; do - _pull_images_from_yaml_file $values_file - done - docker logout - wait_docker_pull - fi -} - -# _install_oom() - Function that clones OOM and deploys ONAP -function install_oom { - if [[ "$clone_repo" != "True" ]]; then - clone_repos "oom" - fi - pushd ${src_folders[oom]}/kubernetes/oneclick - source setenv.bash - - pushd ${src_folders[oom]}/kubernetes/config - cp onap-parameters-sample.yaml onap-parameters.yaml - ./createConfig.sh -n onap - popd - - for app in consul msb mso message-router sdnc vid robot portal policy appc aai sdc dcaegen2 log cli multicloud clamp vnfsdk uui aaf vfc kube2msb; do - ./createAll.bash -n onap -a $app - done - popd -} - -# init_oom() - Function that deploys ONAP using OOM -function init_oom { - mount_external_partition sda /var/lib/docker/ - _install_kubernetes - _install_kubectl - _install_helm - if [[ "$clone_repo" == "True" ]]; then - clone_repos "oom" - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_oom_images - if [[ "$skip_install" == "False" ]]; then - until kubectl cluster-info; do - echo "waiting for kubernetes host" - sleep $oom_delay - done - install_oom - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/openstack b/bootstrap/vagrant-onap/lib/openstack deleted file mode 100755 index 5e5189086..000000000 --- a/bootstrap/vagrant-onap/lib/openstack +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -kolla_config=/etc/kolla -kolla_build=$kolla_config/kolla-build.conf -kolla_passwords=$kolla_config/passwords.yml -kolla_globals=$kolla_config/globals.yml -kolla_inventory=/var/onap/files/all-in-one - -# install_dependencies() - Function that installs Kolla-Ansible requirements -function install_dependencies { - install_docker - - mkdir -p /etc/systemd/system/docker.service.d - tee /etc/systemd/system/docker.service.d/kolla.conf <<-'EOF' -[Service] -MountFlags=shared -EOF - systemctl daemon-reload - systemctl restart docker - - install_python_package ansible docker kolla-ansible python-openstackclient -} - -# configure_deploy() - Function that modifies configuration files -function configure_deploy { - local network_id=$1 - local enable_opendaylight=${2-False} - local openstack_services="main = ceilometer,cinder,glance,heat,horizon,isci,keystone,neutron,nova-,swift" - nic=$(ip route get $network_id | awk '{ print $4; exit }') - ip_address=$(ip route get $network_id | awk '{ print $6; exit }') - internal_vip_address=$(get_next_ip $ip_address) - - if [[ `env | grep -i "proxy"` ]]; then - add_no_proxy_value $internal_vip_address - fi - - mkdir -p $kolla_config - cp /var/onap/files/globals.yml $kolla_globals - cp /var/onap/files/passwords.yml $kolla_passwords - cp /var/onap/files/kolla-build.conf $kolla_build - kolla-genpwd - echo "network_interface: \"$nic\"" >> $kolla_globals - echo "kolla_internal_vip_address: \"$internal_vip_address\"" >> $kolla_globals - echo "api_interface: \"{{ network_interface }}\"" >> $kolla_globals - if [[ $enable_opendaylight == True ]]; then - echo "enable_opendaylight: \"yes\"" >> $kolla_globals - openstack_services+=",opendaylight" - fi - echo $openstack_services >> $kolla_build - - echo "$ip_address $(hostname)" >> /etc/hosts -} - -# get_openstack_images() - Function that retrieves or builds docker images -function get_openstack_images { - if [[ "$build_image" == "True" ]]; then - install_python_package kolla - kolla-build --config-file $kolla_build - else - kolla-ansible pull -i $kolla_inventory - fi -} - -# deploy_openstack() - Function that provisions an OpenStack deployment -function deploy_openstack { - install_dependencies - configure_deploy ${1:-"192.168.53.0"} "True" - - get_openstack_images - kolla-ansible deploy -i $kolla_inventory - kolla-ansible post-deploy - echo "source /etc/kolla/admin-openrc.sh" >> ${HOME}/.bashrc -} diff --git a/bootstrap/vagrant-onap/lib/policy b/bootstrap/vagrant-onap/lib/policy deleted file mode 100755 index 1e633bef1..000000000 --- a/bootstrap/vagrant-onap/lib/policy +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_policy_images() - Function that build Policy docker images from source code -function _build_policy_images { - compile_src ${src_folders[policy]}/docker - pushd ${src_folders[policy]}/docker - install_maven - mvn prepare-package - cp -r target/policy-pe/* policy-pe/ - cp -r target/policy-drools/* policy-drools - install_docker - bash docker_verify.sh - popd -} - -# get_policy_images() - Function that retrieves Policy docker images -function get_policy_images { - if [[ "$build_image" == "True" ]]; then - _build_policy_images - else - for image in db pe drools nexus; do - pull_onap_image policy/policy-$image onap/policy/policy-$image:latest - done - fi -} - -# install_policy() - Function that clones and installs the Policy services from source code -function install_policy { - pushd ${src_folders[policy]}/docker - chmod +x config/drools/drools-tweaks.sh - echo $IP_ADDRESS > config/pe/ip_addr.txt - run_docker_compose . - popd -} - -# init_policy() - Function that initialize Policy services -function init_policy { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "policy" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "policy" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_policy_images - if [[ "$skip_install" == "False" ]]; then - install_policy - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/portal b/bootstrap/vagrant-onap/lib/portal deleted file mode 100755 index fe5469822..000000000 --- a/bootstrap/vagrant-onap/lib/portal +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# clone_all_portal_repos() - Function that clones Portal source repo. -function clone_all_portal_repos { - for repo in ${repos[portal]}; do - if [[ "$repo" == "ui/dmaapbc" ]];then - prefix="ui" - else - prefix="portal" - fi - clone_repo $repo ${src_folders[portal]}/${repo#*$prefix} - done -} - -# compile_all_portal_repos() - Function that compiles Portal source repo. -function compile_all_portal_repos { - for repo in ${repos[portal]}; do - if [[ "$repo" == "ui/dmaapbc" ]];then - prefix="ui" - else - prefix="portal" - fi - compile_src ${src_folders[portal]}/${repo#*$prefix} - done -} - -# _build_portal_images() - Function that builds Portal Docker images from source code -function _build_portal_images { - install_maven - - pushd ${src_folders[portal]}/deliveries - chmod +x *.sh - export MVN=$(which mvn) - export GLOBAL_SETTINGS_FILE=/usr/share/maven3/conf/settings.xml - export SETTINGS_FILE=$HOME/.m2/settings.xml - bash build_portalapps_dockers.sh - popd -} - -# get_portal_images() - Function to get Portal images. -function get_portal_images { - if [[ "$build_image" == "True" ]]; then - _build_portal_images - else - pull_openecomp_image portaldb ecompdb:portal - pull_openecomp_image portalapps ep:1610-1 - fi - pull_docker_image mariadb -} - -# _install_mariadb() - Pull and create a MariaDB container -function _install_mariadb { - docker create --name data_vol_portal -v /var/lib/mysql mariadb -} - -# install_portal() - Function that installs the source code of Portal -function install_portal { - install_docker - docker rm -f ecompdb_portal - docker rm -f 1610-1 - - pushd ${src_folders[portal]}/deliveries - mkdir -p /PROJECT/OpenSource/UbuntuEP/logs - install_package unzip - unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/ - - _install_mariadb - install_docker_compose - bash portal_vm_init.sh - - sleep 180 - - if [ ! -e /opt/config/boot.txt ]; then - install_package mysql-client - mysql -u root -p'Aa123456' -h $IP_ADDRESS < Apps_Users_OnBoarding_Script.sql - echo "yes" > /opt/config/boot.txt - fi - popd -} - -# init_portal() - Function that initialize Portal services -function init_portal { - if [[ "$clone_repo" == "True" ]]; then - clone_all_portal_repos - if [[ "$compile_repo" == "True" ]]; then - compile_all_portal_repos - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_portal_images - if [[ "$skip_install" == "False" ]]; then - install_portal - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/robot b/bootstrap/vagrant-onap/lib/robot deleted file mode 100755 index 70f8cf704..000000000 --- a/bootstrap/vagrant-onap/lib/robot +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _setup_ete_folder() - Create and copy ete folder structure -function _setup_ete_folder { - mkdir -p /opt/eteshare/config - - cp ${src_folders[robot]}/integration_* /opt/eteshare/config - cp ${src_folders[robot]}/vm_config2robot.sh /opt/eteshare/config - cp ${src_folders[robot]}/ete.sh /opt - cp ${src_folders[robot]}/demo.sh /opt - - chmod +x /opt/ete.sh - chmod +x /opt/demo.sh -} - -# get_robot_images() - Pull or build the Robot Docker images -function get_robot_images { - pull_openecomp_image testsuite -} - -# install_robot() - Run Robot services -function install_robot { - docker rm -f openecompete_container - run_docker_image -d --name openecompete_container -v /opt/eteshare:/share -p 88:88 $nexus_docker_repo/openecomp/testsuite:$docker_version -} - -# init_robot() - Function that initialize Robot services -function init_robot { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "robot" "testsuite" - _setup_ete_folder - if [[ "$compile_repo" == "True" ]]; then - compile_repos "robot" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_robot_images - if [[ "$skip_install" == "False" ]]; then - install_robot - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc deleted file mode 100755 index 71a5fea86..000000000 --- a/bootstrap/vagrant-onap/lib/sdc +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _init_data_folders() - Function that initialize the data folders -function _init_data_folders { - mkdir -p /data/environments - mkdir -p /data/scripts - mkdir -p /data/logs/BE - mkdir -p /data/logs/FE - chmod 777 /data - chmod 777 /data/logs -} - -# _setup_docker_aliases() - Function that setups the aliases required by sdc scripts -function _setup_docker_aliases { - cat <<EOL > /root/.bash_aliases -alias dcls='/data/scripts/docker_clean.sh \$1' -alias dlog='/data/scripts/docker_login.sh \$1' -alias drun='/data/scripts/docker_run.sh' -alias health='/data/scripts/docker_health.sh' -EOL -} - -# get_sdc_images() - Function that retrieves the SDC docker images -function get_sdc_images { - build_docker_image ${src_folders[sdc]}/sdc-docker-base - build_docker_image ${src_folders[sdc]}/utils/webseal-simulator docker - if [[ "$build_image" == "True" ]]; then - compile_src ${src_folders[sdc]} - for project in catalog-fe test-apis-ci; do - compile_src ${src_folders[sdc]}/$project - done - build_docker_image ${src_folders[sdc]}/sdc-os-chef docker - else - for image in elasticsearch init-elasticsearch cassandra kibana backend frontend sanity; do - pull_onap_image sdc-$image & - done - wait_docker_pull - fi -} - -# install_sdc() - Function that pull templates and executes -function install_sdc { - local ENV_NAME=$dmaap_topic - local MR_IP_ADDR='10.0.11.1' - - pushd ${src_folders[sdc]}/utils/webseal-simulator - bash scripts/simulator_docker_run.sh - popd - - _init_data_folders - - cp ${src_folders[sdc]}/sdc-os-chef/scripts/{docker_run.sh,docker_health.sh,docker_login.sh,docker_clean.sh,simulator_docker_run.sh} /data/scripts - chmod +x /data/scripts/*.sh - - cat ${src_folders[sdc]}/sdc-os-chef/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json - sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json - sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json - sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" /data/environments/$ENV_NAME.json - - install_docker - if [[ "$skip_get_images" == "False" ]]; then - bash /data/scripts/docker_run.sh -e $ENV_NAME -l - else - bash /data/scripts/docker_run.sh -e $ENV_NAME -r $docker_version -p $(echo $nexus_docker_repo | cut -d':' -f2) - fi - install_chefdk -} - -# init_sdc() - Function that initialize SDC services -function init_sdc { - mount_external_partition sdb /data/ - if [[ "$clone_repo" == "True" ]]; then - clone_repos "sdc" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "sdc" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_sdc_images - fi - if [[ "$skip_install" == "False" ]]; then - install_sdc - fi - _setup_docker_aliases -} diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc deleted file mode 100755 index 8dacf9e16..000000000 --- a/bootstrap/vagrant-onap/lib/sdnc +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -source /var/onap/functions -source /var/onap/ccsdk - -# compile_all_sdnc_repos() - Function that compiles SDNC source repo. -function compile_all_sdnc_repos { - for repo in ${repos[sdnc]}; do - if [[ "$repo" == "sdnc/core" ]]; then - compile_src ${src_folders[sdnc]}/core/rootpom - fi - compile_src ${src_folders[sdnc]}${repo#*sdnc} - done -} - -# _build_sdnc_images() - Builds SDNC images from source code -function _build_sdnc_images { - local folder=${src_folders[sdnc]}/oam - - get_ccsdk_images - install_package unzip - # The OAM code depends on all the SDNC repos which should be downloaded and compiled first - if [[ "$compile_repo" != "True" ]]; then - compile_src $folder - fi - for dirc in ubuntu sdnc admportal dgbuilder; do - build_docker_image $folder/installation/$dirc - done -} - -# get_sdnc_images() - Build or retrieve necessary images -function get_sdnc_images { - if [[ "$build_image" == "True" ]]; then - _build_sdnc_images - else - for image in sdnc-image admportal-sdnc-image dgbuilder-sdnc-image; do - pull_openecomp_image $image openecomp/$image:latest - done - fi - pull_docker_image mysql/mysql-server:5.6 -} - -# install_sdnc() - Download and install SDNC services from source code -function install_sdnc { - run_docker_compose ${src_folders[sdnc]}/oam/installation/src/main/yaml -} - -# init_sdnc() - Function that initialize SDNC services -function init_sdnc { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "sdnc" - if [[ "$compile_repo" == "True" ]]; then - compile_all_sdnc_repos - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_sdnc_images - if [[ "$skip_install" == "False" ]]; then - start_ODL - install_sdnc - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc deleted file mode 100755 index 64f7df00e..000000000 --- a/bootstrap/vagrant-onap/lib/vfc +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# compile_all_vfc_repos() - Function that compiles VF-C source repo. -function compile_all_vfc_repos { - install_python_package tox - - tox_repos=("gvnfm/vnflcm/lcm" "gvnfm/vnfmgr/mgr" "gvnfm/vnfres/res" "nfvo/lcm" \ - "nfvo/driver/vnfm/gvnfm/gvnfmadapter" "nfvo/driver/vnfm/svnfm/zte/vmanager") - for dirc in ${tox_repos[@]}; do - pushd ${src_folders[vfc]}/$dirc - tox -e py27 - popd - done - - # TODO(sshank): Add compile for other vfc_repos. (Java based.) - - # Java based: - # nfvo/catalog - # nfvo/driver/ems/ems/sems/boco/ems-driver - # nfvo/driver/sfc/zte/sfc-driver - # nfvo/driver/vnfm/gvnfm/juju/juju-vnfmadapter - # nfvo/driver/vnfm/svnfm/huawei/vnfmadapter - # nfvo/resmanagement - # nfvo/wfengine -} - -# _build_vfc_image() - Build VFC docker image -function _build_vfc_image { - pushd ${src_folders[vfc]}/$1/docker - sed -i "s/^push_image/#push_image/g" build_image.sh - sed -i 's|IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"|IMAGE_NAME=${ORG}/${IMAGE}|g' build_image.sh - ./build_image.sh - popd -} - -# get_vfc_images() - Build VFC docker images -function get_vfc_images { - if [[ "$build_image" == "True" ]]; then - install_docker - # Separate methods are required since the image build process will change. - _build_vfc_image gvnfm/vnflcm/lcm onap/nslcm - _build_vfc_image gvnfm/vnfmgr/mgr onap/gvnfmdriver - _build_vfc_image gvnfm/vnfres/res onap/vnfres - _build_vfc_image nfvo/lcm onap/vnflcm - _build_vfc_image nfvo/driver/vnfm/gvnfm/gvnfmadapter - - build_gvnfm_lcm_image - build_gvnfm_vnfmgr_image - build_gvnfm_vnfres_image - build_nfvo_lcm_image - build_nfvo_vnfm_gvnfmadapter_image - # TODO(sshank): Add other VFC component docker image builds. - else - for image in gvnfm/vnflcm/lcm gvnfm/vnfmgr/mgr gvnfm/vnfres/res nfvo/lcm nfvo/driver/vnfm/gvnfm/gvnfmadapter; do - pull_onap_image vfc/$image - done - fi -} - -# install_vfc() - Download and install vfc service from source code -function install_vfc { - nslcm_image=`docker images | grep nslcm | grep latest| awk '{print $1 ":" $2}'` - vnflcm_image=`docker images | grep vnflcm | grep latest| awk '{print $1 ":" $2}'` - vnfmgr_image=`docker images | grep vnfmgr | grep latest| awk '{print $1 ":" $2}'` - vnfres_image=`docker images | grep vnfres | grep latest| awk '{print $1 ":" $2}'` - gvnfmdriver_image=`docker images | grep gvnfmdriver | grep latest| awk '{print $1 ":" $2}'` - - run_docker_image -d --name vfc-nslcm -p 8403:8403 -e MSB_ADDR=127.0.0.1 $nslcm_image - run_docker_image -d --name vfc-vnflcm -p 8801:8801 -e MSB_ADDR=127.0.0.1 $vnflcm_image - run_docker_image -d --name vfc-vnfmgr -p 8803:8803 -e MSB_ADDR=127.0.0.1 $vnfmgr_image - run_docker_image -d --name vfc-vnfres -p 8802:8802 -e MSB_ADDR=127.0.0.1 $vnfres_image - run_docker_image -d --name vfc-gvnfmdriver -p 8484:8484 -e MSB_ADDR=127.0.0.1 $gvnfmdriver_image - - # TODO(sshank): Run other VFC component docker images. -} - -# init_vfc() - Function that initialize VF-C services -function init_vfc { - install_package libmysqlclient-dev - - if [[ "$clone_repo" == "True" ]]; then - clone_repos "vfc" - if [[ "$compile_repo" == "True" ]]; then - compile_all_vfc_repos - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_vfc_images - if [[ "$skip_install" == "False" ]]; then - install_vfc - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/vid b/bootstrap/vagrant-onap/lib/vid deleted file mode 100755 index 0c7ad8536..000000000 --- a/bootstrap/vagrant-onap/lib/vid +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_vid_images() - Function that builds VID docker images -function _build_vid_images { - if [[ "$compile_repo" != "True" ]]; then - compile_src ${src_folders[vid]} - fi - build_docker_image ${src_folders[vid]}/deliveries -} - -# get_vid_images() - Function that retrieves VID docker images -function get_vid_images { - if [[ "$build_image" == "True" ]]; then - _build_vid_images - else - pull_openecomp_image vid - fi - pull_docker_image mariadb:10 -} - -# install_vid() - Download and configure Vid source code -function install_vid { - vid_image=`docker images | grep vid | grep latest| awk '{print $1 ":" $2}'` - - docker rm -f vid-mariadb - docker rm -f vid-server - - run_docker_image --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/lf_config/vid-my.cnf:/etc/mysql/my.cnf -v /opt/vid/lf_config/vid-pre-init.sql:/docker-entrypoint-initdb.d/vid-pre-init.sql -v /var/lib/mysql -d mariadb:10 - run_docker_image -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 $vid_image -} - -# init_vid() - Function that initialize Vid services -function init_vid { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "vid" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "vid" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_vid_images - if [[ "$skip_install" == "False" ]]; then - install_vid - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/vnfsdk b/bootstrap/vagrant-onap/lib/vnfsdk deleted file mode 100755 index ea7fa3332..000000000 --- a/bootstrap/vagrant-onap/lib/vnfsdk +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_vnfsdk_images() - Builds VNFSDK images from source code -function _build_vnfsdk_images { - install_package unzip - pushd ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/deployment/docker/docker-refrepo - build_docker_image . - popd -} - -# get_vnfsdk_images - Function that clones vnfsdk Docker images -function get_vnfsdk_images { - if [[ "$build_image" == "True" ]]; then - # TODO(sshank): Has errors building. - _build_vnfsdk_images - else - pull_docker_image refrepo:1.0-STAGING-latest - pull_docker_image refrepo:latest - fi -} - -# install_vnfsdk - Function that installs vnfsdk Docker images -function install_vnfsdk { - install_docker_compose - pushd ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/deployment/install - /opt/docker/docker-compose up -d - popd -} - -# init_vnfsdk() - Init VNFSDK services -function init_vnfsdk { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "vnfsdk" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "vnfsdk" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_vnfsdk_images - if [[ "$skip_install" == "False" ]]; then - install_vnfsdk - fi - fi -} diff --git a/bootstrap/vagrant-onap/lib/vvp b/bootstrap/vagrant-onap/lib/vvp deleted file mode 100755 index f24431ee6..000000000 --- a/bootstrap/vagrant-onap/lib/vvp +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -source /var/onap/functions - -# _build_vvp_images() - Builds VNFSDK images from source code -function _build_vvp_images { - echo "pass" -} - -# get_vvp_images - Function that clones vvp Docker images -function get_vvp_images { - if [[ "$build_image" == "True" ]]; then - _build_vvp_images - else - pull_docker_image refrepo:1.0-STAGING-latest - pull_docker_image refrepo:latest - fi -} - -# install_vvp - Function that installs vvp Docker images -function install_vvp { - echo "pass" -} - -# init_vvp() - Init VNFSDK services -function init_vvp { - if [[ "$clone_repo" == "True" ]]; then - clone_repos "vvp" - if [[ "$compile_repo" == "True" ]]; then - compile_repos "vvp" - fi - fi - - if [[ "$skip_get_images" == "False" ]]; then - get_vvp_images - if [[ "$skip_install" == "False" ]]; then - install_vvp - fi - fi -} diff --git a/bootstrap/vagrant-onap/tests/_test_base b/bootstrap/vagrant-onap/tests/_test_base deleted file mode 100755 index b30632d26..000000000 --- a/bootstrap/vagrant-onap/tests/_test_base +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -if [[ "$debug" == "True" ]]; then - set -o xtrace -fi - -source /var/onap_tests/asserts -source /var/onap/commons - -# main() - Starting point for Unit Tests -function main { - local covered_functions=("$@") - - update_repos - len=${#covered_functions[@]} - echo "1..$len" - for i in ${!covered_functions[@]}; do - dpkg --get-selections > installed-software - sort -o installed-software installed-software - test_${covered_functions[$i]} - echo "ok $((i+1)) - test_${covered_functions[$i]}" - - # Teardown process - if is_package_installed docker-ce; then - docker images -q | xargs docker rmi -f - fi - dpkg --get-selections > installed-software_new - sort -o installed-software_new installed-software_new - apt-get purge -y -qq $(comm -3 installed-software installed-software_new | awk '{print $1}') - #rm -rf $git_src_folder - #rm -rf ~/.m2/ - done -} diff --git a/bootstrap/vagrant-onap/tests/asserts b/bootstrap/vagrant-onap/tests/asserts deleted file mode 100755 index 441b9f091..000000000 --- a/bootstrap/vagrant-onap/tests/asserts +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/bash - -source /var/onap/commons - -# asserts_http_status_code() - Function that determines if a HTTP status code is retrieved from URL -function asserts_http_status_code { - local url=$1 - local expected_code=${2:-"200"} - - code=$(curl -I $url | head -n 1 | cut -d$' ' -f2) - local error_msg=${3:-"The URL $url responded with $code status code"} - if [[ "$code" != "$expected_code" ]]; then - raise_error $error_msg - fi -} - -# asserts_process() - Function that verifies if a specific process is running -function asserts_process { - local process=$1 - local error_msg=${2:-"There is no $process running process"} - - if [[ "ps -ef | grep $process" == "" ]]; then - raise_error $error_msg - fi -} - -# asserts_java_process() - Function that verifies if a specific java process is running -function asserts_java_process { - local process=$1 - local error_msg=${2:-"There is no $process java running process"} - - install_java - if [[ "jps | grep $process" == "" ]]; then - raise_error $error_msg - fi -} - -# asserts_image_running() - Function that verifies if a specific image is running -function asserts_image_running { - local image=$1 - local error_msg=${2:-"There is no process with $image image running"} - - asserts_image $image - if [[ "$(docker ps -q --filter=ancestor=$image 2> /dev/null)" == "" ]]; then - raise_error $error_msg - fi -} - -# asserts_image() - Function that verifies if a specific image was created -function asserts_image { - local image=$1 - local error_msg=${2:-"There is no $image image"} - - install_docker - if [[ "$(docker images -q $image 2> /dev/null)" == "" ]]; then - raise_error $error_msg - fi -} - -# asserts_installed_package() - Function that verifies if a specific package was installed. -function asserts_installed_package { - local package=$1 - local error_msg=${2:-"$package wasn't installed"} - - if ! is_package_installed $package; then - raise_error $error_msg - fi -} - -# asserts_file_exist() - Function that verifies if a specific file exists -function asserts_file_exist { - local file=$1 - local error_msg=${2:-"$file doesn't exist"} - - if [ ! -f $file ]; then - raise_error $error_msg - fi -} - -# asserts_env_set() - Function that verities that an environment variable is set -function asserts_env_set { - local variable=$1 - local error_msg=${2:-"$variable wasn't set"} - - if [ -z ${variable+x} ]; then - raise_error $error_msg - fi -} - -# raise_error() - Function that prints and exits the execution -function raise_error { - echo $@ - exit 1 -} diff --git a/bootstrap/vagrant-onap/tests/projects.txt b/bootstrap/vagrant-onap/tests/projects.txt deleted file mode 100644 index 0aba508c9..000000000 --- a/bootstrap/vagrant-onap/tests/projects.txt +++ /dev/null @@ -1,209 +0,0 @@ -aaf/authz -aaf/cadi -aaf/inno -aaf/luaplugin -aai/aai-common -aai/aai-config -aai/aai-data -aai/aai-service -aai/babel -aai/champ -aai/data-router -aai/esr-gui -aai/esr-server -aai/gizmo -aai/logging-service -aai/model-loader -aai/resources -aai/rest-client -aai/router-core -aai/search-data-service -aai/sparky-be -aai/sparky-fe -aai/test-config -aai/traversal -appc -appc/deployment -ccsdk/dashboard -ccsdk/distribution -ccsdk/parent -ccsdk/platform/blueprints -ccsdk/platform/nbapi -ccsdk/platform/plugins -ccsdk/sli/adaptors -ccsdk/sli/core -ccsdk/sli/northbound -ccsdk/sli/plugins -ccsdk/storage/esaas -ccsdk/storage/pgaas -ccsdk/utils -ci-management -clamp -cli -dcae -dcae/apod -dcae/apod/analytics -dcae/apod/buildtools -dcae/apod/cdap -dcae/collectors -dcae/collectors/ves -dcae/controller -dcae/controller/analytics -dcae/dcae-inventory -dcae/demo -dcae/demo/startup -dcae/demo/startup/aaf -dcae/demo/startup/controller -dcae/demo/startup/message-router -dcae/dmaapbc -dcae/operation -dcae/operation/utils -dcae/orch-dispatcher -dcae/pgaas -dcae/utils -dcae/utils/buildtools -dcaegen2 -dcaegen2/analytics -dcaegen2/analytics/tca -dcaegen2/collectors -dcaegen2/collectors/snmptrap -dcaegen2/collectors/ves -dcaegen2/deployments -dcaegen2/platform -dcaegen2/platform/blueprints -dcaegen2/platform/cdapbroker -dcaegen2/platform/cli -dcaegen2/platform/configbinding -dcaegen2/platform/deployment-handler -dcaegen2/platform/inventory-api -dcaegen2/platform/plugins -dcaegen2/platform/policy-handler -dcaegen2/platform/registrator -dcaegen2/platform/servicechange-handler -dcaegen2/utils -demo -dmaap/buscontroller -dmaap/datarouter -dmaap/dbcapi -dmaap/messagerouter/dmaapclient -dmaap/messagerouter/messageservice -dmaap/messagerouter/mirroragent -dmaap/messagerouter/msgrtr -doc -doc/tools -ecompsdkos -externalapi/nbi -holmes/common -holmes/dsa -holmes/engine-management -holmes/rule-management -integration -logging-analytics -modeling/modelspec -modeling/toscaparsers -msb/apigateway -msb/discovery -msb/java-sdk -msb/swagger-sdk -mso -mso/chef-repo -mso/docker-config -mso/libs -mso/mso-config -multicloud/azure -multicloud/framework -multicloud/openstack -multicloud/openstack/vmware -multicloud/openstack/windriver -ncomp -ncomp/cdap -ncomp/core -ncomp/docker -ncomp/maven -ncomp/openstack -ncomp/sirius -ncomp/sirius/manager -ncomp/utils -oom -oom/registrator -oparent -optf/cmso -optf/has -optf/osdf -policy/api -policy/common -policy/docker -policy/drools-applications -policy/drools-pdp -policy/engine -policy/gui -policy/pap -policy/pdp -portal -portal/sdk -sdc -sdc/jtosca -sdc/sdc-distribution-client -sdc/sdc-docker-base -sdc/sdc-titan-cassandra -sdc/sdc-tosca -sdc/sdc-workflow-designer -sdnc/adaptors -sdnc/architecture -sdnc/core -sdnc/features -sdnc/northbound -sdnc/oam -sdnc/parent -sdnc/plugins -so -so/chef-repo -so/docker-config -so/libs -so/so-config -testsuite -testsuite/heatbridge -testsuite/properties -testsuite/python-testing-utils -ui -ui/dmaapbc -university -usecase-ui -usecase-ui/server -vfc/gvnfm/vnflcm -vfc/gvnfm/vnfmgr -vfc/gvnfm/vnfres -vfc/nfvo/catalog -vfc/nfvo/driver/ems -vfc/nfvo/driver/sfc -vfc/nfvo/driver/vnfm/gvnfm -vfc/nfvo/driver/vnfm/svnfm -vfc/nfvo/lcm -vfc/nfvo/resmanagement -vfc/nfvo/wfengine -vid -vid/asdcclient -vnfrqts/epics -vnfrqts/guidelines -vnfrqts/requirements -vnfrqts/testcases -vnfrqts/usecases -vnfsdk/compliance -vnfsdk/functest -vnfsdk/lctest -vnfsdk/model -vnfsdk/pkgtools -vnfsdk/refrepo -vnfsdk/validation -vvp/ansible-ice-bootstrap -vvp/cms -vvp/devkit -vvp/documentation -vvp/engagementmgr -vvp/gitlab -vvp/image-scanner -vvp/jenkins -vvp/portal -vvp/postgresql -vvp/test-engine -vvp/validation-scripts diff --git a/bootstrap/vagrant-onap/tests/test_aai b/bootstrap/vagrant-onap/tests/test_aai deleted file mode 100755 index dd027d2bc..000000000 --- a/bootstrap/vagrant-onap/tests/test_aai +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/aai - -covered_functions=( -#"install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "start_aai_microservices" "install_hbase" "install_ajsc_aai" "install_model_loader" -"install_hadoop" "install_haproxy" "clone_all_aai_repos" "compile_aai_repos" "setup_titan" "install_hbase" -) - -# test_install_hadoop() - Verify that Hadoop is downloaded and started properly -function test_install_hadoop { - install_hadoop - - asserts_file_exist /opt/hadoop/current/titan-1.0.0-hadoop1/bin/titan.sh - asserts_java_process Elasticsearch - asserts_java_process GremlinServer - asserts_java_process CassandraDaemon -} - -# test_install_haproxy() - Verify that HAProxy is installed properly -function test_install_haproxy { - install_haproxy - - asserts_installed_package haproxy - asserts_process haproxy -} - -# test_clone_all_aai_repos() - Verify that all the AAI Repos are cloned -function test_clone_all_aai_repos { - clone_repos "aai" - - asserts_file_exist ${src_folders[aai]}/aai-common/pom.xml - asserts_file_exist ${src_folders[aai]}/aai-config/cookbooks/aai-resources/runlist-aai-resources.json - asserts_file_exist ${src_folders[aai]}/aai-data/environments/solo.json - asserts_file_exist ${src_folders[aai]}/aai-service/pom.xml - asserts_file_exist ${src_folders[aai]}/babel/README.md - asserts_file_exist ${src_folders[aai]}/champ/pom.xml - asserts_file_exist ${src_folders[aai]}/data-router/pom.xml - asserts_file_exist ${src_folders[aai]}/esr-gui/pom.xml - asserts_file_exist ${src_folders[aai]}/esr-server/pom.xml - asserts_file_exist ${src_folders[aai]}/gizmo/pom.xml - asserts_file_exist ${src_folders[aai]}/logging-service/pom.xml - asserts_file_exist ${src_folders[aai]}/model-loader/pom.xml - asserts_file_exist ${src_folders[aai]}/resources/pom.xml - asserts_file_exist ${src_folders[aai]}/rest-client/pom.xml - asserts_file_exist ${src_folders[aai]}/router-core/pom.xml - asserts_file_exist ${src_folders[aai]}/search-data-service/pom.xml - asserts_file_exist ${src_folders[aai]}/sparky-be/pom.xml - asserts_file_exist ${src_folders[aai]}/sparky-fe/pom.xml - asserts_file_exist ${src_folders[aai]}/test-config/docker-compose-app.yml - asserts_file_exist ${src_folders[aai]}/traversal/pom.xml -} - -# test_compile_aai_repos() - Verify that all the AAI Repositories complile properly -function test_compile_aai_repos { - clone_repos "aai" - compile_aai_repos - - for common in annotations auth core schema utils; do - asserts_file_exist ${src_folders[aai]}/aai-common/aai-$common/target/aai-$common-1.1.0-SNAPSHOT.jar - done - - for service in common-logging eelf-logging logging-api; do - asserts_file_exist ${src_folders[aai]}/logging-service/$service/target/$service-1.1.0-SNAPSHOT.jar - done - - asserts_file_exist ${src_folders[aai]}/resources/aai-resources/target/aai-resources.jar - asserts_file_exist ${src_folders[aai]}/traversal/aai-traversal/target/traversal.jar -} - -# test_setup_titan() - Verify that Titan Cassandra DB is up and running -function test_setup_titan { - clone_repos "aai" - install_hadoop - setup_titan - - # TODO(electrocucaracha): Validate the DB creation -} - -# test_start_aai_microservices() - Verify that AAI Resources and Traversal images works -function test_start_aai_microservices { - clone_repos "aai" - start_aai_microservices - - # TODO(electrocucaracha): Investigate how to run AAI microservices in background -} - -# test_install_hbase() - Verify that AAI HBase service is up and running properly -function test_install_hbase { - install_hbase - - asserts_image_running aai-hbase-${hbase_version} -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_appc b/bootstrap/vagrant-onap/tests/test_appc deleted file mode 100755 index f567d7f1b..000000000 --- a/bootstrap/vagrant-onap/tests/test_appc +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/appc - -covered_functions=( -"clone_all_appc_repos" "compile_all_appc_repos" "get_appc_images" "install_appc" -) - -# test_clone_all_appc_repos() - Verify that the APPC source code is cloned -function test_clone_all_appc_repos { - clone_repos "appc" - - asserts_file_exist ${src_folders[appc]}/pom.xml - asserts_file_exist ${src_folders[appc]}/deployment/pom.xml -} - -# test_compile_all_appc_repos() - Verify that the APPC source code is compiled properly -function test_compile_all_appc_repos { - clone_repos "appc" - compile_repos "appc" - - for adapter in appc-ansible-adapter appc-chef-adapter appc-dmaap-adapter appc-iaas-adapter appc-netconf-adapter appc-rest-adapter appc-rest-healthcheck-adapter; do - asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/$adapter-bundle/target/$adapter-bundle-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/$adapter-features/target/$adapter-features-*-SNAPSHOT.jar - if [[ "$adapter" == "appc-netconf-adapter" ]]; then - asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/appc-netconf-installer/target/$adapter-*-SNAPSHOT.zip - else - asserts_file_exist ${src_folders[appc]}/appc-adapters/$adapter/$adapter-installer/target/$adapter-*-SNAPSHOT.zip - fi - done - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-dmaap-adapter/appc-message-adapter-api/target/appc-message-adapter-api-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-dmaap-adapter/appc-message-adapter-factory/target/appc-message-adapter-factory-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/target/appc-ssh-adapter-api-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-features/target/appc-ssh-adapter-features-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-sshd/target/appc-ssh-adapter-sshd-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-tests/target/appc-ssh-adapter-tests-*-SNAPSHOT.jar - - #for component in appc-event-listener appc-oam appc-provider; do - for component in appc-event-listener appc-provider; do - asserts_file_exist ${src_folders[appc]}/$component/$component-bundle/target/$component-bundle-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/$component/$component-features/target/$component-features-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/$component/$component-installer/target/$component-*-SNAPSHOT.zip - done - #for component in appc-oam appc-provider; do - for component in appc-provider; do - asserts_file_exist ${src_folders[appc]}/$component/$component-model/target/$component-model-*-SNAPSHOT.jar - done - - asserts_file_exist ${src_folders[appc]}/appc-common/target/appc-common-*-SNAPSHOT.jar - - asserts_file_exist ${src_folders[appc]}/appc-dg/appc-dg-shared/appc-dg-dependency-model/target/appc-dg-dependency-model-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dg/appc-dg-shared/appc-dg-domain-model-lib/target/appc-dg-domain-model-lib-*-SNAPSHOT.jar - - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-command-executor/appc-command-executor-api/target/appc-command-executor-api-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/target/appc-data-access-lib-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/domain-model-lib/target/domain-model-lib-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/target/execution-queue-management-lib-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-license-manager/appc-license-manager-api/target/appc-license-manager-api-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[appc]}/appc-dispatcher/appc-request-handler/appc-request-handler-api/target/appc-request-handler-api-*-SNAPSHOT.jar - - - #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-api/target/appc-lifecycle-management-api-*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-core/target/appc-lifecycle-management-core-*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-features/target/appc-lifecycle-management-features-*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/appc-lifecycle-management-installer/target/appc-lifecycle-management-*-SNAPSHOT.zip - #asserts_file_exist ${src_folders[appc]}/appc-lifecycle-management/state-machine-lib/target/state-machine-lib-*-SNAPSHOT.jar - - asserts_file_exist ${src_folders[appc]}/appc-metric/appc-metric-bundle/target/appc-metric-bundle-*-SNAPSHOT.jar - - asserts_file_exist ${src_folders[appc]}/deployment/platform-logic/installer/target/platform-logic-installer-*-SNAPSHOT.zip -} - -# test_get_appc_images() - Verify that APPC Docker images can be retrieved -function test_get_appc_images { - clone_repos "appc" - get_appc_images - - asserts_image openecomp/appc-image -} - -# test_install_appc() - Verify that the APPC Docker images are up and running -function test_install_appc { - clone_repos "appc" - get_appc_images - install_appc - - asserts_image_running openecomp/appc-image -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_ccsdk b/bootstrap/vagrant-onap/tests/test_ccsdk deleted file mode 100755 index 28de27065..000000000 --- a/bootstrap/vagrant-onap/tests/test_ccsdk +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/ccsdk - -covered_functions=( -"clone_ccsdk_repos" "compile_ccsdk_repos" "get_ccsdk_images" -) - -# test_clone_ccsdk_repos() - Verify that CCSDL repositories are retrieved properly -function test_clone_ccsdk_repos { - clone_repos "ccsdk" - - asserts_file_exist ${src_folders[ccsdk]}/dashboard/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/distribution/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/parent/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/platform/blueprints/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/platform/nbapi/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/platform/plugins/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/sli/core/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/sli/plugins/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/storage/esaas/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/storage/pgaas/pom.xml - asserts_file_exist ${src_folders[ccsdk]}/utils/pom.xml -} - -# test_compile_ccsdk_repos() - Verify the compilation of CCSDK repositories -function test_compile_ccsdk_repos { - clone_repos "ccsdk" - compile_repos "ccsdk" - - asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-common/target/ccsdk-app-common-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-os/target/ccsdk-app-os-1.1.0-SNAPSHOT.war - asserts_file_exist ${src_folders[ccsdk]}/dashboard/ccsdk-app-overlay/target/ccsdk-app-overlay-1.1.0-SNAPSHOT.war - asserts_file_exist ${src_folders[ccsdk]}/distribution/dgbuilder/target/dgbuilder.0.1.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[ccsdk]}/distribution/platform-logic/installer/target/platform-logic-installer-0.1.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[ccsdk]}/platform/nbapi/target/commonnbapi-*.war - - #for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do - #for component in features provider; do - #asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/$adaptor/$component/target/$adaptor-$component-0.1.0-SNAPSHOT.jar - #done - #asserts_file_exist ${src_folders[ccsdk]}/sli/adaptors/$adaptor/installer/target/sdnc-$adaptor-0.1.0-SNAPSHOT-installer.zip - #done - - #for core in dblib filters sli sliapi sliPluginUtils; do - for core in dblib; do - for component in features provider; do - asserts_file_exist ${src_folders[ccsdk]}/sli/core/$core/$component/target/$core-$component-*-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[ccsdk]}/sli/core/$core/installer/target/sdnc-$core-*-SNAPSHOT-installer.zip - done - #asserts_file_exist ${src_folders[ccsdk]}/sli/core/sli/common/target/sli-common-*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[ccsdk]}/sli/core/sli/recording/target/sli-recording-*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[ccsdk]}/sli/core/sliapi/model/target/sliapi-model-*-SNAPSHOT.jar - - for northbound in asdcApi dataChange; do - for component in features model provider; do - asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/$northbound/$component/target/$northbound-$component-*-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/$northbound/installer/target/sdnc-$northbound-*-SNAPSHOT-installer.zip - done - asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/dmaap-listener/target/dmaap-listener-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[ccsdk]}/sli/northbound/ueb-listener/target/ueb-listener-*-SNAPSHOT.jar - - for plugin in properties-node restapi-call-node; do - for component in features provider; do - asserts_file_exist ${src_folders[ccsdk]}/sli/plugins/$plugin/$component/target/$plugin-$component-*-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[ccsdk]}/sli/plugins/$plugin/installer/target/sdnc-$plugin-*-SNAPSHOT-installer.zip - done -} - -# test_get_ccsdk_images() - Verify that CCSDK images are retrieved or built properly -function test_get_ccsdk_images { - clone_repos "ccsdk" - get_ccsdk_images - - for image in dgbuilder odlsli odl ubuntu; do - asserts_image onap/ccsdk-$image-image - done -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_dcae b/bootstrap/vagrant-onap/tests/test_dcae deleted file mode 100755 index 3c5400fa1..000000000 --- a/bootstrap/vagrant-onap/tests/test_dcae +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/dcae - -covered_functions=( -"clone_all_dcae_repos" "compile_all_dcae_repos" "get_dcae_images" "install_dcae" -) - -# test_clone_all_dcae_repos() - Verifies that can retrieve DCAE repositories properly -function test_clone_all_dcae_repos { - clone_repos "dcae" - - asserts_file_exist ${src_folders[dcae]}/apod/README.md - asserts_file_exist ${src_folders[dcae]}/apod/analytics/pom.xml - asserts_file_exist ${src_folders[dcae]}/apod/buildtools/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/apod/cdap/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/collectors/README.md - asserts_file_exist ${src_folders[dcae]}/collectors/ves/pom.xml - asserts_file_exist ${src_folders[dcae]}/controller/pom.xml - asserts_file_exist ${src_folders[dcae]}/controller/analytics/pom.xml - asserts_file_exist ${src_folders[dcae]}/dcae-inventory/pom.xml - asserts_file_exist ${src_folders[dcae]}/demo/pom.xml - asserts_file_exist ${src_folders[dcae]}/demo/startup/README.md - asserts_file_exist ${src_folders[dcae]}/demo/startup/aaf/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/demo/startup/controller/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/demo/startup/message-router/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/dmaapbc/pom.xml - asserts_file_exist ${src_folders[dcae]}/operation/README.md - asserts_file_exist ${src_folders[dcae]}/operation/utils/pom.xml - asserts_file_exist ${src_folders[dcae]}/orch-dispatcher/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/pgaas/LICENSE.txt - asserts_file_exist ${src_folders[dcae]}/utils/README.md - asserts_file_exist ${src_folders[dcae]}/utils/buildtools/LICENSE.txt -} - -# test_compile_all_dcae_repos() - Verify that the DCAE source code is compiled properly -function test_compile_all_dcae_repos { - clone_repos "dcae" - compile_repos "dcae" - - asserts_file_exist ${src_folders[dcae]}/collectors/ves/target/VESCollector-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/analytics/dcae-analytics-cdap-common-model/target/dcae-analytics-cdap-common-model-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-core-model/target/dcae-controller-core-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-core-utils/target/dcae-controller-core-utils-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-operation-utils/target/dcae-controller-operation-utils-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-platform-model/target/dcae-controller-platform-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-core/dcae-controller-platform-server/target/dcae-controller-platform-server-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-manager/target/dcae-controller-service-dmaap-drsub-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-dmaap-drsub/dcae-controller-service-dmaap-drsub-model/target/dcae-controller-service-dmaap-drsub-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/target/dcae-controller-service-standardeventcollector-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/target/dcae-controller-service-standardeventcollector-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service/dcae-controller-service-storage-postgres-model/target/dcae-controller-service-storage-postgres-model-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-adaptor/target/dcae-controller-service-cdap-adaptor-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/target/dcae-controller-service-cdap-cluster-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-model/target/dcae-controller-service-cdap-cluster-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-cdap/dcae-controller-service-cdap-model/target/dcae-controller-service-cdap-model-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-manager/target/dcae-controller-service-common-docker-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-common-docker/dcae-controller-service-common-docker-model/target/dcae-controller-service-common-docker-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-adaptor/target/dcae-controller-service-docker-adaptor-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/target/dcae-controller-service-docker-host-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-model/target/dcae-controller-service-docker-host-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-docker/dcae-controller-service-docker-model/target/dcae-controller-service-docker-model-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-manager/target/dcae-controller-service-common-vm-manager-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-common-vm/dcae-controller-service-common-vm-model/target/dcae-controller-service-common-vm-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-vm-adaptor/target/dcae-controller-service-vm-adaptor-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[dcae]}/controller/dcae-controller-service-vm/dcae-controller-service-vm-model/target/dcae-controller-service-vm-model-1.1.0-SNAPSHOT.jar - - asserts_file_exist ${src_folders[dcae]}/dcae-inventory/target/dcae-inventory-1.1.0.jar - - asserts_file_exist ${src_folders[dcae]}/demo/dcae-demo-controller/target/dcae-demo-controller-1.1.0-SNAPSHOT-runtime.zip - - asserts_file_exist ${src_folders[dcae]}/dmaapbc/target/dcae_dmaapbc.jar - - asserts_file_exist ${src_folders[dcae]}/operation/utils/operation-utils/target/operation-utils-1.1.0-SNAPSHOT.jar -} - -# test_get_dcae_images() - Function that verifies DCAE images are retrieved properly -function test_get_dcae_images { - clone_repos "dcae" - compile_repos "dcae" - get_dcae_images - - asserts_image openecomp/dcae-dmaapbc - #asserts_image dcae/orch-dispatcher - asserts_image dcae-controller - asserts_image dcae-inventory -} - -# test_install_dcae() - Function that verifies that DCAE services are up and running -function test_install_dcae { - clone_repos "dcae" - compile_all_dcae_repos - get_dcae_images - install_dcae - - dcae_image=`docker images | grep dcae-controller | awk '{print $1 ":" $2}'` - asserts_image_running $dcae_image -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_functions b/bootstrap/vagrant-onap/tests/test_functions deleted file mode 100755 index dd482151f..000000000 --- a/bootstrap/vagrant-onap/tests/test_functions +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/functions - -covered_functions=( -"create_configuration_files" "clone_repo" -"configure_bind" "install_java" "install_maven" "install_nodejs" "install_python" -"install_docker" "pull_docker_image" "install_docker_compose" "configure_service" -"start_ODL" "compile_src" "build_docker_image" "docker_openecomp_login" -"pull_openecomp_image" "pull_onap_image" "coverity_repos" "add_no_proxy_value" -) - -# test_create_configuration_files() - Verify the creation of a configuration files -function test_create_configuration_files { - create_configuration_files - - asserts_file_exist /opt/config/nexus_docker_repo.txt - asserts_file_exist /opt/config/nexus_username.txt - asserts_file_exist /opt/config/nexus_password.txt - asserts_file_exist /opt/config/openstack_username.txt - asserts_file_exist /opt/config/tenant_id.txt - asserts_file_exist /opt/config/dmaap_topic.txt - asserts_file_exist /opt/config/docker_version.txt -} - -# test_docker_openecomp_login() - Verify the proper login to OpenECOMP Docker Hub -function test_docker_openecomp_login { - docker_openecomp_login -} - -# test_pull_openecomp_image() - Verify the OpenECOMP container image pulling process -function test_pull_openecomp_image { - local image_name=portal-apps - unset docker_version - pull_openecomp_image $image_name - - asserts_image $nexus_docker_repo/openecomp/$image_name -} - -# test_pull_onap_image() - Verify the ONAP cointainer pulling process -function test_pull_onap_image { - local image_name=portal-apps - unset docker_version - pull_onap_image $image_name - - asserts_image $nexus_docker_repo/onap/$image_name -} - -# test_clone_repo() - Verify cloning and pulling source code from repositories -function test_clone_repo { - clone_repo demo - - asserts_installed_package git - asserts_file_exist $git_src_folder/demo/LICENSE.TXT -} - -# test_configure_bind() - Verify the correct installation and configuration of bind -function test_configure_bind { - configure_bind - - asserts_installed_package bind9 - asserts_installed_package bind9utils - asserts_file_exist /etc/bind/zones/db.simpledemo.openecomp.org - asserts_file_exist /etc/bind/named.conf.options - asserts_file_exist /etc/bind/named.conf.local - - rm -rf /etc/bind/ -} - -# test_install_java() - Verify the correct installation of java -function test_install_java { - install_java - - asserts_installed_package openjdk-8-jdk -} - -# test_install_maven() - Verify the correct installation and configuration of maven -function test_install_maven { - install_maven - - asserts_installed_package maven3 - asserts_installed_package openjdk-8-jdk - asserts_file_exist $mvn_conf_file -} - -# test_install_nodejs() - Verify the correct installation of NodeJS tools -function test_install_nodejs { - install_nodejs - - asserts_installed_package nodejs - asserts_file_exist /usr/bin/npm -} - -# test_install_python() - Verify the correct installation of Python -function test_install_python { - install_python - asserts_installed_package python2.7 - asserts_installed_package python-dev -} - -# test_install_docker() - Verify the correct installation of Docker -function test_install_docker { - install_docker - - asserts_installed_package docker-ce -} - -# test_pull_docker_image() - Verify the correct retrieve of a specific docker image -function test_pull_docker_image { - local image=attos/dmaap - pull_docker_image $image - - asserts_image $image -} - -# test_install_docker_compose() - Verify the correct installation of Docker Compose tool -function test_install_docker_compose { - install_docker_compose - - asserts_file_exist /opt/docker/docker-compose -} - -# test_configure_service() - Verify the correct configuration of a specific init service -function test_configure_service { - local service=mso - - configure_service $service - - asserts_file_exist /etc/init.d/$service - - rm -rf /etc/init.d/$service -} - -# test_start_ODL() - Verify the installation and configuration of OpenDayLight controller -function test_start_ODL { - start_ODL - - asserts_file_exist /opt/opendaylight/current/bin/start -} - -# test_compile_src() - Verify the compilation of java code using maven tools -function test_compile_src { - local repo=vid/asdcclient - clone_repo $repo - compile_src $git_src_folder/$repo - - asserts_file_exist $git_src_folder/$repo/target/asdcclient-1.0.2-SNAPSHOT.jar -} - -# test_build_docker_image() - Verify that a docker image is created from source code -function test_build_docker_image { - clone_repo ccsdk/distribution - build_docker_image $git_src_folder/ccsdk/distribution/ubuntu docker - - asserts_image onap/ccsdk-ubuntu-image -} - -# test_coverity_repos() - Verify that all the repos are covered by scripts -function test_coverity_repos { - pushd /var/onap_tests/ - cp projects.txt remaining_projects.txt - for project in "${repos[@]}"; do - for covered_repo in $project; do - sed -i '/^'${covered_repo//\//\\/}'$/d' remaining_projects.txt - done - done - - threshold=75 - num_projects=$(wc -l < projects.txt) - num_remaining_projects=$(wc -l < remaining_projects.txt) - coverage=`echo "scale=2; 100-($num_remaining_projects/$num_projects*100)" | bc | cut -d . -f 1` - if [ $coverage -lt $threshold ]; then - raise_error "There are repositories that are not covered by scripts" - fi - popd -} - -# test_add_no_proxy_value - Verify that the no_proxy value is correctly set -function test_add_no_proxy_value { - local ip="172.16.0.3" - add_no_proxy_value $ip - - asserts_env_set no_proxy -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_mr b/bootstrap/vagrant-onap/tests/test_mr deleted file mode 100755 index ad1bcd2f5..000000000 --- a/bootstrap/vagrant-onap/tests/test_mr +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/mr - -covered_functions=( -"clone_mr_repos" "get_mr_images" "install_message_router" -) - -# test_clone_mr_repos() - Verify that Message Router repositories are cloned properly -function test_clone_mr_repos { - clone_repo dcae/demo/startup/message-router ${src_folders[mr]} - - asserts_file_exist ${src_folders[mr]}/deploy.sh -} - -# test_get_mr_images() - Verify that Message Router Docker images are retrieved -function test_get_mr_images { - get_mr_images - - asserts_image attos/dmaap - asserts_image wurstmeister/zookeeper -} - -# test_install_message_router() - Verify the built and start of Message Router services -function test_install_message_router { - clone_repo dcae/demo/startup/message-router ${src_folders[mr]} - get_mr_images - install_message_router - - asserts_image_running dockerfiles_kafka -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_msb b/bootstrap/vagrant-onap/tests/test_msb deleted file mode 100755 index 0848d333b..000000000 --- a/bootstrap/vagrant-onap/tests/test_msb +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/msb - -covered_functions=( -"clone_all_msb_repos" "compile_all_msb_repos" "get_msb_images" "install_msb" -) - -# test_clone_all_msb_repos() - Verify the source code retrieve of Microservice Bus project -function test_clone_all_msb_repos { - clone_repos "msb" - - asserts_file_exist ${src_folders[msb]}/apigateway/pom.xml - asserts_file_exist ${src_folders[msb]}/discovery/pom.xml - asserts_file_exist ${src_folders[msb]}/java-sdk/pom.xml - asserts_file_exist ${src_folders[msb]}/swagger-sdk/pom.xml -} - -# test_compile_all_msb_repos() - Verify the correct compilation of MSB project -function test_compile_all_msb_repos { - clone_repos "msb" - compile_repos "msb" - - asserts_file_exist ${src_folders[msb]}/apigateway/apiroute/apiroute-service/target/original-apiroute-service-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[msb]}/apigateway/apiroute/apiroute-standalone/target/apiroute-1.1.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[msb]}/discovery/discovery-ui/target/discovery-ui-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[msb]}/discovery/sdclient/discovery-service/target/original-discovery-service-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[msb]}/java-sdk/target/msb-java-sdk-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[msb]}/swagger-sdk/target/swagger-sdk-1.1.0-SNAPSHOT.jar -} - -# test_get_msb_images() - Verify the creation of MSB Docker images -function test_get_msb_images { - clone_repos "msb" - get_msb_images - - for image in base apigateway discovery; do - asserts_image $nexus_docker_repo/onap/msb/msb_$image - done -} - -# test_install_msb - Verify the execution of MSB Docker images -function test_install_msb { - clone_repos "msb" - get_msb_images - install_msb - - for image in apigateway discovery; do - asserts_image_running $nexus_docker_repo/onap/msb/msb_$image - done - - asserts_http_status_code "http://127.0.0.1:10081/api/microservices/v1/services" - asserts_http_status_code "http://127.0.0.1/api/aai/v8/cloud-infrastructure/cloud-regions" -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_mso b/bootstrap/vagrant-onap/tests/test_mso deleted file mode 100755 index 6a6bef772..000000000 --- a/bootstrap/vagrant-onap/tests/test_mso +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/mso - -covered_functions=( -"clone_all_mso_repos" "compile_all_mso_repos" "get_mso_images" "install_mso" -) - -# test_clone_all_mso_repos() - Verify the source code retrieve of MSO project -function test_clone_all_mso_repos { - clone_repos "mso" - - asserts_file_exist ${src_folders[mso]}/pom.xml - asserts_file_exist ${src_folders[mso]}/chef-repo/LICENSE.txt - asserts_file_exist ${src_folders[mso]}/docker-config/LICENSE.txt - asserts_file_exist ${src_folders[mso]}/libs/pom.xml - asserts_file_exist ${src_folders[mso]}/mso-config/LICENSE.txt -} - -# test_compile_all_mso_repos() - Verify the correct compilation of MSO projects -function test_compile_all_mso_repos { - clone_repos "mso" - compile_repos "mso" - - asserts_file_exist ${src_folders[mso]}/libs/ceilometer-client/target/ceilometer-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/ceilometer-model/target/ceilometer-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/glance-client/target/glance-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/glance-model/target/glance-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/heat-client/target/heat-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/heat-model/target/heat-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/keystone-client/target/keystone-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/keystone-model/target/keystone-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/nova-client/target/nova-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/nova-model/target/nova-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/openstack-client/target/openstack-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/quantum-client/target/quantum-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/quantum-model/target/quantum-model-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/swift-client/target/swift-client-1.1.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[mso]}/libs/swift-model/target/swift-model-1.1.0-SNAPSHOT.jar -} - -# test_get_mso_images() - Verify the creation of MSO Docker images -function test_get_mso_images { - clone_repos "mso" - install_mso - - for image in mso mso-arquillian wildfly ubuntu-update jacoco; do - asserts_image openecomp/$image - done -} - -# test_install_mso - Verify the execution of MSO Docker images -function test_install_mso { - clone_repos "mso" - install_mso - install_mso_docker_config - - asserts_image_running openecomp/mso - asserts_image_running mariadb:10.1.11 -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_multicloud b/bootstrap/vagrant-onap/tests/test_multicloud deleted file mode 100755 index 1b5b85de6..000000000 --- a/bootstrap/vagrant-onap/tests/test_multicloud +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/multicloud - -covered_functions=( -"clone_multicloud_repos" "compile_multicloud_repos" "get_multicloud_images" "install_multicloud" -) - -# test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly -function test_clone_multicloud_repos { - clone_repos "multicloud" - - #asserts_file_exist ${src_folders[multicloud]}/ - asserts_file_exist ${src_folders[multicloud]}/framework/pom.xml - asserts_file_exist ${src_folders[multicloud]}/openstack/pom.xml - asserts_file_exist ${src_folders[multicloud]}/openstack/vmware/pom.xml - asserts_file_exist ${src_folders[multicloud]}/openstack/windriver/pom.xml - #asserts_file_exist ${src_folders[multicloud]}/azure/ -} - -# test_compile_multicloud_repos() - -function test_compile_multicloud_repos { - clone_repos "multicloud" - compile_repos "multicloud" - - asserts_file_exist ${src_folders[multicloud]}/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[multicloud]}/openstack/ocata/target/multicloud-openstack-ocata-1.0.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[multicloud]}/openstack/windriver/target/multicloud-openstack-windriver-1.0.0-SNAPSHOT.zip -} - -# test_get_multicloud_images() - -function test_get_multicloud_images { - clone_repos "multicloud" - get_multicloud_images - - asserts_image onap/multicloud/openstack-$openstack_release -} - -# test_install_multicloud() - Verify the built and start of Multi Cloud services -function test_install_multicloud { - clone_repos "multicloud" - get_multicloud_images - install_multicloud - - # NOTE(electrocucaracha): Depends on https://gerrit.onap.org/r/#/c/23631/ - asserts_http_status_code http://127.0.0.1:9003/api/multicloud-$openstack_release/v0/swagger.json -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_policy b/bootstrap/vagrant-onap/tests/test_policy deleted file mode 100755 index b666cf9db..000000000 --- a/bootstrap/vagrant-onap/tests/test_policy +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/policy - -covered_functions=( -"clone_all_policy_repos" -"compile_all_policy_repos" -"get_policy_images" -"install_policy" -) - -# test_clone_all_policy_repos() - Verify cloning of Policy source code -function test_clone_all_policy_repos { - clone_repos "policy" - - asserts_file_exist ${src_folders[policy]}/api/pom.xml - asserts_file_exist ${src_folders[policy]}/common/pom.xml - asserts_file_exist ${src_folders[policy]}/docker/pom.xml - asserts_file_exist ${src_folders[policy]}/drools-applications/pom.xml - asserts_file_exist ${src_folders[policy]}/drools-pdp/pom.xml - asserts_file_exist ${src_folders[policy]}/engine/pom.xml - asserts_file_exist ${src_folders[policy]}/gui/pom.xml - asserts_file_exist ${src_folders[policy]}/pap/pom.xml - asserts_file_exist ${src_folders[policy]}/pdp/pom.xml -} - -# test_compile_all_policy_repos() - Verify compiling of Policy source code -function test_compile_all_policy_repos { - clone_repos "policy" - compile_repos "policy" - - asserts_file_exist ${src_folders[policy]}/common/common-logging/target/ONAP-Logging-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/common/integrity-audit/target/integrity-audit-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/common/integrity-monitor/target/integrity-monitor-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/common/site-manager/target/site-manager-*-SNAPSHOT.jar - for actor in appc appclcm so test vfc; do - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/actors/actor.$actor/target/actor.$actor-*-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/actors/actorServiceProvider/target/actorServiceProvider-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/eventmanager/target/eventmanager-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/guard/target/guard-*-SNAPSHOT.jar - for module in aai appc appclcm events rest sdc so trafficgenerator vfc; do - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/model-impl/$module/target/$module-*-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/common/policy-yaml/target/policy-yaml-*-SNAPSHOT.jar - for package in apps artifacts; do - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/packages/$package/target/$package-*-SNAPSHOT.zip - done - #asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/packages/basex/target/basex-*-SNAPSHOT.tar.gz - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/templates/template.demo/target/template.demo-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/drools-applications/controlloop/templates/template.demo/target/template.demo-*-SNAPSHOT.jar - for feature in eelf healthcheck session-persistence; do - asserts_file_exist ${src_folders[policy]}/drools-pdp/feature-$feature/target/feature-$feature-*-SNAPSHOT.jar - done - #asserts_file_exist ${src_folders[policy]}/drools-pdp/packages/base/target/base-*-SNAPSHOT.tar.gz - #asserts_file_exist ${src_folders[policy]}/drools-pdp/packages/install/target/install-drools-*-SNAPSHOT.zip - for policy in core endpoints management utils; do - asserts_file_exist ${src_folders[policy]}/drools-pdp/policy-$policy/target/policy-$policy-*-SNAPSHOT.jar - done - for engine in BRMSGateway LogParser ONAP-PDP ONAP-XACML ONAP-REST; do - asserts_file_exist ${src_folders[policy]}/engine/$engine/target/$engine-*-SNAPSHOT.jar - done - for engine in ONAP-PAP-REST ONAP-PDP-REST ONAP-SDK-APP; do - asserts_file_exist ${src_folders[policy]}/engine/$engine/target/$engine-*-SNAPSHOT.war - done - asserts_file_exist ${src_folders[policy]}/engine/packages/base/target/base-*-SNAPSHOT.tar.gz - asserts_file_exist ${src_folders[policy]}/engine/packages/install/target/install-*-SNAPSHOT.zip - asserts_file_exist ${src_folders[policy]}/engine/POLICY-SDK-APP/target/POLICY-SDK-APP-*-SNAPSHOT.war - asserts_file_exist ${src_folders[policy]}/engine/PolicyEngineAPI/target/PolicyEngineAPI-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/engine/PolicyEngineClient/target/PolicyEngineClient-*-SNAPSHOT.jar - asserts_file_exist ${src_folders[policy]}/engine/PolicyEngineUtils/target/PolicyEngineUtils-*-SNAPSHOT.jar -} - -# test_get_policy_images() - Verify that Policy Docker images are retrieved properly -function test_get_policy_images { - clone_repos "policy" - get_policy_images - - for image in os nexus db base drools pe; do - asserts_image onap/policy/policy-$image - done -} - -# test_install_policy() - Verify that Policy services are started properly -function test_install_policy { - clone_repos "policy" - get_policy_images - install_policy - - for image in pe drools db nexus; do - asserts_image_running onap/policy/policy-$image - done -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_portal b/bootstrap/vagrant-onap/tests/test_portal deleted file mode 100755 index d20f173ce..000000000 --- a/bootstrap/vagrant-onap/tests/test_portal +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/portal - -covered_functions=( -"clone_all_portal_repos" -"compile_all_portal_repos" -"get_portal_images" -"install_portal" -) - -# test_clone_all_portal_repos() - Verify cloning of Portal source code -function test_clone_all_portal_repos { - clone_all_portal_repos - - asserts_file_exist ${src_folders[portal]}/pom.xml - asserts_file_exist ${src_folders[portal]}/ecompsdkos/LICENSE.txt - asserts_file_exist ${src_folders[portal]}/dmaapbc/pom.xml - asserts_file_exist ${src_folders[portal]}/sdk/LICENSE.txt -} - -# test_compile_all_portal_repos() - Verify compiling of Portal source code -function test_compile_all_portal_repos { - clone_all_portal_repos - compile_all_portal_repos - - asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-common/target/ecompportal-be-common.war - asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-common-test/target/ecomp-portal-BE-common-test.jar - asserts_file_exist ${src_folders[portal]}/ecomp-portal-BE-os/target/ecompportal-be-os.war -} - -# test_get_portal_images() - Verify that Portal Docker images are retrieved or built properly -function test_get_portal_images { - clone_all_portal_repos - get_portal_images - - asserts_image portal-db - asserts_image portal-wms - asserts_image portal-apps - asserts_image mariadb -} - -# test_install_portal() - Verify installation of Portal services -function test_install_portal { - clone_all_portal_repos - install_mariadb - install_portal - - asserts_image_running portal-db - asserts_image_running portal-wms - asserts_image_running portal-apps -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_robot b/bootstrap/vagrant-onap/tests/test_robot deleted file mode 100755 index b96a08848..000000000 --- a/bootstrap/vagrant-onap/tests/test_robot +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/robot - -covered_functions=( -"clone_robot_repos" "compile_robot_repos" "get_robot_images" "install_robot" -) - -# test_clone_robot_repos() - Verify that Robot repositories are cloned properly -function test_clone_robot_repos { - clone_repos "robot" "testsuite" - - asserts_file_exist ${src_folders[robot]}/LICENSE.TXT - asserts_file_exist ${src_folders[robot]}/heatbridge/pom.xml - asserts_file_exist ${src_folders[robot]}/properties/LICENSE.TXT - asserts_file_exist ${src_folders[robot]}/python-testing-utils/LICENSE.TXT -} - -# test_compile_robot_repos() - Verify that Robot source code can be compiled properly -function test_compile_robot_repos { - clone_repos "robot" "testsuite" - compile_repos "robot" - - #asserts_file_exist $testsuite_src_folder/heatbridge/target/maven-python/dist/heatbridge-0.3.0.dev0-py2-none-any.whl -} - -# test_get_robot_images() - Verify that Robot Docker images are retrieved -function test_get_robot_images { - get_robot_images - - asserts_image $nexus_docker_repo/openecomp/testsuite -} - -# test_install_robot() - Verify the built and start of Robot services -function test_install_robot { - clone_repos "robot" "testsuite" - get_robot_images - install_robot - - asserts_image_running $nexus_docker_repo/openecomp/testsuite -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_sdc b/bootstrap/vagrant-onap/tests/test_sdc deleted file mode 100755 index 67657803e..000000000 --- a/bootstrap/vagrant-onap/tests/test_sdc +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/sdc - -covered_functions=( -"clone_all_sdc_repos" "compile_all_sdc_repos" "get_sdc_images" "install_sdc" -) - -# test_clone_all_sdc_repos() - Verifies the retrieval of SDC source code repos -function test_clone_all_sdc_repos { - clone_repos "sdc" - - asserts_file_exist ${src_folders[sdc]}/pom.xml - asserts_file_exist ${src_folders[sdc]}/sdc-os-chef/pom.xml - asserts_file_exist ${src_folders[sdc]}/jtosca/pom.xml - asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/pom.xml - asserts_file_exist ${src_folders[sdc]}/sdc-titan-cassandra/pom.xml - asserts_file_exist ${src_folders[sdc]}/sdc-tosca/pom.xml - asserts_file_exist ${src_folders[sdc]}/sdc_common/pom.xml -} - -# test_compile_all_sdc_repos() - Verifies the correct compilation of SDC repositories -function test_compile_all_sdc_repos { - clone_repos "sdc" - compile_repos "sdc" - - #asserts_file_exist ${src_folders[sdc]}/jtosca/target/jtosca-1.1.10-SNAPSHOT.jar - #asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[sdc]}/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.*-SNAPSHOT.jar - #asserts_file_exist ${src_folders[sdc]}/sdc-titan-cassandra/target/jamm-0.3.0.jar - #asserts_file_exist ${src_folders[sdc]}/sdc-tosca/target/sdc-tosca-1.1.*-SNAPSHOT.jar - - #for dirc in logging sdc-artifact-generator; do - for dirc in logging; do - name="openecomp-$dirc" - for module in api core; do - fullname="$name-$module" - asserts_file_exist ${src_folders[sdc]}/sdc_common/$name-lib/$fullname/target/$fullname-1.1.0-SNAPSHOT.jar - done - done -} - -# test_get_sdc_images() - Verifies the correct retrieval of SDC Docker images -function test_get_sdc_images { - clone_repos "sdc" - get_sdc_images - - for image in sanity elasticsearch cassandra kibana frontend backend; do - asserts_image openecomp/base_sdc-$image - done -} - -# test_install_sdc() - Verifies that SDC services are up and running -function test_install_sdc { - clone_repos "sdc" - get_sdc_images - install_sdc - - for image in elasticsearch cassandra kibana frontend backend; do - asserts_image_running openecomp/base_sdc-$image - done -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_sdnc b/bootstrap/vagrant-onap/tests/test_sdnc deleted file mode 100755 index c4ddc56cd..000000000 --- a/bootstrap/vagrant-onap/tests/test_sdnc +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/sdnc - -covered_functions=( -"clone_all_sdnc_repos" "compile_all_sdnc_repos" "get_sdnc_images" "install_sdnc" -) - -# test_clone_all_sdnc_repos() - Verify the source code retrieve of SDNC project -function test_clone_all_sdnc_repos { - clone_repos "sdnc" - - asserts_file_exist ${src_folders[sdnc]}/adaptors/pom.xml - #asserts_file_exist ${src_folders[sdnc]}/architecture/docs/index.rst - asserts_file_exist ${src_folders[sdnc]}/core/pom.xml - #asserts_file_exist ${src_folders[sdnc]}/features/docs/index.rst - asserts_file_exist ${src_folders[sdnc]}/northbound/pom.xml - asserts_file_exist ${src_folders[sdnc]}/oam/pom.xml - #asserts_file_exist ${src_folders[sdnc]}/parent/docs/index.rst - asserts_file_exist ${src_folders[sdnc]}/plugins/pom.xml -} - -# test_compile_all_sdnc_repos() - Verify the correct compilation of SDNC projects -function test_compile_all_sdnc_repos { - clone_repos "sdnc" - compile_all_sdnc_repos - - for component in generic-resource-api vnfapi vnftools; do - if [[ "$component" == "vnfapi" ]]; then - asserts_file_exist ${src_folders[sdnc]}/northbound/vnfapi/model/target/vnfapi-model-1.2.0-SNAPSHOT.jar - fi - asserts_file_exist ${src_folders[sdnc]}/northbound/$component/installer/target/sdnc-$component-1.2.0-SNAPSHOT-installer.zip - asserts_file_exist ${src_folders[sdnc]}/northbound/$component/features/target/$component-features-1.2.0-SNAPSHOT.jar - asserts_file_exist ${src_folders[sdnc]}/northbound/$component/provider/target/$component-provider-1.2.0-SNAPSHOT.jar - done - asserts_file_exist ${src_folders[sdnc]}/oam/admportal/target/admportal.*-SNAPSHOT.zip - asserts_file_exist ${src_folders[sdnc]}/oam/dgbuilder/target/dgbuilder.*-SNAPSHOT.zip - asserts_file_exist ${src_folders[sdnc]}/oam/platform-logic/installer/target/platform-logic-installer-*-SNAPSHOT.zip -} - -# test_get_sdnc_images() - Verify that the SDNC images are created or retrieved -function test_get_sdnc_images { - clone_repos "sdnc" - get_sdnc_images - - asserts_image onap/sdnc-image - asserts_image onap/admportal-sdnc-image - asserts_image onap/dgbuilder-sdnc-image - asserts_image mysql/mysql-server:5.6 -} - -# test_install_sdnc() - Verify that the SDNC Docker containers are up and running -function test_install_sdnc { - clone_repos "sdnc" - get_sdnc_images - install_sdnc - - asserts_image_running onap/ccsdk-dgbuilder-image - asserts_image_running onap/admportal-sdnc-image - asserts_image_running onap/sdnc-image - asserts_image_running mysql/mysql-server:5.6 -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_vfc b/bootstrap/vagrant-onap/tests/test_vfc deleted file mode 100755 index 3fadeafad..000000000 --- a/bootstrap/vagrant-onap/tests/test_vfc +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/vfc - -covered_functions=( -"clone_all_vfc_repos" "compile_all_vfc_repos" "install_vfc" "get_vfc_images" -) - -# test_clone_all_vfc_repos() - Verify cloning and pulling source code from repositories -function test_clone_all_vfc_repos { - clone_repos "vfc" - - #asserts_file_exist ${src_folders[vfc]}/pom.xml - #asserts_file_exist ${src_folders[vfc]}/gvnfm - asserts_file_exist ${src_folders[vfc]}/gvnfm/vnflcm/pom.xml - asserts_file_exist ${src_folders[vfc]}/gvnfm/vnfmgr/pom.xml - asserts_file_exist ${src_folders[vfc]}/gvnfm/vnfres/pom.xml - #asserts_file_exist ${src_folders[vfc]}/nfvo - asserts_file_exist ${src_folders[vfc]}/nfvo/catalog/run.sh - #asserts_file_exist ${src_folders[vfc]}/nfvo/driver - asserts_file_exist ${src_folders[vfc]}/nfvo/driver/ems/pom.xml - asserts_file_exist ${src_folders[vfc]}/nfvo/driver/sfc/pom.xml - #asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm - asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm/gvnfm/pom.xml - asserts_file_exist ${src_folders[vfc]}/nfvo/driver/vnfm/svnfm/pom.xml - asserts_file_exist ${src_folders[vfc]}/nfvo/lcm/pom.xml - asserts_file_exist ${src_folders[vfc]}/nfvo/wfengine/wso2/pom.xml -} - -# test_compile_all_vfc_repos() - Verify that all the VFC modules are compiled properly -function test_compile_all_vfc_repos { - clone_repos "vfc" - compile_all_vfc_repos - - # TODO(electrocucaracha): Add asserts_file_exist -} - -# test_get_vfc_images() - Verify all VFC images are built correctly. -function test_get_vfc_images { - clone_repos "vfc" - get_vfc_images - - asserts_image onap/gvnfmdriver - asserts_image onap/nslcm - asserts_image onap/vnfres - asserts_image onap/vnfmgr - asserts_image onap/vnflcm -} - -# test_install_vfc() - Verify that the VFC are up and running -function test_install_vfc { - clone_repos "vfc" - get_vfc_images - install_vfc - - asserts_image_running onap/nslcm - asserts_image_running onap/gvnfmdriver - asserts_image_running onap/vnfres - asserts_image_running onap/vnfmgr - asserts_image_running onap/vnflcm -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_vid b/bootstrap/vagrant-onap/tests/test_vid deleted file mode 100755 index 79a415242..000000000 --- a/bootstrap/vagrant-onap/tests/test_vid +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/vid - -covered_functions=( -"clone_all_vid_repos" "compile_all_vid_repos" "get_vid_images" "install_vid" -) - -# test_clone_all_vid_repos() - Verifies that VID repositories are retrieved properly -function test_clone_all_vid_repos { - clone_repos "vid" - - asserts_file_exist ${src_folders[vid]}/pom.xml - asserts_file_exist ${src_folders[vid]}/asdcclient/pom.xml -} - -# test_compile_all_vid_repos() - Verifies that VID source code is compiled properly -function test_compile_all_vid_repos { - clone_repos "vid" - compile_repos "vid" - - asserts_file_exist ${src_folders[vid]}/asdcclient/target/asdcclient-1.0.2-SNAPSHOT.jar - asserts_file_exist ${src_folders[vid]}/epsdk-app-onap/target/vid.war - asserts_file_exist ${src_folders[vid]}/vid-app-common/target/vid-common.war -} - -# test_get_vid_images() - Verifies that VID Docker images are built properly -function test_get_vid_images { - clone_repos "vid" - get_vid_images - - asserts_image openecomp/vid - asserts_image mariadb:10 -} - -# test_install_vid() - Verifies taht VID services are up and running -function test_install_vid { - clone_repos "vid" - get_vid_images - install_vid - - vid_image=`docker images | grep vid | grep latest| awk '{print $1 ":" $2}'` - asserts_image_running $vid_image -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_vnfsdk b/bootstrap/vagrant-onap/tests/test_vnfsdk deleted file mode 100755 index cd29a9733..000000000 --- a/bootstrap/vagrant-onap/tests/test_vnfsdk +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/vnfsdk - -covered_functions=( -"clone_all_vnfsdk_repos" "compile_all_vnfsdk_repos" "get_vnfsdk_images" "install_vnfsdk" -) - -# test_clone_all_vnfsdk_repos() - Verify the cloning of VNFSDK source repo. -function test_clone_all_vnfsdk_repos { - clone_repos "vnfsdk" - - asserts_file_exist ${src_folders[vnfsdk]}/compliance/veslibrary/README - asserts_file_exist ${src_folders[vnfsdk]}/functest/pom.xml - asserts_file_exist ${src_folders[vnfsdk]}/lctest/pom.xml - asserts_file_exist ${src_folders[vnfsdk]}/model/docs/index.rst - asserts_file_exist ${src_folders[vnfsdk]}/pkgtools/pom.xml - asserts_file_exist ${src_folders[vnfsdk]}/refrepo/pom.xml - asserts_file_exist ${src_folders[vnfsdk]}/validation/pom.xml -} - -# test_compile_all_vnfsdk_repos () - Verify if VNFSDK source repo compiles correctly. -function test_compile_all_vnfsdk_repos { - clone_repos "vnfsdk" - compile_repos "vnfsdk" - - asserts_file_exist ${src_folders[vnfsdk]}/lctest/lifecycle-test/target/lifecycle-test-service-1.0.0-SNAPSHOT.war - asserts_file_exist ${src_folders[vnfsdk]}/pkgtools/target/vnf-sdk-pkgtools-1.0.0-SNAPSHOT.zip - asserts_file_exist ${src_folders[vnfsdk]}/refrepo/vnfmarket-be/vnf-sdk-marketplace/target/ROOT.war - asserts_file_exist ${src_folders[vnfsdk]}/validation/csarvalidation/target/validation-csar-1.0.0-SNAPSHOT.jar -} - -# test_get_vnfsdk_images() - Verify that the VNFSDK images are created or retrieved -function test_get_vnfsdk_images { - clone_repos "vnfsdk" - get_vnfsdk_images - - asserts_image refrepo:1.0-STAGING-latest - asserts_image refrepo:latest -} - -# test_install_vnfsdk() - Verify that VNFSDK docker images are running. -function test_install_vnfsdk { - clone_repos "vnfsdk" - get_vnfsdk_images - install_vnfsdk - - asserts_image_running refrepo:1.0-STAGING-latest - asserts_image refrepo:latest -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tests/test_vvp b/bootstrap/vagrant-onap/tests/test_vvp deleted file mode 100755 index 8e9594dcd..000000000 --- a/bootstrap/vagrant-onap/tests/test_vvp +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -source /var/onap_tests/_test_base -source /var/onap/vvp - -covered_functions=( -"clone_all_vvp_repos" "compile_all_vvp_repos" "get_vvp_images" "install_vvp" -) - -# test_clone_all_vvp_repos() - Verify the cloning of VNFSDK source repo. -function test_clone_all_vvp_repos { - clone_repos "vvp" - - asserts_file_exist ${src_folders[vvp]}/cms/pom.xml - asserts_file_exist ${src_folders[vvp]}/devkit/LICENSE.TXT - asserts_file_exist ${src_folders[vvp]}/engagementmgr/pom.xml - asserts_file_exist ${src_folders[vvp]}/gitlab/pom.xml - asserts_file_exist ${src_folders[vvp]}/image-scanner/pom.xml - asserts_file_exist ${src_folders[vvp]}/jenkins/pom.xml - asserts_file_exist ${src_folders[vvp]}/portal/pom.xml - asserts_file_exist ${src_folders[vvp]}/postgresql/pom.xml - asserts_file_exist ${src_folders[vvp]}/test-engine/pom.xml - asserts_file_exist ${src_folders[vvp]}/validation-scripts/LICENSE.txt -} - -# test_compile_all_vvp_repos () - Verify if VNFSDK source repo compiles correctly. -function test_compile_all_vvp_repos { - clone_repos "vvp" - compile_repos "vvp" - - # asserts_file_exist ${src_folders[vvp]}/ -} - -# test_get_vvp_images() - Verify that the VNFSDK images are created or retrieved -function test_get_vvp_images { - clone_repos "vvp" - get_vvp_images - - #asserts_image refrepo:latest -} - -# test_install_vvp() - Verify that VNFSDK docker images are running. -function test_install_vvp { - clone_repos "vvp" - get_vvp_images - install_vvp - - #asserts_image_running refrepo:1.0-STAGING-latest -} - -if [ "$1" != '*' ]; then - unset covered_functions - covered_functions=$1 -fi -main "${covered_functions[@]}" diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1 deleted file mode 100644 index de57a1564..000000000 --- a/bootstrap/vagrant-onap/tools/Run.ps1 +++ /dev/null @@ -1,120 +0,0 @@ -<# -.SYNOPSIS -This script helps to configure its environment variables based on the component selected. - -.EXAMPLE -.\tools\Run.ps1 testing -s functions -c install_maven -y - -.EXAMPLE -.\tools\Run.ps1 all_in_one - -.EXAMPLE -.\tools\Run.ps1 aai - -.PARAMETER s -Test suite to use in testing mode. - -.PARAMETER c -Test case to use in testing mode. - -.PARAMETER y -Skips warning prompt. - -.PARAMETER g -Skips creation or retrieve image process. - -.PARAMETER i -Skips installation service process. - -.LINK -https://wiki.onap.org/display/DW/ONAP+on+Vagrant -#> - -Param( - [ValidateSet("all_in_one","dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom", "testing")] - - [Parameter(Mandatory=$True,Position=0)] - [ValidateNotNullOrEmpty()] - [String] - $Command -, - [Parameter(Mandatory=$False,HelpMessage="Test suite to use in testing mode.")] - [Alias("suite")] - [String] - $s = "*" -, - [Parameter(Mandatory=$False,HelpMessage="Test case to sue in testing mode.")] - [Alias("case")] - [String] - $c = "*" -, - [Parameter(Mandatory=$False,HelpMessage="Skips warning prompt.")] - [AllowNull()] - [Switch] - $y = $True -, - [Parameter(Mandatory=$False,HelpMessage="Skips creation or retrieve image process.")] - [AllowNull()] - [Switch] - $skip_get_images = $True -, - [Parameter(Mandatory=$False,HelpMessage="Skips warning prompt.")] - [AllowNull()] - [Switch] - $skip_install = $True -) - -if ( -Not "testing".Equals($Command) ) - { - if($PsBoundParameters.ContainsKey('s')) - { - Write-Host "Test suite should only be specified in testing mode." - Write-Host ".\tools\Run.ps1 -?" - exit 1 - } - if($PsBoundParameters.ContainsKey('c')) - { - Write-Host "Test case should only be specified in testing mode." - Write-Host ".\tools\Run.ps1 -?" - exit 1 - } - } - -$env:SKIP_GET_IMAGES=$skip_get_images -$env:SKIP_INSTALL=$skip_install - -switch ($Command) - { - "all_in_one" { $env:DEPLOY_MODE="all-in-one" } - { @("dns", "mr", "sdc", "aai", "mso", "robot", "vid", "sdnc", "portal", "dcae", "policy", "appc", "vfc", "multicloud", "ccsdk", "vnfsdk", "vvp", "openstack", "msb", "oom") -contains $_ } { $env:DEPLOY_MODE="individual" } - "testing" - { - $env:DEPLOY_MODE="testing" - If(-Not $y) - { - Write-Host "Warning: This test script will delete the contents of ../opt/ and ~/.m2." - $yn = Read-Host "Would you like to continue? [y]es/[n]o: " - switch ($yn) - { - { @("n", "N") -contains $_ } - { - Write-Host "Exiting." - exit 0 - } - } - } - $env:TEST_SUITE=$s - $env:TEST_CASE=$c - - &cmd.exe /c rd /s /q .\opt\ - &cmd.exe /c rd /s /q $HOME\.m2\ - } - default - { - Write-Output $"Usage: $0 {all_in_one|dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|multicloud|ccsdk|vnfsdk|vvp|testing}" - exit 1 - } - } - -vagrant destroy -f $Command -vagrant up $Command diff --git a/bootstrap/vagrant-onap/tools/get_repos.sh b/bootstrap/vagrant-onap/tools/get_repos.sh deleted file mode 100755 index ae5d4e0eb..000000000 --- a/bootstrap/vagrant-onap/tools/get_repos.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -repos=( -"aai/aai-data" "aai/aai-config" "aai/aai-service" "aai/data-router" "aai/logging-service" "aai/model-loader" "aai/resources" "aai/rest-client" "aai/router-core" "aai/search-data-service" "aai/sparky-be" "aai/sparky-fe" "aai/test-config" "aai/traversal" -"appc" "appc/deployment" -"ci-management" -"dcae" "dcae/apod" "dcae/apod/analytics" "dcae/apod/buildtools" "dcae/apod/cdap" "dcae/collectors" "dcae/collectors/ves" "dcae/controller" "dcae/controller/analytics" "dcae/dcae-inventory" "dcae/demo" "dcae/demo/startup" "dcae/demo/startup/aaf" "dcae/demo/startup/controller" "dcae/demo/startup/message-router" "dcae/dmaapbc" "dcae/operation" "dcae/operation/utils" "dcae/orch-dispatcher" "dcae/pgaas" "dcae/utils" "dcae/utils/buildtools" -"demo" -"ecompsdkos" -"mso" "mso/chef-repo" "mso/docker-config" "mso/libs" "mso/mso-config" -"ncomp" "ncomp/cdap" "ncomp/core" "ncomp/docker" "ncomp/maven" "ncomp/openstack" "ncomp/sirius" "ncomp/sirius/manager" "ncomp/utils" -"policy/common" "policy/docker" "policy/drools-applications" "policy/drools-pdp" "policy/engine" -"portal" -"sdc" "sdc/sdc-distribution-client" "sdc/sdc-titan-cassandra" "sdc/sdc_common" -"sdnc/adaptors" "sdnc/core" "sdnc/northbound" "sdnc/oam" "sdnc/plugins" -"testsuite" "testsuite/heatbridge" "testsuite/properties" "testsuite/python-testing-utils" -"ui" "ui/dmaapbc" -"vid" "vid/asdcclient") - -function git_clone_or_pull { - local repo=$1 - local folder="./opt/$1" - local mvn_build=$2 - if [ ! -d $folder ]; then - git clone https://git.onap.org/$repo $folder - fi - pushd $folder > /dev/null - git pull -q - if [ -f .gitreview ]; then - git review -s - fi - popd > /dev/null -} - -for repo in ${repos[@]}; do - echo "Working on $repo repository..." - git_clone_or_pull $repo -done diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh deleted file mode 100755 index 27e0aa31e..000000000 --- a/bootstrap/vagrant-onap/tools/run.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/bash - -function usage { - cat <<EOF -Usage: run.sh Command [-y] [-?] -Optional arguments: - -y - Skips warning prompt. - -g - Skips creation or retrieve image process. - -i - Skips installation service process. - -s <suite> - Test suite to use in testing mode. - -c <case> - Test case to use in testing mode. -Commands: - all_in_one Deploy in all-in-one mode. - dns|mr|sdc|aai|mso|robot|vid|sdnc|portal|dcae|policy|appc|vfc|vnfsdk|multicloud|ccsdk|vvp|openstack|msb|oom Deploy chosen service. - testing Deploy in testing mode. -EOF -} - -run=false -test_suite="*" -test_case="*" - -COMMAND=$1 - -while getopts "ygis:c:" OPTION "${@:2}"; do - case "$OPTION" in - y) - run=true - ;; - g) - export SKIP_GET_IMAGES="True" - ;; - i) - export SKIP_INSTALL="True" - ;; - s) - if [ "$COMMAND" != "testing" ] ; then - echo "Test suite should only be specified in testing mode." - echo "./tools/run.sh -? for usage." - exit 1 - fi - test_suite=$OPTARG - ;; - c) - if [ "$COMMAND" != "testing" ] ; then - echo "Test case should only be specified in testing mode." - echo "./tools/run.sh -? for usage." - exit 1 - fi - test_case=$OPTARG - ;; - \?) - usage - exit 1 - ;; - esac -done - -case $COMMAND in - "all_in_one" ) - export DEPLOY_MODE='all-in-one' - ;; - "dns" | "mr" | "sdc" | "aai" | "mso" | "robot" | "vid" | "sdnc" | "portal" | "dcae" | "policy" | "appc" | "vfc" | "vnfsdk"| "multicloud" | "ccsdk" | "vvp" | "openstack" | "msb" | "oom" ) - export DEPLOY_MODE='individual' - ;; - "testing" ) - export DEPLOY_MODE='testing' - if [ "$run" == false ] ; then - while true ; do - echo "Warning: This test script will delete the contents of ../opt/ and ~/.m2." - read -p "Would you like to continue? [y]es/[n]o: " yn - case $yn in - [Yy]*) - break - ;; - [Nn]*) - echo "Exiting." - exit 0 - ;; - esac - done - fi - - export TEST_SUITE=$test_suite - export TEST_CASE=$test_case - rm -rf ./opt/ - rm -rf ~/.m2/ - ;; - * ) - usage - exit 1 -esac - -vagrant destroy -f $COMMAND -vagrant up $COMMAND diff --git a/bootstrap/vagrant-onap/tools/setup.sh b/bootstrap/vagrant-onap/tools/setup.sh deleted file mode 100755 index fe3a3fc28..000000000 --- a/bootstrap/vagrant-onap/tools/setup.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2017-2018 -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -vagrant_version=2.0.2 - -function usage { - cat <<EOF -usage: setup.sh -p <PROVIDER> -Argument: - -p Vagrant provider -EOF -} - -while getopts ":p:" OPTION; do - case $OPTION in - p) - provider=$OPTARG - ;; - \?) - usage - exit 1 - ;; - esac -done - -case $provider in - "virtualbox" | "libvirt" ) - export VAGRANT_DEFAULT_PROVIDER=${provider} - ;; - * ) - usage - exit 1 -esac -source /etc/os-release || source /usr/lib/os-release - -packages=() -case ${ID,,} in - *suse) - INSTALLER_CMD="sudo -H -E zypper -q install -y --no-recommends" - - # Vagrant installation - vagrant_pgp="pgp_keys.asc" - wget -q https://keybase.io/hashicorp/$vagrant_pgp - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm - gpg --quiet --with-fingerprint $vagrant_pgp - sudo rpm --import $vagrant_pgp - sudo rpm --checksig vagrant_${vagrant_version}_x86_64.rpm - sudo rpm --install vagrant_${vagrant_version}_x86_64.rpm - rm vagrant_${vagrant_version}_x86_64.rpm - rm $vagrant_pgp - - case $VAGRANT_DEFAULT_PROVIDER in - virtualbox) - wget -q http://download.virtualbox.org/virtualbox/rpm/opensuse/$VERSION/virtualbox.repo -P /etc/zypp/repos.d/ - $INSTALLER_CMD --enablerepo=epel dkms - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import - - packages+=(VirtualBox-5.1) - ;; - libvirt) - # vagrant-libvirt dependencies - packages+=(qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm zlib-devel libxml2-devel libxslt-devel make) - # NFS - packages+=(nfs-kernel-server) - ;; - esac - sudo zypper -n ref - ;; - - ubuntu|debian) - INSTALLER_CMD="sudo -H -E apt-get -y -q=3 install" - - # Vagrant installation - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.deb - sudo dpkg -i vagrant_${vagrant_version}_x86_64.deb - rm vagrant_${vagrant_version}_x86_64.deb - - case $VAGRANT_DEFAULT_PROVIDER in - virtualbox) - echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list - wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - - packages+=(virtualbox-5.1 dkms) - ;; - libvirt) - # vagrant-libvirt dependencies - packages+=(qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev) - # NFS - packages+=(nfs-kernel-server) - ;; - esac - sudo apt-get update - ;; - - rhel|centos|fedora) - PKG_MANAGER=$(which dnf || which yum) - sudo $PKG_MANAGER updateinfo - INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -q -y install" - - # Vagrant installation - wget -q https://releases.hashicorp.com/vagrant/$vagrant_version/vagrant_${vagrant_version}_x86_64.rpm - $INSTALLER_CMD vagrant_${vagrant_version}_x86_64.rpm - rm vagrant_${vagrant_version}_x86_64.rpm - - case $VAGRANT_DEFAULT_PROVIDER in - virtualbox) - wget -q http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo -P /etc/yum.repos.d - $INSTALLER_CMD --enablerepo=epel dkms - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import - - packages+=(VirtualBox-5.1) - ;; - libvirt) - # vagrant-libvirt dependencies - packages+=(qemu libvirt libvirt-devel ruby-devel gcc qemu-kvm) - # NFS - packages+=(nfs-utils nfs-utils-lib) - ;; - esac - ;; - -esac - -${INSTALLER_CMD} ${packages[@]} -if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then - vagrant plugin install vagrant-libvirt - sudo usermod -a -G libvirt $USER -fi diff --git a/bootstrap/vagrant-onap/tools/setup_openstack.sh b/bootstrap/vagrant-onap/tools/setup_openstack.sh deleted file mode 100755 index 765ad9446..000000000 --- a/bootstrap/vagrant-onap/tools/setup_openstack.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -ubuntu_name=${OS_IMAGE:-"trusty-server-cloudimg-amd64-disk1"} -export OS_IMAGE=$ubuntu_name -ubuntu_glance=`openstack image list -c Name -f value | grep "$ubuntu_name"` -ubuntu_file=/tmp/ubuntu.img - -sec_group_name=${OS_SEC_GROUP:-"onap-ssh-secgroup"} -export OS_SEC_GROUP=$sec_group_name -sec_group_list=`openstack security group list -c Name -f value | grep "$sec_group_name"` - -if [[ -z $ubuntu_glance ]]; then - if [ ! -f $ubuntu_file ]; then - curl http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img -o "$ubuntu_file" - fi - - openstack image create --disk-format raw --container-format bare --public --file $ubuntu_file "$ubuntu_name" -fi - -if [[ -z $sec_group_list ]]; then - openstack security group create "$sec_group_name" - openstack security group rule create --protocol tcp --remote-ip 0.0.0.0/0 --dst-port 22:22 "$sec_group_name" -fi diff --git a/bootstrap/vagrant-onap/tools/update_project_list.sh b/bootstrap/vagrant-onap/tools/update_project_list.sh deleted file mode 100755 index 2f0ebb9a3..000000000 --- a/bootstrap/vagrant-onap/tools/update_project_list.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -ssh $1@gerrit.onap.org -p 29418 gerrit ls-projects > projects.tmp -tail -n +2 projects.tmp > tests/projects.txt -rm projects.tmp diff --git a/bootstrap/vagrant-onap/tox.ini b/bootstrap/vagrant-onap/tox.ini deleted file mode 100644 index 6ab309fdf..000000000 --- a/bootstrap/vagrant-onap/tox.ini +++ /dev/null @@ -1,30 +0,0 @@ -[tox] -minversion = 1.6 -skipsdist = True -envlist = bashate - -[testenv] -passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY -usedevelop = False -install_command = pip install {opts} {packages} - -[testenv:bashate] -deps = - {env:BASHATE_INSTALL_PATH:bashate} -whitelist_externals = bash -commands = bash -c "find {toxinidir}/{tests,lib,tools} \ - -not \( -type d -path *files* -prune \) \ - -not \( -type f -name .*.swp* -prune \) \ - -not \( -type f -name *.ps1 -prune \) \ - -not \( -type f -name installed-software* -prune \) \ - -not \( -type f -name *projects.txt -prune \) \ - -type f \ -# E005 file does not begin with #! or have a .sh prefix -# E006 check for lines longer than 79 columns -# E042 local declaration hides errors -# E043 Arithmetic compound has inconsistent return semantics - -print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043" - -[testenv:docs] -deps = sphinx -commands = sphinx-build -W -b html doc/source doc/build/html diff --git a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh b/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh deleted file mode 100755 index 3b5017a66..000000000 --- a/bootstrap/vagrant-onap/vagrant_utils/postinstall.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -if [[ "$debug" == "True" ]]; then - set -o xtrace -fi - -if [[ "$1" == "openstack" ]]; then - source /var/onap/openstack - deploy_openstack - exit -fi - -source /var/onap/functions - -update_repos -create_configuration_files -configure_bind - -for serv in $@; do - source /var/onap/${serv} - configure_service ${serv}_serv.sh - init_${serv} - echo "source /var/onap/${serv}" >> ~/.bashrc -done - -echo "source /var/onap/functions" >> ~/.bashrc diff --git a/bootstrap/vagrant-onap/vagrant_utils/unit_testing.sh b/bootstrap/vagrant-onap/vagrant_utils/unit_testing.sh deleted file mode 100755 index 3a97ad9cf..000000000 --- a/bootstrap/vagrant-onap/vagrant_utils/unit_testing.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [[ "$debug" == "True" ]]; then - set -o xtrace -fi - -set -o errexit - -TEST_SUITE=${1:-*} -TEST_CASE=${2:-*} - -for file in $( ls /var/onap_tests/test_$TEST_SUITE); do - bash ${file} $TEST_CASE -done diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-06-DNS-openrc b/deployment/heat/onap-oom/env/windriver/Integration-SB-06-DNS-openrc new file mode 120000 index 000000000..850c25544 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-06-DNS-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/windriver/Integration-SB-06-DNS-openrc
\ No newline at end of file diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-06-openrc b/deployment/heat/onap-oom/env/windriver/Integration-SB-06-openrc new file mode 120000 index 000000000..98ea5829a --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-06-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/windriver/Integration-SB-06-openrc
\ No newline at end of file diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env new file mode 100644 index 000000000..4203c79d8 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env @@ -0,0 +1,33 @@ +parameters: + + keystone_url: http://10.12.25.2:5000 + openstack_tenant_id: 7fad299815104c0a8f90a8df80343f03 + openstack_tenant_name: Integration-SB-06 + openstack_username: demo + openstack_api_key: onapdemo + + ubuntu_1404_image: ubuntu-14-04-cloud-amd64 + ubuntu_1604_image: ubuntu-16-04-cloud-amd64 + centos_7_image: CentOS-7 + + apt_proxy: 10.12.5.2:3142 + docker_proxy: 10.12.5.2:5000 + + rancher_vm_flavor: m1.small + k8s_vm_flavor: m1.xxlarge + + public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 + public_net_name: external + + oam_network_cidr: 10.0.0.0/16 + dns_forwarder: 10.12.25.5 + external_dns: 8.8.8.8 + + dnsaas_proxy_enable: "true" + dnsaas_proxied_keystone_url_path: "api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + dnsaas_keystone_url: http://10.12.25.5:5000 + dnsaas_region: RegionOne + dnsaas_tenant_id: 2d7c6ec2cf9147fa974fa059b3673d7a + dnsaas_tenant_name: Integration-SB-06 + dnsaas_username: demo + dnsaas_password: onapdemo diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-07-DNS-openrc b/deployment/heat/onap-oom/env/windriver/Integration-SB-07-DNS-openrc new file mode 120000 index 000000000..7e4a3af20 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-07-DNS-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/windriver/Integration-SB-07-DNS-openrc
\ No newline at end of file diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-07-openrc b/deployment/heat/onap-oom/env/windriver/Integration-SB-07-openrc new file mode 120000 index 000000000..87292901c --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-07-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/windriver/Integration-SB-07-openrc
\ No newline at end of file diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env new file mode 100644 index 000000000..efefa3888 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env @@ -0,0 +1,33 @@ +parameters: + + keystone_url: http://10.12.25.2:5000 + openstack_tenant_id: 1e097c6713e74fd7ac8e4295e605ee1e + openstack_tenant_name: Integration-SB-07 + openstack_username: demo + openstack_api_key: onapdemo + + ubuntu_1404_image: ubuntu-14-04-cloud-amd64 + ubuntu_1604_image: ubuntu-16-04-cloud-amd64 + centos_7_image: CentOS-7 + + apt_proxy: 10.12.5.2:3142 + docker_proxy: 10.12.5.2:5000 + + rancher_vm_flavor: m1.small + k8s_vm_flavor: m1.xxlarge + + public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 + public_net_name: external + + oam_network_cidr: 10.0.0.0/16 + dns_forwarder: 10.12.25.5 + external_dns: 8.8.8.8 + + dnsaas_proxy_enable: "true" + dnsaas_proxied_keystone_url_path: "api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + dnsaas_keystone_url: http://10.12.25.5:5000 + dnsaas_region: RegionOne + dnsaas_tenant_id: 885777d5e9074f31ad7801f9e6876b84 + dnsaas_tenant_name: Integration-SB-07 + dnsaas_username: demo + dnsaas_password: onapdemo diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh index 9118c8e24..119e40a04 100644 --- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -23,8 +23,8 @@ apt-get -y install linux-image-extra-$(uname -r) jq cd ~ -# install docker 1.12 -curl -s https://releases.rancher.com/install-docker/1.12.sh | sh +# install docker 17.03 +curl -s https://releases.rancher.com/install-docker/17.03.sh | sh usermod -aG docker ubuntu # install kubernetes 1.8.6 @@ -33,10 +33,14 @@ chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl mkdir ~/.kube -# install helm 2.3 -wget -q http://storage.googleapis.com/kubernetes-helm/helm-v2.3.0-linux-amd64.tar.gz -tar -zxvf helm-v2.3.0-linux-amd64.tar.gz +# install helm +wget -q http://storage.googleapis.com/kubernetes-helm/helm-v2.6.1-linux-amd64.tar.gz +tar -zxvf helm-v2.6.1-linux-amd64.tar.gz sudo mv linux-amd64/helm /usr/local/bin/helm +# verify version +helm version +# Rancher 1.6.14 installs 2.6.1 - if you upgrade to 2.8.0 - you will need to upgrade helm on the server to the version to level of client +helm init --upgrade # Fix virtual memory allocation for onap-log:elasticsearch: echo "vm.max_map_count=262144" >> /etc/sysctl.conf @@ -91,7 +95,7 @@ tar xvf rancher-linux-amd64-v0.6.7.tar # Clone OOM: cd ~ -git clone -b amsterdam http://gerrit.onap.org/r/oom +git clone -b master http://gerrit.onap.org/r/oom # Update values.yaml to point to docker-proxy instead of nexus3: cd ~/oom/kubernetes @@ -131,165 +135,21 @@ sed -i "s/kubeMasterAuthToken:.*/kubeMasterAuthToken: $KUBETOKEN/" ~/oom/kuberne # Create or edit ~/oom/kubernetes/config/onap-parameters.yaml cat > ~/oom/kubernetes/config/onap-parameters.yaml <<EOF -# For information regarding those parameters, please visit http://onap.readthedocs.io/en/latest/submodules/dcaegen2.git/docs/sections/installation_heat.html - -################# -# COMMON CONFIG # -################# - -# NEXUS -NEXUS_HTTP_REPO: https://nexus.onap.org/content/sites/raw -NEXUS_DOCKER_REPO: nexus3.onap.org:10001 -NEXUS_USERNAME: docker -NEXUS_PASSWORD: docker - -# ONAP config -# Do not change unless you know what you're doing -DMAAP_TOPIC: "AUTO" -DEMO_ARTIFACTS_VERSION: "1.1.1" - -# ------------------------------------------------# -# OpenStack Config on which VNFs will be deployed # -# ------------------------------------------------# - -# The four below parameters are only used by Robot. -# As Robot is able to perform some automated actions, -# e.g. onboard/distribute/instantiate, it has to be -# configured with four below parameters (in addition -# to the OPENSTACK ones). -# If you don't intend to use Robot for those actions, -# you can put dummy values, but you will have to provide -# those values when deploying VNF anyway. -# -------------------------------------------------- -# This is the OAM Network ID used for internal network by VNFs. -# You could create 10.10.10.0/24 (256 IPs should be enough) in your cloud instance. +OPENSTACK_UBUNTU_14_IMAGE: "__ubuntu_1404_image__" +OPENSTACK_PUBLIC_NET_ID: "__public_net_id__" OPENSTACK_OAM_NETWORK_ID: "__oam_network_id__" -# This is the public Network ID. Public = external network in OpenStack. -# Floating IPs will be created and assigned to VNFs from this network, -# to provide external reachability. -OPENSTACK_PUBLIC_NETWORK_ID: "__public_net_id__" -# VM Flavor to be used by VNF. -OPENSTACK_FLAVOR: "m1.medium" -# VM image to be used by VNF. Here ubuntu 14.04 is provided. -OPENSTACK_IMAGE: "__ubuntu_1604_image__" - +OPENSTACK_OAM_SUBNET_ID: "__oam_subnet_id__" +OPENSTACK_OAM_NETWORK_CIDR: "__oam_network_cidr__" OPENSTACK_USERNAME: "__openstack_username__" -OPENSTACK_PASSWORD: "__openstack_api_key__" +OPENSTACK_API_KEY: "__openstack_api_key__" OPENSTACK_TENANT_NAME: "__openstack_tenant_name__" OPENSTACK_TENANT_ID: "__openstack_tenant_id__" OPENSTACK_REGION: "RegionOne" -# Either v2.0 or v3 -OPENSTACK_API_VERSION: "v2.0" OPENSTACK_KEYSTONE_URL: "__keystone_url__" -# Don't change this if you don't know what it is +OPENSTACK_FLAVOUR_MEDIUM: "m1.medium" OPENSTACK_SERVICE_TENANT_NAME: "service" - -######## -# DCAE # -######## - -# Whether or not to deploy DCAE -# If set to false, all the parameters below can be left empty or removed -# If set to false, update ../dcaegen2/values.yaml disableDcae value to true, -# this is to avoid deploying the DCAE deployments and services. -DEPLOY_DCAE: "true" - -# DCAE Config -DCAE_DOCKER_VERSION: v1.1.1 -DCAE_VM_BASE_NAME: "dcae" - -# ------------------------------------------------# -# OpenStack Config on which DCAE will be deployed # -# ------------------------------------------------# - -# Whether to have DCAE deployed on the same OpenStack instance on which VNF will be deployed. -# (e.g. re-use the same config as defined above) -# If set to true, discard the next config block, else provide the values. -IS_SAME_OPENSTACK_AS_VNF: "true" - -# Fill in the values in below block only if IS_SAME_OPENSTACK_AS_VNF set to "false" -# --- -# Either v2.0 or v3 -DCAE_OS_API_VERSION: "v2.0" -DCAE_OS_KEYSTONE_URL: "__keystone_url__" -DCAE_OS_USERNAME: "" -DCAE_OS_PASSWORD: "" -DCAE_OS_TENANT_NAME: "" -DCAE_OS_TENANT_ID: "" -DCAE_OS_REGION: "" -# --- - -# We need to provide the config of the public network here, because the DCAE VMs will be -# assigned a floating IP on this network so one can access them, to debug for instance. -# The ID of the public network. -DCAE_OS_PUBLIC_NET_ID: "__public_net_id__" -# The name of the public network. -DCAE_OS_PUBLIC_NET_NAME: "__public_net_name__" -# This is the private network that will be used by DCAE VMs. The network will be created during the DCAE boostrap process, -# and will the subnet created will use this CIDR. (/28 provides 16 IPs, DCAE requires 15.) -DCAE_OS_OAM_NETWORK_CIDR: "10.99.0.0/16" -# This will be the private ip of the DCAE boostrap VM. This VM is responsible for spinning up the whole DCAE stack (14 VMs total) -DCAE_IP_ADDR: "10.99.4.1" - -# The flavors' name to be used by DCAE VMs -DCAE_OS_FLAVOR_SMALL: "m1.small" -DCAE_OS_FLAVOR_MEDIUM: "m1.medium" -DCAE_OS_FLAVOR_LARGE: "m1.large" -# The images' name to be used by DCAE VMs -DCAE_OS_UBUNTU_14_IMAGE: "__ubuntu_1404_image__" -DCAE_OS_UBUNTU_16_IMAGE: "__ubuntu_1604_image__" -DCAE_OS_CENTOS_7_IMAGE: "__centos_7_image__" - -# This is the keypair that will be created in OpenStack, and that one can use to access DCAE VMs using ssh. -# The private key needs to be in a specific format so at the end of the process, it's formatted properly -# when ending up in the DCAE HEAT stack. The best way is to do the following: -# - copy paste your key -# - surround it with quote -# - add \n at the end of each line -# - escape the result using https://www.freeformatter.com/java-dotnet-escape.html#ad-output -DCAE_OS_KEY_NAME: "onap_key" -DCAE_OS_PUB_KEY: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh" -DCAE_OS_PRIVATE_KEY: \"-----BEGIN RSA PRIVATE KEY-----\\n\r\nMIIEpQIBAAKCAQEAylw4KKN/ljqnFBvP+blG5PNfsnM4MAuGPMsE5rkKmzcZWNaE\\n\r\nNGMXTFKlJ4YrUl7OUv8kbgFTmB8BoNpgrNtKACDaz/psQSOeOADCG/YrT4wrYKrR\\n\r\nNhFqOjJpxRmxweEsd14qBOxeFT7Ie42qbCMMzo260HvjLmtUxkOXeJ3xDkGmoJVy\\n\r\nyzxX7nO1m4WyWyukO6x6mX0XDsADF4A6AapcqinoisJ7pnXaNkcjU/JY2Jrwem7s\\n\r\n+ypzIp86O6gdLpLVU9ORR/UYNAk1h+Z6K5Rual4D9mrpC9IJNaYfIgLe7mC39ZLa\\n\r\nfiySNoGhei9P6pYvRJlQki69bid/EPAgX5YZIQIDAQABAoIBAQClDekkhI9ZqseC\\n\r\nqFjPuKaxsizZMg+faJb6WSHLSxzyk1OSWY6F6FklgLeC8HW/fuLNYZyGOYDEsG20\\n\r\nlMqL02Wdiy7OutS3oOS5iyzIf9a90HfFJi706el6RIpvINETcaXCS0T8tQrcS1Rd\\n\r\nKqTaBRC6HXJGAPbBcvw3pwQSdskatU6a/Kt2a3x6DsqqinQcgEB/SbrDaJCUX9sb\\n\r\nF2HVUwdq7aZK1Lk0ozr1FID9mrhjwWuQ6XC+vjG0FqtyXeMpR5iaQ73hex3FXQ8z\\n\r\nOjkFbMwuHWSh1DSx70r5yFrrBqwQKnMsBqx4QDRf3fIENUnWviaL+n+gwcXA07af\\n\r\n4kaNUFUtAoGBAPuNNRAGhZnyZ9zguns9PM56nmeMUikV5dPN2DTbQb79cpfV+7pC\\n\r\n6PeSH/dTKFLz62d6qAM2EsNXQvewf8fipBVBRPsRqKOv+uepd01dHNy62I5B+zRm\\n\r\nbe9Kbe+EN60qdzvyPM+2hV6CnvGv1dirimS9pu6RrxD2Rmz1ectnJE+rAoGBAM3w\\n\r\nUbSEemyZ6EKjck2RfdipzY0MNBnIZ2cUqHh8mmPXjdTLzpXb9vmPbHb01Qwo8MP+\\n\r\ngMnTbTBOzyNAaHdIrCO9FHW6C85j3ot5Yzcr+EcBVcua+7KHU0Sgn44JNH8DisJ7\\n\r\nY63UP/1Xb4d1/QvHfxYy3WOvvRdVZ7pPo8JNX95jAoGAIe5CIg8/JizUZa7KeKUh\\n\r\n9pgDleQPkQsrHQ6/AyIwFBsLwf9THSS5V+uV9D57SfUs46Bf2U8J6N90YQSlt8iS\\n\r\naWuManFPVgT+yxDIzt6obf2mCEpOIBtQ6N4ZRh2HhQwdWTCrkzkDdGQaHG+jYL6C\\n\r\nxGPwiG2ON7OAfGIAM7eN5lECgYEAhoRLWlaOgRGnHKAWsYQvZ67CjTdDcPPuVu6v\\n\r\nfMQnNMA/7JeTwV+E205L0wfpgZ/cZKmBBlQMJlnUA3q2wfO+PTnse1mjDJU/cGtB\\n\r\n22/lJLxChlQdxGeQhGtGzUhF+hEeOhrO6WSSx7CtMRZoy6Dr6lwfMFZCdVNcBd6v\\n\r\nYOOZk3ECgYEAseUKGb6E80XTVVNziyuiVbQCsI0ZJuRfqMZ2IIDQJU9u6AnGAway\\n\r\nitqHbkGsmDT+4HUz01+1JKnnw42RdSrHdU/LaOonD+RIGqe2x800QXzqASKLdCXr\\n\r\ny7RoiFqJtkdFQykzJemA+xOXvHLgKi/MXFsU90PCD0VJKLj8vwpX78Y=\\n\r\n-----END RSA PRIVATE KEY-----\\n\r\n\" - -# This below settings allows one to configure the /etc/resolv.conf nameserver resolution for all the DCAE VMs. -# - -# In the HEAT setup, it's meant to be a DNS list, as the HEAT setup deploys a DNS Server VM in addition to DNS Designate -# and this DNS Server is setup to forward request to the DNS Designate backend when it cannot resolve, hence the -# DNS_FORWARDER config here. The DCAE Boostrap requires both inputs, even though they are now similar, we have to pass -# them. -# - -# ATTENTION: Assumption is made the DNS Designate backend is configure to forward request to a public DNS (e.g. 8.8.8.8) -# - -# Put the IP of the DNS Designate backend (e.g. the OpenStack IP supporting DNS Designate) -DNS_IP: "__dns_forwarder__" -DNS_FORWARDER: "__dns_forwarder__" - -# Public DNS - not used but required by the DCAE boostrap container -EXTERNAL_DNS: "__external_dns__" - -# DNS domain for the DCAE VMs -DCAE_DOMAIN: "dcaeg2.onap.org" - -# Proxy DNS Designate. This means DCAE will run in an instance not support Designate, and Designate will be provided by another instance. -# Set to true if you wish to use it -DNSAAS_PROXY_ENABLE: "__dnsaas_proxy_enable__" -# Provide this only if DNSAAS_PROXY_ENABLE set to true. The IP has to be the IP of one of the K8S hosts. -# e.g. http://10.195.197.164/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0 -DCAE_PROXIED_KEYSTONE_URL: "http://__k8s_ip_addr__/__dnsaas_proxied_keystone_url_path__" - -# -----------------------------------------------------# -# OpenStack Config on which DNS Designate is supported # -# -----------------------------------------------------# - -# If this is the same OpenStack used for the VNF or DCAE, please re-enter the values here. - -DNSAAS_API_VERSION: "v3" -DNSAAS_REGION: "RegionOne" -DNSAAS_KEYSTONE_URL: "__dnsaas_keystone_url__" -DNSAAS_TENANT_ID: "__dnsaas_tenant_id__" -DNSAAS_TENANT_NAME: "__dnsaas_tenant_name__" -DNSAAS_USERNAME: "__dnsaas_username__" -DNSAAS_PASSWORD: "__dnsaas_password__" +DMAAP_TOPIC: "AUTO" +DEMO_ARTIFACTS_VERSION: "1.1.1" EOF cat ~/oom/kubernetes/config/onap-parameters.yaml @@ -322,8 +182,6 @@ git config user.name "root" git add -A git commit -m "initial commit" -cat /dockerdata-nfs/onap/dcaegen2/heat/onap_dcae.env - # Run ONAP: cd ~/oom/kubernetes/oneclick/ ./createAll.bash -n onap diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml index 760a9575d..0a40ee224 100644 --- a/deployment/heat/onap-oom/onap-oom.yaml +++ b/deployment/heat/onap-oom/onap-oom.yaml @@ -238,6 +238,7 @@ resources: __public_net_id__: { get_param: public_net_id } __public_net_name__: { get_param: public_net_name } __oam_network_id__: { get_resource: oam_network } + __oam_subnet_id__: { get_resource: oam_subnet } __oam_network_cidr__: { get_param: oam_network_cidr } __ubuntu_1404_image__: { get_param: ubuntu_1404_image } __ubuntu_1604_image__: { get_param: ubuntu_1604_image } diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh index ac704f106..12ed51f13 100644 --- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh @@ -19,4 +19,4 @@ fi apt-get -y update apt-get -y install docker.io usermod -aG docker ubuntu -docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.10 +docker run --restart unless-stopped -d -p 8080:8080 rancher/server:v1.6.14 diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh index de33b08e0..60ceab663 100755 --- a/deployment/heat/onap-oom/scripts/deploy.sh +++ b/deployment/heat/onap-oom/scripts/deploy.sh @@ -38,7 +38,7 @@ fi ssh-keygen -R $K8S_IP for n in $(seq 1 10); do - timeout 2m ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$K8S_IP 'sudo su -l root -c "/root/oom/kubernetes/robot/ete-k8s.sh health"' + timeout 2m ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$K8S_IP 'sudo su -l root -c "/root/oom/kubernetes/robot/ete-k8s.sh onap health"' RESULT=$? if [ $RESULT -eq 0 ]; then break diff --git a/test/csit/plans/aai/esr-server/setup.sh b/test/csit/plans/aai/esr-server/setup.sh index a2cfa5e8d..42d9676d7 100644 --- a/test/csit/plans/aai/esr-server/setup.sh +++ b/test/csit/plans/aai/esr-server/setup.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2017 ZTE Corporation. +# Copyright 2017-2018 ZTE Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore b/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/aai_keystore diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties new file mode 100644 index 000000000..435507a81 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/aaiconfig.properties @@ -0,0 +1,119 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for crud enabled flag +aai.crud.timeoutenabled=true + +#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms) +aai.crud.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAIRctFeed,-1|NewvceCreator,-1|IANewvceCreator,-1|AAI-CSIOVALS,-1 + +#default timeout limit added for crud if not overridden (in ms) +aai.crud.timeoutlimit=100000 +#limit set for bulk consumer APIS +aai.bulkconsumer.payloadlimit=30 + +#uncomment and use header X-OverrideLimit with the value to override the bulk api limit +#aai.bulkconsumer.payloadoverride=E6F04B93462CB5B0EDF41C05A9DDF5C3FE59748F +aai.bulkconsumer.payloadoverride=false diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties new file mode 100644 index 000000000..b9c51eaf2 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.2.0 + +spring.application.name=aai-resources +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-resources/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml b/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml new file mode 100644 index 000000000..ee7ee61a6 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-resources"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </logger> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + <logger name="com.jayway.jsonpath" level="WARN" /> + + <!-- AJSC Services (bootstrap services) --> + <logger name="ajsc" level="WARN" /> + <logger name="ajsc.RouteMgmtService" level="WARN" /> + <logger name="ajsc.ComputeService" level="WARN" /> + <logger name="ajsc.VandelayService" level="WARN" /> + <logger name="ajsc.FilePersistenceService" level="WARN" /> + <logger name="ajsc.UserDefinedJarService" level="WARN" /> + <logger name="ajsc.UserDefinedBeansDefService" level="WARN" /> + <logger name="ajsc.LoggingConfigurationService" level="WARN" /> + + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet + logging) --> + <logger name="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <logger name="ajsc.utils" level="WARN" /> + <logger name="ajsc.utils.DME2Helper" level="WARN" /> + <logger name="ajsc.filters" level="WARN" /> + <logger name="ajsc.beans.interceptors" level="WARN" /> + <logger name="ajsc.restlet" level="WARN" /> + <logger name="ajsc.servlet" level="WARN" /> + <logger name="com.att.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" level="WARN" /> + <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="org.apache.coyote" level="WARN" /> + <logger name="org.apache.jasper" level="WARN" /> + + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. + May aid in troubleshooting) --> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/resources/aai-resources/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore b/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/aai_keystore diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties new file mode 100644 index 000000000..cef109033 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/aaiconfig.properties @@ -0,0 +1,114 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for traversal enabled flag +aai.traversal.timeoutenabled=true + +#timeout app specific +aai.traversal.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAI-FILEGEN-GFPIP,-1 + +#default timeout limit added for traversal if not overridden (in ms) +aai.traversal.timeoutlimit=180000 + diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties new file mode 100644 index 000000000..0292512c1 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-traversal +info.build.name=traversal +info.build.description=Traversal Microservice +info.build.version=1.2.0 + +spring.application.name=aai-traversal +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-traversal/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8446 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml b/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml new file mode 100644 index 000000000..31bfe10cf --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-traversal"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </logger> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + <logger name="com.jayway.jsonpath" level="WARN" /> + + <!-- AJSC Services (bootstrap services) --> + <logger name="ajsc" level="WARN" /> + <logger name="ajsc.RouteMgmtService" level="WARN" /> + <logger name="ajsc.ComputeService" level="WARN" /> + <logger name="ajsc.VandelayService" level="WARN" /> + <logger name="ajsc.FilePersistenceService" level="WARN" /> + <logger name="ajsc.UserDefinedJarService" level="WARN" /> + <logger name="ajsc.UserDefinedBeansDefService" level="WARN" /> + <logger name="ajsc.LoggingConfigurationService" level="WARN" /> + + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet + logging) --> + <logger name="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <logger name="ajsc.utils" level="WARN" /> + <logger name="ajsc.utils.DME2Helper" level="WARN" /> + <logger name="ajsc.filters" level="WARN" /> + <logger name="ajsc.beans.interceptors" level="WARN" /> + <logger name="ajsc.restlet" level="WARN" /> + <logger name="ajsc.servlet" level="WARN" /> + <logger name="com.att.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" level="WARN" /> + <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="org.apache.coyote" level="WARN" /> + <logger name="org.apache.jasper" level="WARN" /> + + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. + May aid in troubleshooting) --> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/resources/aai-traversal/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/resources/docker-compose.yml b/test/csit/plans/aai/resources/docker-compose.yml index 80865bb90..3f465c3ec 100644 --- a/test/csit/plans/aai/resources/docker-compose.yml +++ b/test/csit/plans/aai/resources/docker-compose.yml @@ -4,13 +4,19 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-resources hostname: aai-resources.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} ports: - 8447:8447 + volumes: + - ${CURRENT_PWD}/aai-resources/appconfig/titan-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-resources/appconfig/titan-cached.properties:/opt/app/aai-resources/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-resources/appconfig/aaiconfig.properties:/opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-resources/appconfig/application.properties:/opt/app/aai-resources/resources/application.properties + - ${CURRENT_PWD}/aai-resources/appconfig/logback.xml:/opt/app/aai-resources/resources/logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/localhost-access-logback.xml:/opt/app/aai-resources/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/aai_keystore:/opt/app/aai-resources/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-resources/appconfig/realm.properties:/opt/app/aai-resources/resources/etc/auth/realm.properties logging: driver: "json-file" options: @@ -20,12 +26,18 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-traversal hostname: aai-traversal.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} - DISABLE_UPDATE_QUERY=true + volumes: + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/aaiconfig.properties:/opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/application.properties:/opt/app/aai-traversal/resources/application.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/logback.xml:/opt/app/aai-traversal/resources/logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/localhost-access-logback.xml:/opt/app/aai-traversal/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/aai_keystore:/opt/app/aai-traversal/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-traversal/appconfig/realm.properties:/opt/app/aai-traversal/resources/etc/auth/realm.properties ports: - 8446:8446 logging: diff --git a/test/csit/plans/aai/resources/setup.sh b/test/csit/plans/aai/resources/setup.sh index a4c7648c0..14b567108 100644 --- a/test/csit/plans/aai/resources/setup.sh +++ b/test/csit/plans/aai/resources/setup.sh @@ -26,6 +26,8 @@ DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} DOCKER_IMAGE_VERSION=1.2-STAGING-latest +export CURRENT_PWD=$(pwd); + function wait_for_container() { CONTAINER_NAME="$1"; @@ -101,7 +103,7 @@ else fi; RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; +wait_for_container $RESOURCES_CONTAINER_NAME 'Resources Microservice Started'; docker logs ${RESOURCES_CONTAINER_NAME}; diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore b/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/aai_keystore diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties new file mode 100644 index 000000000..435507a81 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/aaiconfig.properties @@ -0,0 +1,119 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for crud enabled flag +aai.crud.timeoutenabled=true + +#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms) +aai.crud.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAIRctFeed,-1|NewvceCreator,-1|IANewvceCreator,-1|AAI-CSIOVALS,-1 + +#default timeout limit added for crud if not overridden (in ms) +aai.crud.timeoutlimit=100000 +#limit set for bulk consumer APIS +aai.bulkconsumer.payloadlimit=30 + +#uncomment and use header X-OverrideLimit with the value to override the bulk api limit +#aai.bulkconsumer.payloadoverride=E6F04B93462CB5B0EDF41C05A9DDF5C3FE59748F +aai.bulkconsumer.payloadoverride=false diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties new file mode 100644 index 000000000..b9c51eaf2 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.2.0 + +spring.application.name=aai-resources +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-resources/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml b/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml new file mode 100644 index 000000000..ee7ee61a6 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-resources"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </logger> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + <logger name="com.jayway.jsonpath" level="WARN" /> + + <!-- AJSC Services (bootstrap services) --> + <logger name="ajsc" level="WARN" /> + <logger name="ajsc.RouteMgmtService" level="WARN" /> + <logger name="ajsc.ComputeService" level="WARN" /> + <logger name="ajsc.VandelayService" level="WARN" /> + <logger name="ajsc.FilePersistenceService" level="WARN" /> + <logger name="ajsc.UserDefinedJarService" level="WARN" /> + <logger name="ajsc.UserDefinedBeansDefService" level="WARN" /> + <logger name="ajsc.LoggingConfigurationService" level="WARN" /> + + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet + logging) --> + <logger name="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <logger name="ajsc.utils" level="WARN" /> + <logger name="ajsc.utils.DME2Helper" level="WARN" /> + <logger name="ajsc.filters" level="WARN" /> + <logger name="ajsc.beans.interceptors" level="WARN" /> + <logger name="ajsc.restlet" level="WARN" /> + <logger name="ajsc.servlet" level="WARN" /> + <logger name="com.att.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" level="WARN" /> + <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="org.apache.coyote" level="WARN" /> + <logger name="org.apache.jasper" level="WARN" /> + + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. + May aid in troubleshooting) --> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-resources/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore Binary files differnew file mode 100644 index 000000000..1ddef0c9b --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aai_keystore diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties new file mode 100644 index 000000000..cef109033 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/aaiconfig.properties @@ -0,0 +1,114 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.api.simpledemo.onap.org:8443/aai/ +aai.server.url=https://aai.api.simpledemo.onap.org:8443/aai/v11/ +aai.global.callback.url=https://aai.api.simpledemo.onap.org:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for traversal enabled flag +aai.traversal.timeoutenabled=true + +#timeout app specific +aai.traversal.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAI-FILEGEN-GFPIP,-1 + +#default timeout limit added for traversal if not overridden (in ms) +aai.traversal.timeoutlimit=180000 + diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties new file mode 100644 index 000000000..0292512c1 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-traversal +info.build.name=traversal +info.build.description=Traversal Microservice +info.build.version=1.2.0 + +spring.application.name=aai-traversal +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace=org-onap-aai + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-traversal/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8446 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=mr.api.simpledemo.onap.org:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml b/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml new file mode 100644 index 000000000..a318796c5 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/localhost-access-logback.xml @@ -0,0 +1,62 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration> + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <appender name="ACCESS" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder"> + <Pattern>%a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern> + </encoder> + </appender> + <appender-ref ref="ACCESS" /> +</configuration> + +<!-- +%a - Remote IP address +%A - Local IP address +%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent +%B - Bytes sent, excluding HTTP headers +%h - Remote host name +%H - Request protocol +%l - Remote logical username from identd (always returns '-') +%m - Request method +%p - Local port +%q - Query string (prepended with a '?' if it exists, otherwise an empty string +%r - First line of the request +%s - HTTP status code of the response +%S - User session ID +%t - Date and time, in Common Log Format format +%u - Remote user that was authenticated +%U - Requested URL path +%v - Local server name +%I - current request thread name (can compare later with stacktraces) + +%z - Custom pattern that parses the cert for the subject +%y - Custom pattern determines rest or dme2 + -->
\ No newline at end of file diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml b/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml new file mode 100644 index 000000000..31bfe10cf --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/logback.xml @@ -0,0 +1,391 @@ +<!-- + + ============LICENSE_START======================================================= + org.onap.aai + ================================================================================ + 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 is a trademark and service mark of AT&T Intellectual Property. + +--> +<configuration scan="true" scanPeriod="60 seconds" debug="false"> + <statusListener class="ch.qos.logback.core.status.NopStatusListener" /> + + <property resource="application.properties" /> + + <property name="namespace" value="aai-traversal"/> + + <property name="AJSC_HOME" value="${AJSC_HOME:-.}" /> + <jmxConfigurator /> + <property name="logDirectory" value="${AJSC_HOME}/logs" /> + <property name="eelfLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfAuditLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfMetricLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{targetVirtualEntity}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <!-- <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n|\r\n', '^'}|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> --> + <property name="eelfErrorLogPattern" value="%ecompStartTime|%X{requestId}|%-10t|%X{serviceName}|%X{partnerName}|%X{targetEntity}|%X{targetServiceName}|%ecompErrorCategory|%ecompResponseCode|%ecompResponseDescription|co=%X{component}:%replace(%replace(%m){'\\|', '!'}){'\r|\n', '^'}%n"/> + <property name="eelfTransLogPattern" value="%ecompStartTime|%date{yyyy-MM-dd'T'HH:mm:ss.SSSZ, UTC}|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{partnerName}|%X{statusCode}|%X{responseCode}|%replace(%replace(%X{responseDescription}){'\\|', '!'}){'\r|\n', '^'}|%X{instanceUUID}|%level|%X{severity}|%X{serverIpAddress}|%ecompElapsedTime|%X{server}|%X{clientIpAddress}|%eelfClassOfCaller|%X{unused}|%X{processKey}|%X{customField1}|%X{customField2}|%X{customField3}|%X{customField4}|co=%X{partnerName}:%m%n"/> + + <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> + <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> + <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern> + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + </pattern> + </encoder> + </appender> + + <appender name="SANE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/sane.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/sane.log.%d{yyyy-MM-dd}</fileNamePattern> + </rollingPolicy> + <encoder> + <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + </pattern> + </encoder> + </appender> + + <appender name="asyncSANE" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="SANE" /> + </appender> + + <appender name="METRIC" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/metrics.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="asyncMETRIC" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="METRIC" /> + </appender> + + <appender name="DEBUG" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/debug.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncDEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="DEBUG" /> + </appender> + + <appender name="ERROR" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/rest/error.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfErrorLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncERROR" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="ERROR" /> + </appender> + + <appender name="AUDIT" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${logDirectory}/rest/audit.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfAuditLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asyncAUDIT" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="AUDIT" /> + </appender> + + <appender name="translog" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <file>${logDirectory}/rest/translog.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfTransLogPattern}</pattern> + </encoder> + </appender> + + <appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender"> + <queueSize>1000</queueSize> + <includeCallerData>true</includeCallerData> + <appender-ref ref="translog" /> + </appender> + + <appender name="dmaapAAIEventConsumer" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + + <appender name="dmaapAAIEventConsumerDebug" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>DEBUG</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <appender name="dmaapAAIEventConsumerMetric" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfMetricLogPattern}</pattern> + </encoder> + </appender> + <appender name="external" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>WARN</level> + </filter> + <file>${logDirectory}/external/external.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/external/external.log.%d{yyyy-MM-dd} + </fileNamePattern> + </rollingPolicy> + <encoder class="org.onap.aai.logging.EcompEncoder"> + <pattern>${eelfLogPattern}</pattern> + </encoder> + </appender> + <logger name="org.onap.aai" level="DEBUG" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + <appender-ref ref="asyncSANE" /> + </logger> + + <!-- Spring related loggers --> + <logger name="org.springframework" level="WARN" /> + <logger name="org.springframework.beans" level="WARN" /> + <logger name="org.springframework.web" level="WARN" /> + <logger name="com.blog.spring.jms" level="WARN" /> + <logger name="com.jayway.jsonpath" level="WARN" /> + + <!-- AJSC Services (bootstrap services) --> + <logger name="ajsc" level="WARN" /> + <logger name="ajsc.RouteMgmtService" level="WARN" /> + <logger name="ajsc.ComputeService" level="WARN" /> + <logger name="ajsc.VandelayService" level="WARN" /> + <logger name="ajsc.FilePersistenceService" level="WARN" /> + <logger name="ajsc.UserDefinedJarService" level="WARN" /> + <logger name="ajsc.UserDefinedBeansDefService" level="WARN" /> + <logger name="ajsc.LoggingConfigurationService" level="WARN" /> + + <!-- AJSC related loggers (DME2 Registration, csi logging, restlet, servlet + logging) --> + <logger name="org.codehaus.groovy" level="WARN" /> + <logger name="com.att.scamper" level="WARN" /> + <logger name="ajsc.utils" level="WARN" /> + <logger name="ajsc.utils.DME2Helper" level="WARN" /> + <logger name="ajsc.filters" level="WARN" /> + <logger name="ajsc.beans.interceptors" level="WARN" /> + <logger name="ajsc.restlet" level="WARN" /> + <logger name="ajsc.servlet" level="WARN" /> + <logger name="com.att.ajsc" level="WARN" /> + <logger name="com.att.ajsc.csi.logging" level="WARN" /> + <logger name="com.att.ajsc.filemonitor" level="WARN" /> + <logger name="com.netflix.loadbalancer" level="WARN" /> + + <logger name="org.apache.zookeeper" level="OFF" /> + + <!-- Other Loggers that may help troubleshoot --> + <logger name="net.sf" level="WARN" /> + <logger name="org.apache.commons.httpclient" level="WARN" /> + <logger name="org.apache.commons" level="WARN" /> + <logger name="org.apache.coyote" level="WARN" /> + <logger name="org.apache.jasper" level="WARN" /> + + <!-- Camel Related Loggers (including restlet/servlet/jaxrs/cxf logging. + May aid in troubleshooting) --> + <logger name="org.apache.camel" level="WARN" /> + <logger name="org.apache.cxf" level="WARN" /> + <logger name="org.apache.camel.processor.interceptor" level="WARN" /> + <logger name="org.apache.cxf.jaxrs.interceptor" level="WARN" /> + <logger name="org.apache.cxf.service" level="WARN" /> + <logger name="org.restlet" level="WARN" /> + <logger name="org.apache.camel.component.restlet" level="WARN" /> + + <logger name="org.hibernate.validator" level="WARN" /> + <logger name="org.hibernate" level="WARN" /> + <logger name="org.hibernate.ejb" level="OFF" /> + + <!-- logback internals logging --> + <logger name="ch.qos.logback.classic" level="WARN" /> + <logger name="ch.qos.logback.core" level="WARN" /> + + <logger name="org.eclipse.jetty" level="WARN" /> + + <!-- logback jms appenders & loggers definition starts here --> + <appender name="auditLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <appender name="perfLogs" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter" /> + <file>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + </file> + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>9</maxIndex> + </rollingPolicy> + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>5MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + <logger name="AuditRecord" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="AuditRecord_DirectCall" level="INFO" additivity="false"> + <appender-ref ref="auditLogs" /> + </logger> + <logger name="PerfTrackerRecord" level="INFO" additivity="false"> + <appender-ref ref="perfLogs" /> + </logger> + <!-- logback jms appenders & loggers definition ends here --> + + <logger name="org.onap.aai.interceptors.post" level="DEBUG" + additivity="false"> + <appender-ref ref="asynctranslog" /> + </logger> + + <logger name="org.onap.aai.interceptors.pre.SetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.interceptors.post.ResetLoggingContext" level="DEBUG"> + <appender-ref ref="asyncAUDIT"/> + </logger> + + <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false"> + <appender-ref ref="dmaapAAIEventConsumer" /> + <appender-ref ref="dmaapAAIEventConsumerDebug" /> + <appender-ref ref="dmaapAAIEventConsumerMetric" /> + </logger> + + <logger name="org.apache" level="OFF" /> + <logger name="org.zookeeper" level="OFF" /> + <logger name="com.thinkaurelius" level="WARN" /> + <logger name="com.att.aft.dme2" level="WARN" /> + + <!-- ============================================================================ --> + <!-- General EELF logger --> + <!-- ============================================================================ --> + <logger name="com.att.eelf" level="WARN" additivity="false"> + <appender-ref ref="asyncDEBUG" /> + <appender-ref ref="asyncERROR" /> + <appender-ref ref="asyncMETRIC" /> + </logger> + + <root level="DEBUG"> + <appender-ref ref="external" /> + </root> +</configuration> diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties new file mode 100644 index 000000000..fb692cc3e --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties new file mode 100644 index 000000000..97bb81863 --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-cached.properties @@ -0,0 +1,39 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties new file mode 100644 index 000000000..0c97b753a --- /dev/null +++ b/test/csit/plans/aai/traversal/aai-traversal/appconfig/titan-realtime.properties @@ -0,0 +1,36 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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 is a trademark and service mark of AT&T Intellectual Property. +# + +query.fast-property=true +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=hbase +storage.hostname=aai.hbase.simpledemo.onap.org + +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=aaigraph-dev1.dev +storage.hbase.ext.zookeeper.znode.parent=/hbase +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/test/csit/plans/aai/traversal/docker-compose.yml b/test/csit/plans/aai/traversal/docker-compose.yml index 8b07c336f..3f465c3ec 100644 --- a/test/csit/plans/aai/traversal/docker-compose.yml +++ b/test/csit/plans/aai/traversal/docker-compose.yml @@ -4,13 +4,19 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-resources hostname: aai-resources.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} ports: - 8447:8447 + volumes: + - ${CURRENT_PWD}/aai-resources/appconfig/titan-realtime.properties:/opt/app/aai-resources/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-resources/appconfig/titan-cached.properties:/opt/app/aai-resources/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-resources/appconfig/aaiconfig.properties:/opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-resources/appconfig/application.properties:/opt/app/aai-resources/resources/application.properties + - ${CURRENT_PWD}/aai-resources/appconfig/logback.xml:/opt/app/aai-resources/resources/logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/localhost-access-logback.xml:/opt/app/aai-resources/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-resources/appconfig/aai_keystore:/opt/app/aai-resources/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-resources/appconfig/realm.properties:/opt/app/aai-resources/resources/etc/auth/realm.properties logging: driver: "json-file" options: @@ -20,11 +26,18 @@ services: image: ${DOCKER_REGISTRY}/onap/aai-traversal hostname: aai-traversal.api.simpledemo.onap.org environment: - - AAI_CHEF_ENV=simpledemo - - AAI_CHEF_LOC=/var/chef/aai-data/environments - - CHEF_BRANCH=master - - CHEF_GIT_URL=http://gerrit.onap.org/r/aai + - LOCAL_USER_ID=${USER_ID} + - LOCAL_GROUP_ID=${GROUP_ID} - DISABLE_UPDATE_QUERY=true + volumes: + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-realtime.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-realtime.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/titan-cached.properties:/opt/app/aai-traversal/resources/etc/appprops/titan-cached.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/aaiconfig.properties:/opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/application.properties:/opt/app/aai-traversal/resources/application.properties + - ${CURRENT_PWD}/aai-traversal/appconfig/logback.xml:/opt/app/aai-traversal/resources/logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/localhost-access-logback.xml:/opt/app/aai-traversal/resources/localhost-access-logback.xml + - ${CURRENT_PWD}/aai-traversal/appconfig/aai_keystore:/opt/app/aai-traversal/resources/etc/auth/aai_keystore + - ${CURRENT_PWD}/aai-traversal/appconfig/realm.properties:/opt/app/aai-traversal/resources/etc/auth/realm.properties ports: - 8446:8446 logging: diff --git a/test/csit/plans/aai/traversal/setup.sh b/test/csit/plans/aai/traversal/setup.sh index d3635d4ca..118a1bc9c 100644 --- a/test/csit/plans/aai/traversal/setup.sh +++ b/test/csit/plans/aai/traversal/setup.sh @@ -26,6 +26,8 @@ DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) DOCKER_REGISTRY=${NEXUS_DOCKER_REPO} DOCKER_IMAGE_VERSION=1.2-STAGING-latest +export CURRENT_PWD=$(pwd); + function wait_for_container() { CONTAINER_NAME="$1"; @@ -95,17 +97,21 @@ function check_if_user_exists(){ if [ "${USER_EXISTS}" -eq 0 ]; then export USER_ID=9000; + export GROUP_ID=9000; else export USER_ID=$(id -u aaiadmin); + export GROUP_ID=$(id -g aaiadmin); fi; RESOURCES_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-resources.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${RESOURCES_CONTAINER_NAME} '0.0.0.0:8447'; +wait_for_container $RESOURCES_CONTAINER_NAME 'Resources Microservice Started'; -TRAVERSAL_CONTAINER_NAME=$(${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.onap.org 2>&1 | grep 'Creating' | grep -v 'volume' | grep -v 'network' | awk '{ print $2; }' | head -1); -wait_for_container ${TRAVERSAL_CONTAINER_NAME} '0.0.0.0:8446'; +${DOCKER_COMPOSE_CMD} up -d aai-traversal.api.simpledemo.onap.org aai.api.simpledemo.onap.org +TRAVERSAL_CONTAINER_NAME=$(echo $RESOURCES_CONTAINER_NAME | sed 's/aai-resources/aai-traversal/g'); -${DOCKER_COMPOSE_CMD} up -d aai.api.simpledemo.onap.org echo "A&AI Microservices, resources and traversal, are up and running along with HAProxy"; + +wait_for_container $TRAVERSAL_CONTAINER_NAME 'Traversal Microservice Started'; + # Set the host ip for robot from the haproxy ROBOT_VARIABLES="-v HOST_IP:`ip addr show docker0 | head -3 | tail -1 | cut -d' ' -f6 | cut -d'/' -f1`" diff --git a/test/csit/plans/music/music-test-plan/setup.sh b/test/csit/plans/music/music-test-plan/setup.sh index 228aa1f2f..63d2ef93f 100755 --- a/test/csit/plans/music/music-test-plan/setup.sh +++ b/test/csit/plans/music/music-test-plan/setup.sh @@ -25,32 +25,51 @@ source ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_script.sh # add here all the configuration steps eventually needed to be carried out for music CSIT testing # echo "# music configuration step"; + +CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest +TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 +ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +WORK_DIR=/tmp/music +CASS_USERNAME=nelson24 +CASS_PASSWORD=winman123 MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/test/csit/scripts/music/music-properties MUSIC_PROPERTIES=/tmp/music/properties MUSIC_LOGS=/tmp/music/logs - mkdir -p ${MUSIC_PROPERTIES} mkdir -p ${MUSIC_LOGS} -cp ${MUSIC_SOURCE_PROPERTIES}/* ${MUSIC_PROPERTIES} +cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties + +# Create Volume for mapping war file and tomcat +docker volume create --name music-vol; + +# Create a network for all the containers to run in. +docker network create music-net; + +# Start Cassandra +docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; + +# Start Music war +docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; -#docker cp /home/lb7254/integration/test/csit/scripts/music/music-scripts/music_init.cql cassandra:/tmp/music_init.cql -#docker cp ${WORKSPACE}/test/csit/scripts/music/music-scripts/music_init.cql cassandra:/tmp/music_init.cql -#docker exec -it cassandra /usr/bin/cqlsh -umusic -pmusic -f /tmp/music_init.cql +# Start Zookeeper +docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; +# Delay for Cassandra +sleep 20; +# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. +docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; + +# Connect tomcat to host bridge network so that its port can be seen. +docker network connect bridge music-tomcat; + +################################## # # add here below the start of all docker containers needed for music CSIT testing # -echo "# music docker containers spinoff"; - - -docker volume create music-vol -docker run -d --name music-war -v music-vol:/app nexus3.onap.org:10001/onap/music/music:latest -docker run -d --name music-db -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 nexus3.onap.org:10001/onap/music/cassandra_music:latest -docker run -d --name music-zk -p 2181:2181 -p 2888:2888 -p 3888:3888 nexus3.onap.org:10001/library/zookeeper:3.4 -sleep 30 CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` echo "CASSANDRA_IP=${CASSA_IP}" @@ -60,18 +79,19 @@ echo "ZOOKEEPER_IP=${ZOO_IP}" ${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${CASSA_IP} 9042 -docker run -d --name music-tomcat -p 8080:8080 -v music-vol:/usr/local/tomcat/webapps -v ${MUSIC_PROPERTIES}:/opt/app/music/etc:ro -v ${MUSIC_LOGS}:/opt/app/music/logs nexus3.onap.org:10001/library/tomcat:8.0 - TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` echo "TOMCAT_IP=${TOMCAT_IP}" +${WORKSPACE}/test/csit/scripts/music/music-scripts/wait_for_port.sh ${TOMCAT_IP} 8080 ---- old part: it will be removed -#docker run --name cassandra -d -p 9042:9042 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9160:9160 nexus3.onap.org:10001/library/cassandra -#docker run --name zookeeper -d -p 2181:2181 -p 2888:2888 -p 3888:3888 nexus3.onap.org:10001/library/zookeeper -#docker run --name music -d -v /app nexus3.onap.org:10001/music -#docker run --name tomcat -d -p 8080:8080 --volumes-from music nexus3.onap.org:10001/library/tomcat +echo "inspect docker things for tracing purpose" +docker inspect music-db +docker inspect music-zk +docker inspect music-tomcat +docker inspect music-war +docker volume inspect music-vol +docker network inspect music-net @@ -80,7 +100,7 @@ echo "TOMCAT_IP=${TOMCAT_IP}" # add here all ROBOT_VARIABLES settings # echo "# music robot variables settings"; -ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://${TOMCAT_IP} -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" echo ${ROBOT_VARIABLES} diff --git a/test/csit/plans/music/music-test-plan/teardown.sh b/test/csit/plans/music/music-test-plan/teardown.sh index 0806eb273..e9982ae27 100755 --- a/test/csit/plans/music/music-test-plan/teardown.sh +++ b/test/csit/plans/music/music-test-plan/teardown.sh @@ -24,13 +24,29 @@ echo "#"; echo "# music scripts docker containers killing"; echo "#"; echo "##########################################################"; -kill-instance.sh music-tomcat -kill-instance.sh music-war -kill-instance.sh music-zk -kill-instance.sh music-db +docker stop music-tomcat +docker stop music-war +docker stop music-zk +docker stop music-db + +docker rm music-zk +docker rm music-tomcat +docker rm music-war +docker rm music-db + +docker network rm music-net; +sleep 5; + docker volume rm music-vol -rm -Rf /tmp/music +echo "dump music.log files" +ls -alF /tmp/music +ls -alF /tmp/music/properties +cat /tmp/music/properties/music.properties +cat /tmp/music/logs/MUSIC/music.log +cat /tmp/music/logs/MUSIC/error.log + +#rm -Rf /tmp/music diff --git a/test/csit/plans/optf/has/setup.sh b/test/csit/plans/optf-has/has/setup.sh index b2c81433c..f2ae3c78b 100755 --- a/test/csit/plans/optf/has/setup.sh +++ b/test/csit/plans/optf-has/has/setup.sh @@ -15,44 +15,39 @@ # limitations under the License. # + +# +# add here eventual scripts needed for music +# +echo "# music scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/music_script.sh + + # # add here eventual scripts needed for optf/has # -echo "##########################################################"; -echo "#"; echo "# optf/has scripts calling"; -echo "#"; -echo "##########################################################"; -source ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh +source ${WORKSPACE}/test/csit/scripts/optf-has/has/has_script.sh # # add here below the start of all docker containers needed for optf/has CSIT testing # -echo "##########################################################"; -echo "#"; echo "# optf/has scripts docker containers spinoff"; -echo "#"; -echo "##########################################################"; # # add here all the configuration steps eventually needed to be carried out for optf/has CSIT testing # -echo "##########################################################"; -echo "#"; echo "# optf/has configuration step"; -echo "#"; -echo "##########################################################"; # # add here all ROBOT_VARIABLES settings # -echo "##########################################################"; -echo "#"; echo "# optf/has robot variables settings"; -echo "#"; -echo "##########################################################"; -ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://localhost -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://localhost -v COND_PORT:8091" +echo "conductor ip = ${COND_IP}" +echo "music ip = ${TOMCAT_IP}" + +ROBOT_VARIABLES="-v MUSIC_HOSTNAME:http://${TOMCAT_IP} -v MUSIC_PORT:8080 -v COND_HOSTNAME:http://${COND_IP} -v COND_PORT:8091" echo ${ROBOT_VARIABLES} diff --git a/test/csit/plans/optf-has/has/teardown.sh b/test/csit/plans/optf-has/has/teardown.sh new file mode 100755 index 000000000..f4a91f9d5 --- /dev/null +++ b/test/csit/plans/optf-has/has/teardown.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# + + +# +# add here below the killing of all docker containers used for optf/has CSIT testing +# + +# +echo "# optf/has scripts docker containers killing"; +# +echo "# optf/has scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/has_teardown_script.sh + + +# +echo "# optf/has scripts docker containers killing"; +# +echo "# optf/has scripts calling"; +source ${WORKSPACE}/test/csit/scripts/optf-has/has/music_teardown_script.sh + diff --git a/test/csit/plans/optf/has/testplan.txt b/test/csit/plans/optf-has/has/testplan.txt index 0f9f84dfe..980050c90 100644 --- a/test/csit/plans/optf/has/testplan.txt +++ b/test/csit/plans/optf-has/has/testplan.txt @@ -1,3 +1,3 @@ # Test suites are relative paths under [integration.git]/test/csit/tests/. # Place the suites in run order. -optf/has +optf-has/has diff --git a/test/csit/plans/optf/osdf/sample.txt b/test/csit/plans/optf-has/osdf/sample.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/plans/optf/osdf/sample.txt +++ b/test/csit/plans/optf-has/osdf/sample.txt diff --git a/test/csit/plans/sdnc/healthcheck/setup.sh b/test/csit/plans/sdnc/healthcheck/setup.sh index 3ffed5d26..f2d7f6e45 100644 --- a/test/csit/plans/sdnc/healthcheck/setup.sh +++ b/test/csit/plans/sdnc/healthcheck/setup.sh @@ -64,9 +64,7 @@ docker tag $NEXUS_DOCKER_REPO/onap/sdnc-dmaap-listener-image:$DOCKER_IMAGE_VERSI # start SDNC containers with docker compose and configuration from docker-compose.yml -curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > docker-compose -chmod +x docker-compose -./docker-compose up -d +docker-compose up -d # WAIT 10 minutes maximum and test every 5 seconds if SDNC is up using HealthCheck API TIME_OUT=1000 diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh b/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh new file mode 100644 index 000000000..7e777a133 --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/setup.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Copyright 2018 Orange Labs. +# +# 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. +# +# These scripts are sourced by run-csit.sh. + + +#Start ice server +docker run --rm --name vnfsdk-ice -d -p 5000:5000 onap/vnfsdk/ice + +# Wait for server initialization +echo Wait for vnfsdk-ice initialization +until [ "`/usr/bin/docker inspect -f {{.State.Running}} vnfsdk-ice`"=="true" ]; do + sleep 1; +done; +ICE_IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' vnfsdk-ice` + + +# Pass any variables required by Robot test suites in ROBOT_VARIABLES +ROBOT_VARIABLES="-v SCRIPTS:${SCRIPTS} -v ICE_IP:${ICE_IP}" +echo ${ROBOT_VARIABLES} + diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh b/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh new file mode 100644 index 000000000..c84ea757b --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/teardown.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright 2018 Orange Labs. +# +# 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. +# +# This script is sourced by run-csit.sh after Robot test completion. + + +kill-instance.sh vnfsdk-ice + + diff --git a/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt b/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt new file mode 100644 index 000000000..c84eb0312 --- /dev/null +++ b/test/csit/plans/vnfsdk-ice/sanity-check/testplan.txt @@ -0,0 +1,3 @@ +## Test suites are relative paths under [integration.git]/test/csit/tests/. +## Place the suites in run order. +vnfsdk-ice/ice-server/validation_test.robot diff --git a/test/csit/scripts/music/music-properties/music.properties b/test/csit/scripts/music/music-properties/music.properties index a26fc0317..02fb52df1 100644 --- a/test/csit/scripts/music/music-properties/music.properties +++ b/test/csit/scripts/music/music-properties/music.properties @@ -5,8 +5,8 @@ all.ids=0 ####################################### # Optional current values are defaults ####################################### -#zookeeper.host=localhost -#cassandra.host=localhost +zookeeper.host=music-zk +cassandra.host=music-db #music.ip=localhost #debug=true #music.rest.ip=localhost diff --git a/test/csit/scripts/optf/has/has-properties/cert.cer b/test/csit/scripts/optf-has/has/has-properties/cert.cer index 67bb1303a..67bb1303a 100644 --- a/test/csit/scripts/optf/has/has-properties/cert.cer +++ b/test/csit/scripts/optf-has/has/has-properties/cert.cer diff --git a/test/csit/scripts/optf/has/has-properties/cert.key b/test/csit/scripts/optf-has/has/has-properties/cert.key index b8a957ff8..b8a957ff8 100644 --- a/test/csit/scripts/optf/has/has-properties/cert.key +++ b/test/csit/scripts/optf-has/has/has-properties/cert.key diff --git a/test/csit/scripts/optf-has/has/has-properties/cert.pem b/test/csit/scripts/optf-has/has/has-properties/cert.pem new file mode 100644 index 000000000..5ecf38234 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has-properties/cert.pem @@ -0,0 +1,36 @@ +Bag Attributes + friendlyName: mso-client + localKeyID: 54 69 6D 65 20 31 35 31 39 32 39 37 30 37 31 32 33 33 +subject=/C=US/ST=Michigan/L=Southfield/O=AT&T Services, Inc./OU=mso-bpel-client-mtanj/CN=msobpel-client.mtanj.aic.cip.att.com +issuer=/C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA +-----BEGIN CERTIFICATE----- +MIIFZDCCBEygAwIBAgIQCDZ0gBbsclD2Ino3w+NqPDANBgkqhkiG9w0BAQsFADBN +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E +aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTgwMTE5MDAwMDAwWhcN +MTkwMTE5MTIwMDAwWjCBojELMAkGA1UEBhMCVVMxETAPBgNVBAgTCE1pY2hpZ2Fu +MRMwEQYDVQQHEwpTb3V0aGZpZWxkMRwwGgYDVQQKDBNBVCZUIFNlcnZpY2VzLCBJ +bmMuMR4wHAYDVQQLExVtc28tYnBlbC1jbGllbnQtbXRhbmoxLTArBgNVBAMTJG1z +b2JwZWwtY2xpZW50Lm10YW5qLmFpYy5jaXAuYXR0LmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBAOJtbcWtMUYCIgIvdqm2CPN/cVTD8j3fDAsd42vn +7I3PYJ4aBu8tiJVRheJhj9mejfwjBd5f5E2z9kWfNMPZU/9q0RB+cYbKWv0lP+q5 +q/RkbXN7iRtGUkXUyNpekvxNT3IKYfXK3P29qVDVhvUSey2ngIALRvBrRIKRTmb8 +gzrvcavJSwm8oQw2JXE1+Da+8PYR3TjJ19nfmoTmKbO+QDD58I5+2TgNqd/b7zhN +GLaS3oiVONDmJ1b5iWwKg31otPDP8AJb7cNtl8vgfnGK2zvFIWnF2TRzMb6FePbn +JBLaEyi7+c1iKJafj61t5nn27I2psbJloT9/2fmb6l4NU8MCAwEAAaOCAegwggHk +MB8GA1UdIwQYMBaAFA+AYRyCMWHVLyjnjUY4tCzhxtniMB0GA1UdDgQWBBSQcljn +BCxIKpisBfyoNgGCdtPzBzAvBgNVHREEKDAmgiRtc29icGVsLWNsaWVudC5tdGFu +ai5haWMuY2lwLmF0dC5jb20wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsG +AQUFBwMBBggrBgEFBQcDAjBrBgNVHR8EZDBiMC+gLaArhilodHRwOi8vY3JsMy5k +aWdpY2VydC5jb20vc3NjYS1zaGEyLWc2LmNybDAvoC2gK4YpaHR0cDovL2NybDQu +ZGlnaWNlcnQuY29tL3NzY2Etc2hhMi1nNi5jcmwwTAYDVR0gBEUwQzA3BglghkgB +hv1sAQEwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQ +UzAIBgZngQwBAgIwfAYIKwYBBQUHAQEEcDBuMCQGCCsGAQUFBzABhhhodHRwOi8v +b2NzcC5kaWdpY2VydC5jb20wRgYIKwYBBQUHMAKGOmh0dHA6Ly9jYWNlcnRzLmRp +Z2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJTZWN1cmVTZXJ2ZXJDQS5jcnQwCQYDVR0T +BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAxkadmzFcpA3f3qc9PbzMWfV2lJCXWxfr +/6z4RXotl255GBZFR2zLn56k8J3hAJGWRc0WeSgSsLH1fxrxF60fWk+cmYCrMC9t +C5ha5zWav/kz+dkZvJVbUxIFdx0Cd5uqBsLFnAaGrnSR6WzJkZHQ2rQUvwvQXwdP +XL01FleDSNbV8jtHXvzmcdnVQWeLjcVOeOeBF3dW6lSvDRV0G6fe6+R9U+Gz0MwK +x93XbsIAMTCJKUBkV7QdHwHzis3fhKJHwJUrb1p2Byhn/RwYUmFbjkamFiEfAyzw ++KdkwripOgYHnmGyLBJ16FdO/8kGhn4URW/qL1FO/sN2loGGlyA82w== +-----END CERTIFICATE----- diff --git a/test/csit/scripts/optf/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap index 9770f5194..d3e391cde 100644 --- a/test/csit/scripts/optf/has/has-properties/conductor.conf.onap +++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -9,7 +9,7 @@ #api_paste_config = api_paste.ini # Music keyspace for content (string value) -keyspace = conductor_saisree +keyspace = conductor # # From oslo.log @@ -34,7 +34,7 @@ debug = true # example, logging_context_format_string). (string value) # Note: This option can be changed without restarting. # Deprecated group/name - [DEFAULT]/log_config -#log_config_append = /home/saisree/conductor/etc/conductor/log.conf +log_config_append = /usr/local/bin/log.conf # Defines the format string for %%(asctime)s in log records. Default: # %(default)s . This option is ignored if log_config_append is set. (string @@ -51,7 +51,7 @@ log_date_format = %d-%m-%Y %H:%M:%S # (Optional) The base directory used for relative log_file paths. This option # is ignored if log_config_append is set. (string value) # Deprecated group/name - [DEFAULT]/logdir -#log_dir = /home/saisree/Log/ +log_dir = /var/log @@ -143,7 +143,7 @@ server_url = http://localhost:8081/aai/ # The version of A&AI (string value) -server_url_version = v11 +server_url_version = v13 # SSL/TLS certificate file in pem format. This certificate must be registered # with the A&AI endpoint. (string value) @@ -154,7 +154,7 @@ certificate_key_file = /usr/local/bin/cert.key # Certificate Authority Bundle file in pem format. Must contain the appropriate # trust chain for theCertificate file. (string value) -# certificate_authority_bundle_file = ~/certs/ca-bundle.pem +certificate_authority_bundle_file = /usr/local/bin/cert.pem [api] @@ -169,6 +169,18 @@ certificate_key_file = /usr/local/bin/cert.key # Minimum value: 1 #default_api_return_limit = 100 +[conductor_api] + +# Basic Authentication Username (string value) +username = admin1 + +# Basic Authentication Password (string value) +password = plan.15 + +# To disable basic_auth_secure = false and to enable basic_auth_secure = true +basic_auth_secure = false + + [controller] @@ -206,7 +218,7 @@ certificate_key_file = /usr/local/bin/cert.key # # Music keyspace for messages (string value) -keyspace = conductor_rpc_saisree +keyspace = conductor_rpc # Wait interval while checking for a message response. Default value is 1 # second. (integer value) @@ -237,14 +249,12 @@ timeout = 3600 # # Base URL for Music REST API without a trailing slash. (string value) -server_url = http://localhost:8080/MUSIC/rest +server_url = http://localhost:8080/MUSIC/rest/v2 # DEPRECATED: List of hostnames (round-robin access) (list value) # This option is deprecated for removal. # Its value may be silently ignored in the future. # Reason: Use server_url instead -# hostnames = 135.197.226.85 -# 135.197.226.83, 135.197.226.85 # DEPRECATED: Port (integer value) # This option is deprecated for removal. @@ -298,7 +308,7 @@ server_url = http://localhost:8080/MUSIC/rest #table_prefix = sdnc # Base URL for SDN-C. (string value) -server_url = https://localhost:8082/restconf/ +server_url = http://localhost:8082/restconf/ # Basic Authentication Username (string value) username = admin diff --git a/test/csit/scripts/optf-has/has/has-properties/log.conf.onap b/test/csit/scripts/optf-has/has/has-properties/log.conf.onap new file mode 100644 index 000000000..41d66444e --- /dev/null +++ b/test/csit/scripts/optf-has/has/has-properties/log.conf.onap @@ -0,0 +1,65 @@ +[loggers] +keys=root + +[handlers] +keys=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[logger_root] +level=NOTSET +handlers=trfhand,consoleHandler,audithand,metrichand,errhand,debughand + +[handler_consoleHandler] +class=StreamHandler +level=NOTSET +formatter=generic +args=(sys.stdout,) + +[handler_trfhand] +class=handlers.TimedRotatingFileHandler +level=NOTSET +formatter=generic +args=('application.log','midnight', 1, 10) + +[handler_audithand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=audit +args=('audit.log', 'midnight', 1, 10) + +[handler_metrichand] +class=handlers.TimedRotatingFileHandler +level=INFO +formatter=metric +args=('metric.log','midnight', 1, 10) + +[handler_errhand] +class=handlers.TimedRotatingFileHandler +level=ERROR +formatter=error +args=('error.log','midnight', 1, 10) + +[handler_debughand] +class=handlers.TimedRotatingFileHandler +level=DEBUG +formatter=generic +args=('debug.log','midnight', 1, 10) + +[formatters] +keys=generic,audit,metric,error + +[formatter_audit] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s|||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_metric] +format=%(asctime)s|%(asctime)s|00000000-0000-0000-0000-000000000000||%(thread)d||Conductor|N/A|N/A|N/A|COMPLETE|200|sucessful||%(levelname)s|||0|%(module)s||||||||||%(name)s : [-] %(message)s +datefmt= + +[formatter_error] +format=%(asctime)s|00000000-0000-0000-0000-000000000000|%(thread)d|Conductor|N/A|N/A|N/A|ERROR|500|N/A|%(name)s : [-] %(message)s +datefmt= + +[formatter_generic] +format=%(asctime)s||%(thread)d|%(levelname)s|%(module)s|%(name)s: [-] %(message)s +datefmt= + diff --git a/test/csit/scripts/optf-has/has/has_proxy_settings.sh b/test/csit/scripts/optf-has/has/has_proxy_settings.sh new file mode 100755 index 000000000..92f8d93c7 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has_proxy_settings.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +# put into this file local proxy settings in case they are needed on your local environment +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/has_proxy_settings.sh" + +echo "optf/has proxy settings" +if [ "$#" -eq "1" ]; then + echo "$1" + cd $1 + pwd +else + exit 1 +fi + +# don't remove following lines: commands can be attached here + + diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh new file mode 100755 index 000000000..f6c2e7d51 --- /dev/null +++ b/test/csit/scripts/optf-has/has/has_script.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/has_script.sh" +# +# add here whatever commands is needed to prepare the optf/has CSIT testing +# + +# assume the base is /tmp dir +DIR=/tmp + +# the directory of the script +echo ${DIR} +cd ${DIR} + +# the temp directory used, within $DIR +# omit the -p parameter to create a temporal directory in the default location +WORK_DIR=`mktemp -d -p "$DIR"` +echo ${WORK_DIR} + +cd ${WORK_DIR} + +# check if tmp dir was created +if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then + echo "Could not create temp dir" + exit 1 +fi + +#git clone https://gerrit.onap.org/r/optf/has +cd has + +echo "i am ${USER} : only non jenkins users may need proxy settings" +if [ ${USER} != 'jenkins' ]; then + + # add proxy settings into this script when you work behind a proxy + ${WORKSPACE}/test/csit/scripts/optf-has/has/has_proxy_settings.sh ${WORK_DIR} + +fi + +# check Dockerfile content +# cat conductor/docker/Dockerfile + +#./build-dockers.sh + +# create directory for volume and copy configuration file +# run docker containers +COND_CONF=/tmp/conductor/properties/conductor.conf +LOG_CONF=/tmp/conductor/properties/log.conf +IMAGE_NAME=nexus3.onap.org:10001/onap/optf-has +CERT=/tmp/conductor/properties/cert.cer +KEY=/tmp/conductor/properties/cert.key +BUNDLE=/tmp/conductor/properties/cert.pem + +mkdir -p /tmp/conductor/properties +mkdir -p /tmp/conductor/logs +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/log.conf.onap /tmp/conductor/properties/log.conf +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.cer /tmp/conductor/properties/cert.cer +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.key /tmp/conductor/properties/cert.key +cp ${WORKSPACE}/test/csit/scripts/optf-has/has/has-properties/cert.pem /tmp/conductor/properties/cert.pem +#chmod -R 777 /tmp/conductor/properties + +MUSIC_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` +echo "MUSIC_IP=${MUSIC_IP}" + +# change MUSIC reference to the local instance +sed -i -e "s%localhost:8080/MUSIC%${MUSIC_IP}:8080/MUSIC%g" /tmp/conductor/properties/conductor.conf + +docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf +docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf + +COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api` +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091 + +# wait a while before continuing +sleep 30 + +echo "inspect docker things for tracing purpose" +docker inspect cond-data +docker inspect cond-cont +docker inspect cond-api +docker inspect cond-solv +docker inspect cond-resv + +docker exec -it music-db /usr/bin/nodetool status +docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM system_schema.keyspaces' +docker exec -it music-db /usr/bin/cqlsh -unelson24 -pwinman123 -e 'SELECT * FROM admin.keyspace_master' diff --git a/test/csit/plans/optf/has/teardown.sh b/test/csit/scripts/optf-has/has/has_teardown_script.sh index c586d92ca..40a536a87 100755 --- a/test/csit/plans/optf/has/teardown.sh +++ b/test/csit/scripts/optf-has/has/has_teardown_script.sh @@ -14,30 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. # - - -# -# add here below the killing of all docker containers used for optf/has CSIT testing -# -echo "##########################################################"; -echo "#"; -echo "# optf/has scripts docker containers killing"; -echo "#"; -echo "##########################################################"; -#kill-instance.sh cond-api -#kill-instance.sh cond-solv -#kill-instance.sh cond-cont -#kill-instance.sh cond-data -#kill-instance.sh cond-resv +echo "optf/has scripts docker containers killing"; docker stop cond-api docker stop cond-solv docker stop cond-cont -#docker stop cond-data +docker stop cond-data docker stop cond-resv docker rm cond-api docker rm cond-solv docker rm cond-cont -#docker rm cond-data +docker rm cond-data docker rm cond-resv diff --git a/test/csit/scripts/optf-has/has/music-properties/log4j.properties b/test/csit/scripts/optf-has/has/music-properties/log4j.properties new file mode 100644 index 000000000..1312e9bb9 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music-properties/log4j.properties @@ -0,0 +1,3 @@ +# No longer needed, please see the logback properties + + diff --git a/test/csit/scripts/optf-has/has/music-properties/music.properties b/test/csit/scripts/optf-has/has/music-properties/music.properties new file mode 100644 index 000000000..02fb52df1 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music-properties/music.properties @@ -0,0 +1,17 @@ +my.public.ip=localhost +all.public.ips=localhost +my.id=0 +all.ids=0 +####################################### +# Optional current values are defaults +####################################### +zookeeper.host=music-zk +cassandra.host=music-db +#music.ip=localhost +#debug=true +#music.rest.ip=localhost +#lock.lease.period=6000 +cassandra.user=nelson24 +cassandra.password=winman123 + + diff --git a/test/csit/scripts/optf-has/has/music_script.sh b/test/csit/scripts/optf-has/has/music_script.sh new file mode 100755 index 000000000..be4eb8c63 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music_script.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "### This is ${WORKSPACE}/test/csit/scripts/optf-has/has/music_script.sh" +# +# add here whatever commands is needed to prepare the music setup for optf-has CSIT testing +# + +# +# add here all the configuration steps eventually needed to be carried out for music CSIT testing +# +echo "# music configuration step"; + +CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest +TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 +ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +WORK_DIR=/tmp/music +CASS_USERNAME=nelson24 +CASS_PASSWORD=winman123 +MUSIC_SOURCE_PROPERTIES=${WORKSPACE}/test/csit/scripts/optf-has/has/music-properties +MUSIC_PROPERTIES=/tmp/music/properties +MUSIC_LOGS=/tmp/music/logs +mkdir -p ${MUSIC_PROPERTIES} +mkdir -p ${MUSIC_LOGS} + +cp ${MUSIC_SOURCE_PROPERTIES}/* ${WORK_DIR}/properties + +# Create Volume for mapping war file and tomcat +docker volume create --name music-vol; + +# Create a network for all the containers to run in. +docker network create music-net; + +# Start Cassandra +docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" -p "7199:7199" -p "9042:9042" -p "9160:9160" -e CASSUSER=${CASS_USERNAME} -e CASSPASS=${CASS_PASSWORD} ${CASS_IMG}; + +# Start Music war +docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; + +# Start Zookeeper +docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; + +# Delay for Cassandra +sleep 20; + +# Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. +docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; + +# Connect tomcat to host bridge network so that its port can be seen. +docker network connect bridge music-tomcat; + +# +# add here below the start of all docker containers needed for music CSIT testing +# + +CASSA_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-db` +echo "CASSANDRA_IP=${CASSA_IP}" + +ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` +echo "ZOOKEEPER_IP=${ZOO_IP}" + +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042 + +TOMCAT_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-tomcat` +echo "TOMCAT_IP=${TOMCAT_IP}" + +${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${TOMCAT_IP} 8080 + + +echo "inspect docker things for tracing purpose" +docker inspect music-db +docker inspect music-zk +docker inspect music-tomcat +docker inspect music-war +docker volume inspect music-vol +docker network inspect music-net + + + + + + + diff --git a/test/csit/scripts/optf-has/has/music_teardown_script.sh b/test/csit/scripts/optf-has/has/music_teardown_script.sh new file mode 100755 index 000000000..fa91f6e97 --- /dev/null +++ b/test/csit/scripts/optf-has/has/music_teardown_script.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Copyright 2016-2017 Huawei Technologies Co., Ltd. +# +# 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. +# +echo "music scripts docker containers killing"; +docker stop music-tomcat +docker stop music-war +docker stop music-zk +docker stop music-db + +docker rm music-zk +docker rm music-tomcat +docker rm music-war +docker rm music-db + +docker network rm music-net; +sleep 5; + +docker volume rm music-vol + +echo "dump music.log files" +ls -alF /tmp/music +ls -alF /tmp/music/properties +cat /tmp/music/properties/music.properties +cat /tmp/music/logs/MUSIC/music.log +cat /tmp/music/logs/MUSIC/error.log + diff --git a/test/csit/scripts/optf-has/has/wait_for_port.sh b/test/csit/scripts/optf-has/has/wait_for_port.sh new file mode 100755 index 000000000..10f08ded1 --- /dev/null +++ b/test/csit/scripts/optf-has/has/wait_for_port.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +if [[ $# -ne 2 ]]; then + echo "Usage: wait-for-port hostname port" >&2 + exit 1 +fi + +host=$1 +port=$2 + +echo "Waiting for $host port $port open" +until telnet $host $port </dev/null 2>/dev/null | grep -q '^Connected'; do + sleep 1 +done + +echo "$host port $port is open" + +exit 0 diff --git a/test/csit/scripts/optf/osdf/testsample.txt b/test/csit/scripts/optf-has/osdf/testsample.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/scripts/optf/osdf/testsample.txt +++ b/test/csit/scripts/optf-has/osdf/testsample.txt diff --git a/test/csit/scripts/optf/has/has_script.sh b/test/csit/scripts/optf/has/has_script.sh deleted file mode 100755 index 3da7e04c6..000000000 --- a/test/csit/scripts/optf/has/has_script.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# -# Copyright 2016-2017 Huawei Technologies Co., Ltd. -# -# 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. -# -echo "### This is ${WORKSPACE}/test/csit/scripts/optf/has/has_script.sh" -# -# add here whatever commands is needed to prepare the optf/has CSIT testing -# - -# assume the base is /opt -DIR=/opt -#cd /opt - -# the directory of the script -#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo ${DIR} -cd ${DIR} - -# the temp directory used, within $DIR -# omit the -p parameter to create a temporal directory in the default location -WORK_DIR=`mktemp -d -p "$DIR"` -echo ${WORK_DIR} - -cd ${WORK_DIR} - -# check if tmp dir was created -if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then - echo "Could not create temp dir" - exit 1 -fi - - -git clone https://gerrit.onap.org/r/optf/has -cd has -cd conductor/docker - -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" api/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" controller/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" data/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" reservation/Dockerfile -#sed -i -e "s%FROM python:2\.7%FROM python:2\.7\\nENV http_proxy http:\/\/one\.proxy\.att\.com:8080\\nENV https_proxy http:\/\/one\.proxy\.att\.com:8080%g" solver/Dockerfile - - -# ./build-dockers.sh -docker build -t api api/ -docker build -t controller controller/ -docker build -t data data/ -docker build -t solver solver/ -docker build -t reservation reservation/ - - -# create directory for volume and copy configuration file -mkdir -p /tmp/conductor/properties -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/conductor.conf.onap /tmp/conductor/properties/conductor.conf -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/cert.cer /tmp/conductor/properties/cert.cer -cp ${WORKSPACE}/test/csit/scripts/optf/has/has-properties/cert.key /tmp/conductor/properties/cert.key - - - -# run docker containers -#docker run -d --name cond-data -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf -v /tmp/conductor/properties/cert.key:/usr/local/bin/cert.key -v /tmp/conductor/properties/cert.cer:/usr/local/bin/cert.cer data -#docker run -d --name cond-data -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf data -docker run -d --name cond-cont -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf controller -docker run -d --name cond-api -p 8091:8091 -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf api -docker run -d --name cond-solv -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf solver -docker run -d --name cond-resv -v /tmp/conductor/properties/conductor.conf:/usr/local/bin/conductor.conf reservation - -# wait a while before continuing -sleep 30 diff --git a/test/csit/scripts/policy/script1.sh b/test/csit/scripts/policy/script1.sh index d66b0734c..cfa29ec6f 100755 --- a/test/csit/scripts/policy/script1.sh +++ b/test/csit/scripts/policy/script1.sh @@ -73,19 +73,19 @@ git clone http://gerrit.onap.org/r/oparent git clone http://gerrit.onap.org/r/policy/engine cd engine/packages/docker ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn prepare-package --settings ${WORK_DIR}/oparent/settings.xml -docker build -t onap/policy/policy-pe target/policy-pe +docker build -t onap/policy-pe target/policy-pe cd ${WORK_DIR} git clone http://gerrit.onap.org/r/policy/drools-pdp cd drools-pdp/packages/docker ${WORK_DIR}/maven/apache-maven-3.3.9/bin/mvn prepare-package --settings ${WORK_DIR}/oparent/settings.xml -docker build -t onap/policy/policy-drools target/policy-drools +docker build -t onap/policy-drools target/policy-drools cd ${WORK_DIR} git clone http://gerrit.onap.org/r/policy/docker cd docker -docker build -t onap/policy/policy-nexus policy-nexus +docker build -t onap/policy-nexus policy-nexus chmod +x config/drools/drools-tweaks.sh diff --git a/test/csit/tests/aai/esr-server/startup/test1.robot b/test/csit/tests/aai/esr-server/startup/test1.robot index 53afeed27..d1504a1b4 100644 --- a/test/csit/tests/aai/esr-server/startup/test1.robot +++ b/test/csit/tests/aai/esr-server/startup/test1.robot @@ -4,7 +4,7 @@ Library RequestsLibrary *** Test Cases *** Liveness Test [Documentation] Check various endpoints for basic liveness check - Create Session esr-server http://${ESRSERVER_IP}:9518 + Create Session esr-server https://${ESRSERVER_IP}:9518 CheckUrl esr-server /api/aai-esr-server/v1/test *** Keywords *** diff --git a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot index eee6ea569..47ce5f14d 100644 --- a/test/csit/tests/dcaegen2/testcases/dcae_ves.robot +++ b/test/csit/tests/dcaegen2/testcases/dcae_ves.robot @@ -75,12 +75,13 @@ Publish Single VES VNF Measurement Event Publish VES VoLTE Fault Batch Events [Tags] DCAE-VESC-R1 - [Documentation] Post batched events and expect 202 Response + [Documentation] Post batched events and expect 200 Response ${evtdata}= Get Event Data From File ${EVENT_BATCH_DATA_FILE} ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector No Auth ${VESC_URL} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata} Should Be Equal As Strings ${resp.status_code} 200 - ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025 Should Be Equal As Strings ${ret} true @@ -118,16 +119,16 @@ Publish VES Event With Invalid URL Path Should Be Equal As Strings ${resp.status_code} 404 -Enable VESC HTTPS And Basic Auth - [Tags] DCAE-VESC-R1 - [Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check - Enable VESC Https Auth - - ${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} - ${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1 - ${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 +#Enable VESC HTTPS And Basic Auth + #[Tags] DCAE-VESC-R1 + #[Documentation] Enable VESC Https and Authentication, Disable Http and Run Health Check + #Enable VESC Https Auth + # + #${auth}= Create List ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} + #${session}= Create Session dcaegen2-r1 ${VESC_URL_HTTPS} auth=${auth} disable_warnings=1 + #${headers}= Create Dictionary Accept=*/* X-FromAppId=${GLOBAL_APPLICATION_ID} + #${resp}= Get Request dcaegen2-r1 /healthcheck headers=${headers} + #Should Be Equal As Strings ${resp.status_code} 200 Publish Single VES Fault Event Over HTTPS [Tags] DCAE-VESC-R1 @@ -164,7 +165,8 @@ Publish VES Fault Batch Events Over HTTPS ${headers}= Create Header From String ${HEADER_STRING} ${resp}= Publish Event To VES Collector ${VESC_URL_HTTPS} ${VES_BATCH_EVENT_PATH} ${headers} ${evtdata} ${VESC_HTTPS_USER} ${VESC_HTTPS_PD} Should Be Equal As Strings ${resp.status_code} 200 - ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + #${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546016 + ${ret}= DMaaP Message Receive ab305d54-85b4-a31b-7db2-fb6b9e546025 Should Be Equal As Strings ${ret} true diff --git a/test/csit/tests/music/music-suite/music-test.robot b/test/csit/tests/music/music-suite/music-test.robot index 4af4ebc0d..9f8e435c8 100644 --- a/test/csit/tests/music/music-suite/music-test.robot +++ b/test/csit/tests/music/music-suite/music-test.robot @@ -56,6 +56,130 @@ Get Music Version Log To Console body = ${resp.text} Should Be Equal As Integers ${resp.status_code} 200 +Music AddOnBoarding + [Documentation] It sends a REST POST request to Music to Onboard a new application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + ${response_json} json.loads ${resp.content} + ${generatedAID}= Convert To String ${response_json['Generated AID']} + Set Global Variable ${generatedAID} + Log To Console generatedAID = ${generatedAID} + Should Be Equal As Integers ${resp.status_code} 200 + +Music CreateKeyspace + [Documentation] It sends a REST POST request to Music to create a new keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music CreateTable + [Documentation] It sends a REST POST request to Music to create a new Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}createtable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music InsertRow + [Documentation] It sends a REST POST request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}insertrow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Post Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows/?row=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music ReadRowJustInserted + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music UpdateRowInAtomicWay + [Documentation] It sends a REST PUT request to Music to create a new row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}updaterow_atomic.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Put Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music ReadRowAfterUpdate + [Documentation] It sends a REST GET request to Music to Read the row just inserted in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DeleteRow + [Documentation] It sends a REST DELETE request to Music to delete a row in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}deleterow_eventual.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable/rows?name=emp1 data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DropTable + [Documentation] It sends a REST Delete request to Music to drop one existing Table in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}droptable.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace/tables/MusicOnapTable data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Music DropKeyspace + [Documentation] It sends a REST DELETE request to Music to drop one existing keyspace in Cassandra + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}dropkeyspace.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/keyspaces/MusicOnapKeyspace data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + + +Music DeleteOnBoarding + [Documentation] It sends a REST DELETE request to Music to remove a previosly onboarded application + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + ${data}= Get Binary File ${CURDIR}${/}data${/}onboard.json + &{headers}= Create Dictionary ns=lb7254 userId=music password=music aid=${generatedAID} Content-Type=application/json Accept=application/json + ${resp}= Delete Request musicaas /MUSIC/rest/v2/admin/onboardAppWithMusic data=${data} headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + *** Keywords *** diff --git a/test/csit/tests/optf/has/__init__.robot b/test/csit/tests/optf-has/has/__init__.robot index fb654d7bb..fb654d7bb 100644 --- a/test/csit/tests/optf/has/__init__.robot +++ b/test/csit/tests/optf-has/has/__init__.robot diff --git a/test/csit/tests/optf/has/data/plan_with_wrong_version.json b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json index 9471fbf82..9471fbf82 100644 --- a/test/csit/tests/optf/has/data/plan_with_wrong_version.json +++ b/test/csit/tests/optf-has/has/data/plan_with_wrong_version.json diff --git a/test/csit/tests/optf/has/data/plan_without_demand_section.json b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json index 87a459d87..87a459d87 100644 --- a/test/csit/tests/optf/has/data/plan_without_demand_section.json +++ b/test/csit/tests/optf-has/has/data/plan_without_demand_section.json diff --git a/test/csit/tests/optf-has/has/optf_has_test.robot b/test/csit/tests/optf-has/has/optf_has_test.robot new file mode 100644 index 000000000..4882c229f --- /dev/null +++ b/test/csit/tests/optf-has/has/optf_has_test.robot @@ -0,0 +1,120 @@ +*** Settings *** +Library OperatingSystem +Library RequestsLibrary +Library json + +*** Variables *** +${MESSAGE} {"ping": "ok"} +${RESP_STATUS} "error" +${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" +${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand + +#global variables +${generatedPlanId} + +*** Test Cases *** +Check Cassandra Docker Container + [Documentation] It checks cassandra docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-db + +Check Zookeeper Docker Container + [Documentation] It checks zookeeper docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-zk + +Check Tomcat Docker Container + [Documentation] It checks tomcat docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-tomcat + +Check Music War Docker Container + [Documentation] It checks music.war docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} music-war + +Get Music Version + [Documentation] It sends a REST GET request to retrieve the Music.war version + Create Session musicaas ${MUSIC_HOSTNAME}:${MUSIC_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request musicaas /MUSIC/rest/v2/version headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + +Check ConductorApi Docker Container + [Documentation] It checks conductor-api docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-api + +Check ConductorController Docker Container + [Documentation] It checks conductor-controller docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-cont + +Check ConductorSolver Docker Container + [Documentation] It checks conductor-solver docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-solv + +Check ConductorReservation Docker Container + [Documentation] It checks conductor-reservation docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-resv + +Check ConductorData Docker Container + [Documentation] It checks conductor-data docker container is running + ${rc} ${output}= Run and Return RC and Output docker ps + Log To Console ********************* + Log To Console retrurn_code = ${rc} + Log To Console output = ${output} + Should Be Equal As Integers ${rc} 0 + Should Contain ${output} cond-data + +Get Root Url + [Documentation] It sends a REST GET request to root url + Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= Get Request optf-cond / headers=${headers} + Log To Console ********************* + Log To Console response = ${resp} + Log To Console body = ${resp.text} + Should Be Equal As Integers ${resp.status_code} 200 + + +*** Keywords *** + + diff --git a/test/csit/tests/optf/osdf/data/sampletest.txt b/test/csit/tests/optf-has/osdf/data/sampletest.txt index 9f4e8d7d6..9f4e8d7d6 100644 --- a/test/csit/tests/optf/osdf/data/sampletest.txt +++ b/test/csit/tests/optf-has/osdf/data/sampletest.txt diff --git a/test/csit/tests/optf/has/optf_has_test.robot b/test/csit/tests/optf/has/optf_has_test.robot deleted file mode 100644 index f939bd91a..000000000 --- a/test/csit/tests/optf/has/optf_has_test.robot +++ /dev/null @@ -1,65 +0,0 @@ -*** Settings *** -Library OperatingSystem -Library RequestsLibrary -Library json - -*** Variables *** -${MESSAGE} {"ping": "ok"} -${RESP_STATUS} "error" -${RESP_MESSAGE_WRONG_VERSION} "conductor_template_version must be one of: 2016-11-01" -${RESP_MESSAGE_WITHOUT_DEMANDS} Undefined Demand - -#global variables -${generatedPlanId} - -*** Test Cases *** -Check ConductorApi Docker Container - [Documentation] It checks cassandra docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-api - -Check ConductorController Docker Container - [Documentation] It checks zookeeper docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-cont - -Check ConductorSolver Docker Container - [Documentation] It checks tomcat docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-solv - -Check ConductorReservation War Docker Container - [Documentation] It checks music.war docker container is running - ${rc} ${output}= Run and Return RC and Output docker ps - Log To Console ********************* - Log To Console retrurn_code = ${rc} - Log To Console output = ${output} - Should Be Equal As Integers ${rc} 0 - Should Contain ${output} cond-resv - -Get Root Url - [Documentation] It sends a REST GET request to root url - Create Session optf-cond ${COND_HOSTNAME}:${COND_PORT} - &{headers}= Create Dictionary Content-Type=application/json Accept=application/json - ${resp}= Get Request optf-cond / headers=${headers} - Log To Console ********************* - Log To Console response = ${resp} - Log To Console body = ${resp.text} - Should Be Equal As Integers ${resp.status_code} 200 - - -*** Keywords *** - - diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip Binary files differnew file mode 100644 index 000000000..d1e6d9970 --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_empty.zip diff --git a/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip Binary files differnew file mode 100644 index 000000000..4e89aba3e --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/heat_template_ok.zip diff --git a/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot new file mode 100644 index 000000000..1a134b017 --- /dev/null +++ b/test/csit/tests/vnfsdk-ice/ice-server/validation_test.robot @@ -0,0 +1,69 @@ +*** settings *** +Library OperatingSystem +Library Process +Library String +Library Collections +Library RequestsLibrary +Library json + + +*** Variables *** +${valid_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_ok.zip +${empty_heat_zip} ${SCRIPTS}/../tests/vnfsdk-ice/ice-server/heat_template_empty.zip +${ice_uri} /onapapi/ice/v1/ + +*** Test Cases *** + +ICE health Check + [Documentation] Validate that ICE is up + Create Session ice_session http://${ICE_IP}:5000 + &{headers}= Create Dictionary Content-Type=application/json + + ${resp}= Get Request ice_session ${ice_uri} headers=${headers} + + Should Be Equal As Strings ${resp.status_code} 200 + +Check status code for valid HEAT based VNF package + [Documentation] Post a valid VNF package and expect 200 Response + ${fileData}= Get Binary File ${valid_heat_zip} + ${fileDir} ${fileName}= Split Path ${valid_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} file=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 200 + ${json} = Set Variable ${resp.json()} + ${message} = Get From Dictionary ${json} message + Should Be Equal ${message} OK + +Check status code for empty VNF package + [Documentation] Post an empty VNF package and expect 422 Response + ${fileData}= Get Binary File ${empty_heat_zip} + ${fileDir} ${fileName}= Split Path ${empty_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} file=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 422 + ${json} = Set Variable ${resp.json()} + ${message} = Get From Dictionary ${json} message + Should Be Equal ${message} Tests failed + +Check status code for invalid request + [Documentation] Post an invalid request and expect 400 Response + ${fileData}= Get Binary File ${empty_heat_zip} + ${fileDir} ${fileName}= Split Path ${empty_heat_zip} + ${partData}= Create List ${fileName} ${fileData} application/octet-stream + &{fileParts}= Create Dictionary + Set To Dictionary ${fileParts} foo=${partData} + + ${resp}= Post Request ice_session ${ice_uri} files=${fileParts} + + Log Receive HTTP Status code ${resp.status_code} + Should Be Equal As Strings ${resp.status_code} 400 diff --git a/test/ete/labs/windriver/Integration-SB-06-DNS-openrc b/test/ete/labs/windriver/Integration-SB-06-DNS-openrc new file mode 100644 index 000000000..5f211585a --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-06-DNS-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=2d7c6ec2cf9147fa974fa059b3673d7a +export OS_PROJECT_NAME=Integration-SB-06 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.5:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-06-openrc b/test/ete/labs/windriver/Integration-SB-06-openrc new file mode 100644 index 000000000..c7b650e2c --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-06-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=7fad299815104c0a8f90a8df80343f03 +export OS_PROJECT_NAME=Integration-SB-06 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-07-DNS-openrc b/test/ete/labs/windriver/Integration-SB-07-DNS-openrc new file mode 100644 index 000000000..170859f87 --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-07-DNS-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=885777d5e9074f31ad7801f9e6876b84 +export OS_PROJECT_NAME=Integration-SB-07 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.5:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public diff --git a/test/ete/labs/windriver/Integration-SB-07-openrc b/test/ete/labs/windriver/Integration-SB-07-openrc new file mode 100644 index 000000000..faf6b4bba --- /dev/null +++ b/test/ete/labs/windriver/Integration-SB-07-openrc @@ -0,0 +1,9 @@ +export OS_PROJECT_ID=1e097c6713e74fd7ac8e4295e605ee1e +export OS_PROJECT_NAME=Integration-SB-07 +export OS_USER_DOMAIN_NAME=Default +export OS_USERNAME=demo +export OS_PASSWORD=onapdemo +export OS_AUTH_URL=http://10.12.25.2:5000/v3 +export OS_IDENTITY_API_VERSION=3 +export OS_REGION_NAME=RegionOne +export OS_INTERFACE=public |