diff options
57 files changed, 551 insertions, 28 deletions
diff --git a/docs/source/features/configure_execution.rst b/docs/source/features/configure_execution.rst index df08605..e42c04d 100644 --- a/docs/source/features/configure_execution.rst +++ b/docs/source/features/configure_execution.rst @@ -11,7 +11,7 @@ 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. +configuration values that will be overridden. .. note:: @@ -55,7 +55,7 @@ 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 +values that can be overridden using *-g* and *-i* respectively by the run scripts (*./tools/run.sh* and *.\\tools\\Run.ps1*). .. note:: diff --git a/docs/source/features/consuming_scripts.rst b/docs/source/features/consuming_scripts.rst index 4290c25..20fe2ed 100644 --- a/docs/source/features/consuming_scripts.rst +++ b/docs/source/features/consuming_scripts.rst @@ -3,13 +3,13 @@ Using the provisioning scripts ============================== Vagrant is a platform that uses prebaked images called -*vagrant boxes* to guarranty that running multiple times a +*vagrant boxes* to guarantee 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 +However, it's possible to provide an ONAP development environment without having to install Vagrant tool. This document explains how to -consume the provisioning scripts localed in **./lib** folder to +consume the provisioning scripts located in **./lib** folder to provision a development environment and the environment variables that modifies their behavior. @@ -52,7 +52,7 @@ and Available Inventory (AAI) service will be required to load the 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. +to provision a AAI Development environment. .. note:: diff --git a/docs/source/features/openstack.rst b/docs/source/features/openstack.rst index f44bc62..58bcc97 100644 --- a/docs/source/features/openstack.rst +++ b/docs/source/features/openstack.rst @@ -5,7 +5,7 @@ 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 +image accessible to your tenant and a Security Rule that allows to do SSH into the instance. Environment variables diff --git a/docs/source/install/known_issues.rst b/docs/source/install/known_issues.rst index 8db55e7..6a1bd4a 100644 --- a/docs/source/install/known_issues.rst +++ b/docs/source/install/known_issues.rst @@ -9,7 +9,7 @@ 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 during the provisioning process, the guest additions on the guest are hidden and subsequent mounts of shared directories with the host will fail. diff --git a/lib/_commons b/lib/_commons index 90f73d2..d433b46 100755 --- a/lib/_commons +++ b/lib/_commons @@ -1,4 +1,12 @@ #!/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 +############################################################################# # update_repos() - Function that updates linux repositories function update_repos { diff --git a/lib/_composed_functions b/lib/_composed_functions index 9f2d0a1..71268c8 100755 --- a/lib/_composed_functions +++ b/lib/_composed_functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# # build_docker_image() - Build Docker container image from source code function build_docker_image { diff --git a/lib/_installers b/lib/_installers index 3273f8c..939349a 100755 --- a/lib/_installers +++ b/lib/_installers @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/_commons source /var/onap/_onap_functions @@ -311,7 +319,7 @@ function install_haproxy { # _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_version=v1.6.14 local rancher_server=rancher/server:$rancher_server_version if [ ! -d /opt/rancher/current ]; then diff --git a/lib/_onap_functions b/lib/_onap_functions index c5ee7fc..07dc637 100755 --- a/lib/_onap_functions +++ b/lib/_onap_functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# # create_configuration_files() - Store credentials in files function create_configuration_files { @@ -1,8 +1,15 @@ #!/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 +############################################################################# source /var/onap/functions - # 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" @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/sdnc source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions diff --git a/lib/ci-management b/lib/ci-management new file mode 100755 index 0000000..da6df14 --- /dev/null +++ b/lib/ci-management @@ -0,0 +1,29 @@ +#!/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 +############################################################################# + +source /var/onap/functions + +# init_ci-management() - Init ci-management project +function init_ci-management { + local jenkins_username=${1:-$(git config --get gitreview.username)} + local jenkins_api_token=$2 + + if [[ "$clone_repo" == "True" ]]; then + clone_repos "ci-management" + pushd ${src_folders[ci-management]} + git submodule update --init + uninstall_package python-six + install_python_package jenkins-job-builder + cp jenkins.ini.example jenkins.ini + sed -i "s|user=#username#|user=$jenkins_username|g" jenkins.ini + sed -i "s|password=#api_token#|password=$jenkins_api_token|g" jenkins.ini + popd + fi +} diff --git a/lib/config/env-vars b/lib/config/env-vars index a3a4c33..3cb315c 100755 --- a/lib/config/env-vars +++ b/lib/config/env-vars @@ -1,4 +1,12 @@ #!/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 +############################################################################# # URL repository git_url="https://git.onap.org/" @@ -11,6 +19,7 @@ src_folders=( ["aai"]="$git_src_folder/aai" ["appc"]="$git_src_folder/appc" ["ccsdk"]="$git_src_folder/ccsdk" +["ci-management"]="$git_src_folder/ci-management" ["dcae"]="$git_src_folder/dcae" ["dmaap"]="$git_src_folder/dmaap" ["integration"]="$git_src_folder/integration" @@ -44,6 +53,7 @@ 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" +["ci-management"]="ci-management" ["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 \ @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions diff --git a/lib/files/aio_inventory.cfg b/lib/files/aio_inventory.cfg index d7ab09b..4aa655d 100644 --- a/lib/files/aio_inventory.cfg +++ b/lib/files/aio_inventory.cfg @@ -1,3 +1,12 @@ +# 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 +############################################################################# + [all] localhost ansible_connection=local diff --git a/lib/files/all-in-one b/lib/files/all-in-one index efdb2bf..60a8efa 100644 --- a/lib/files/all-in-one +++ b/lib/files/all-in-one @@ -1,3 +1,12 @@ +# 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 +############################################################################# + # These initial groups are the only groups required to be modified. The # additional groups are for more control of the environment. [control] diff --git a/lib/functions b/lib/functions index 198074b..e3354fc 100755 --- a/lib/functions +++ b/lib/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/_commons source /var/onap/config/env-vars diff --git a/lib/integration b/lib/integration index 3f106ab..42e49c3 100755 --- a/lib/integration +++ b/lib/integration @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions diff --git a/lib/multicloud b/lib/multicloud index ff6f970..337acdd 100755 --- a/lib/multicloud +++ b/lib/multicloud @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions diff --git a/lib/openstack b/lib/openstack index 53e474d..c698138 100755 --- a/lib/openstack +++ b/lib/openstack @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions source /var/onap/ccsdk @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/functions diff --git a/tests/_test_base b/tests/_test_base index b30632d..59b80a5 100755 --- a/tests/_test_base +++ b/tests/_test_base @@ -1,4 +1,12 @@ #!/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 +############################################################################# if [[ "$debug" == "True" ]]; then set -o xtrace diff --git a/tests/asserts b/tests/asserts index 441b9f0..37c0f79 100755 --- a/tests/asserts +++ b/tests/asserts @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap/commons diff --git a/tests/projects.txt b/tests/projects.txt index 2b4b675..3fef80d 100644 --- a/tests/projects.txt +++ b/tests/projects.txt @@ -9,10 +9,12 @@ aai/aai-config aai/aai-data aai/aai-service aai/babel +aai/cacher aai/chameleon aai/champ aai/data-router aai/eis +aai/enricher aai/esr-gui aai/esr-server aai/event-client @@ -33,11 +35,16 @@ aai/spike aai/tabular-data-service aai/test-config aai/traversal +aai/validation appc appc/cdt appc/deployment +appc/parent +ccsdk/apps +ccsdk/cds ccsdk/dashboard ccsdk/distribution +ccsdk/features ccsdk/parent ccsdk/platform/blueprints ccsdk/platform/nbapi @@ -80,7 +87,11 @@ dcaegen2/analytics dcaegen2/analytics/flink dcaegen2/analytics/pnda dcaegen2/analytics/tca +dcaegen2/analytics/tca-gen2 dcaegen2/collectors +dcaegen2/collectors/datafile +dcaegen2/collectors/hv-ves +dcaegen2/collectors/restconf dcaegen2/collectors/snmptrap dcaegen2/collectors/ves dcaegen2/deployments @@ -97,12 +108,14 @@ dcaegen2/platform/registrator dcaegen2/platform/servicechange-handler dcaegen2/services/heartbeat dcaegen2/services/mapper +dcaegen2/services/pm-mapper dcaegen2/services/prh dcaegen2/utils demo dmaap/buscontroller dmaap/datarouter dmaap/dbcapi +dmaap/kafka11aaf dmaap/messagerouter/dmaapclient dmaap/messagerouter/messageservice dmaap/messagerouter/mirroragent @@ -116,14 +129,22 @@ holmes/dsa holmes/engine-management holmes/rule-management integration +integration/csit integration/devtool integration/seccom logging-analytics +logging-analytics/pomba/pomba-aai-context-builder +logging-analytics/pomba/pomba-audit-common +logging-analytics/pomba/pomba-context-aggregator +logging-analytics/pomba/pomba-network-discovery-context-builder +logging-analytics/pomba/pomba-sdc-context-builder +logging-analytics/pomba/pomba-sdnc-context-builder modeling/modelspec modeling/toscaparsers msb/apigateway msb/discovery msb/java-sdk +msb/service-mesh msb/swagger-sdk mso mso/chef-repo @@ -132,11 +153,14 @@ mso/libs mso/mso-config multicloud/azure multicloud/framework +multicloud/k8s multicloud/openstack multicloud/openstack/vmware multicloud/openstack/windriver music music/distributed-kv-store +music/mdbc +music/prom ncomp ncomp/cdap ncomp/core @@ -149,22 +173,30 @@ ncomp/utils oom oom/registrator oparent +oparent/cia optf/cmso optf/has optf/osdf +policy/apex-pdp policy/api policy/common +policy/core +policy/distribution policy/docker policy/drools-applications policy/drools-pdp policy/engine policy/gui +policy/models policy/pap +policy/parent policy/pdp +policy/xacml-pdp portal portal/sdk sdc sdc/dcae-d/ci +sdc/dcae-d/dt sdc/dcae-d/dt-be-main sdc/dcae-d/dt-be-property sdc/dcae-d/fe @@ -172,8 +204,12 @@ sdc/dcae-d/rule-engine sdc/dcae-d/tosca-lab sdc/jtosca sdc/onap-ui +sdc/onap-ui-angular +sdc/onap-ui-common +sdc/onap-ui-react sdc/sdc-distribution-client sdc/sdc-docker-base +sdc/sdc-pubsub sdc/sdc-titan-cassandra sdc/sdc-tosca sdc/sdc-workflow-designer @@ -204,6 +240,7 @@ vfc/gvnfm/vnflcm vfc/gvnfm/vnfmgr vfc/gvnfm/vnfres vfc/nfvo/catalog +vfc/nfvo/db vfc/nfvo/driver/ems vfc/nfvo/driver/sfc vfc/nfvo/driver/vnfm/gvnfm diff --git a/tests/test_aai b/tests/test_aai index dd027d2..d403f9b 100755 --- a/tests/test_aai +++ b/tests/test_aai @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/aai diff --git a/tests/test_appc b/tests/test_appc index f567d7f..5d76e21 100755 --- a/tests/test_appc +++ b/tests/test_appc @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/appc diff --git a/tests/test_ccsdk b/tests/test_ccsdk index 28de270..da374b4 100755 --- a/tests/test_ccsdk +++ b/tests/test_ccsdk @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/ccsdk diff --git a/tests/test_dcae b/tests/test_dcae index 3c5400f..2e75ede 100755 --- a/tests/test_dcae +++ b/tests/test_dcae @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/dcae diff --git a/tests/test_dmaap b/tests/test_dmaap index 22cb4b7..f0d612e 100755 --- a/tests/test_dmaap +++ b/tests/test_dmaap @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/dmaap diff --git a/tests/test_integration b/tests/test_integration index 7032788..5ab23a7 100755 --- a/tests/test_integration +++ b/tests/test_integration @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/integration diff --git a/tests/test_mr b/tests/test_mr index ad1bcd2..e433934 100755 --- a/tests/test_mr +++ b/tests/test_mr @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/mr diff --git a/tests/test_msb b/tests/test_msb index 0848d33..1a8fbe8 100755 --- a/tests/test_msb +++ b/tests/test_msb @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/msb diff --git a/tests/test_mso b/tests/test_mso index 6a6bef7..8d05520 100755 --- a/tests/test_mso +++ b/tests/test_mso @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/mso diff --git a/tests/test_multicloud b/tests/test_multicloud index 1b5b85d..2a17406 100755 --- a/tests/test_multicloud +++ b/tests/test_multicloud @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/multicloud diff --git a/tests/test_policy b/tests/test_policy index b666cf9..889d8e8 100755 --- a/tests/test_policy +++ b/tests/test_policy @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/policy diff --git a/tests/test_portal b/tests/test_portal index d20f173..8bf9383 100755 --- a/tests/test_portal +++ b/tests/test_portal @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/portal diff --git a/tests/test_robot b/tests/test_robot index 165755c..f05523e 100755 --- a/tests/test_robot +++ b/tests/test_robot @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/robot diff --git a/tests/test_sdc b/tests/test_sdc index 6765780..a708963 100755 --- a/tests/test_sdc +++ b/tests/test_sdc @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/sdc diff --git a/tests/test_sdnc b/tests/test_sdnc index c4ddc56..685bebd 100755 --- a/tests/test_sdnc +++ b/tests/test_sdnc @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/sdnc diff --git a/tests/test_vfc b/tests/test_vfc index 3fadeaf..38eab54 100755 --- a/tests/test_vfc +++ b/tests/test_vfc @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vfc diff --git a/tests/test_vid b/tests/test_vid index 79a4152..55e5746 100755 --- a/tests/test_vid +++ b/tests/test_vid @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vid diff --git a/tests/test_vnfsdk b/tests/test_vnfsdk index cd29a97..5c3a7c6 100755 --- a/tests/test_vnfsdk +++ b/tests/test_vnfsdk @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vnfsdk diff --git a/tests/test_vvp b/tests/test_vvp index 8e9594d..e38bd05 100755 --- a/tests/test_vvp +++ b/tests/test_vvp @@ -1,4 +1,12 @@ #!/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 +############################################################################# source /var/onap_tests/_test_base source /var/onap/vvp diff --git a/tools/run.sh b/tools/run.sh index b09ddde..b0cdcb9 100755 --- a/tools/run.sh +++ b/tools/run.sh @@ -1,4 +1,12 @@ #!/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 +############################################################################# function usage { cat <<EOF diff --git a/tools/setup.sh b/tools/setup.sh index 54d10bf..7a12825 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -8,7 +8,17 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -vagrant_version=2.1.1 +set -o nounset +set -o pipefail + +vagrant_version=2.2.0 +if ! $(vagrant version &>/dev/null); then + enable_vagrant_install=true +else + if [[ "$vagrant_version" != "$(vagrant version | awk 'NR==1{print $3}')" ]]; then + enable_vagrant_install=true + fi +fi function usage { cat <<EOF @@ -31,6 +41,10 @@ while getopts ":p:" OPTION; do ;; esac done +if [[ -z "${provider+x}" ]]; then + usage + exit 1 +fi case $provider in "virtualbox" | "libvirt" ) @@ -47,17 +61,20 @@ packages=() case ${ID,,} in *suse) INSTALLER_CMD="sudo -H -E zypper -q install -y --no-recommends" + packages+=(python-devel) # 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 + if [[ "${enable_vagrant_install+x}" ]]; then + 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 + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -79,11 +96,14 @@ case ${ID,,} in ubuntu|debian) libvirt_group="libvirtd" INSTALLER_CMD="sudo -H -E apt-get -y -q=3 install" + packages+=(python-dev) # 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 + if [[ "${enable_vagrant_install+x}" ]]; then + 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 + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -94,7 +114,7 @@ case ${ID,,} in ;; libvirt) # vagrant-libvirt dependencies - packages+=(qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev) + packages+=(qemu libvirt-bin ebtables dnsmasq libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev cpu-checker) # NFS packages+=(nfs-kernel-server) ;; @@ -106,11 +126,14 @@ case ${ID,,} in PKG_MANAGER=$(which dnf || which yum) sudo $PKG_MANAGER updateinfo INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -q -y install" + packages+=(python-devel) # 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 + if [[ "${enable_vagrant_install+x}" ]]; then + 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 + fi case $VAGRANT_DEFAULT_PROVIDER in virtualbox) @@ -130,8 +153,39 @@ case ${ID,,} in esac +# Enable Nested-Virtualization +vendor_id=$(lscpu|grep "Vendor ID") +if [[ $vendor_id == *GenuineIntel* ]]; then + kvm_ok=$(cat /sys/module/kvm_intel/parameters/nested) + if [[ $kvm_ok == 'N' ]]; then + echo "Enable Intel Nested-Virtualization" + rmmod kvm-intel + echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf + modprobe kvm-intel + fi +else + kvm_ok=$(cat /sys/module/kvm_amd/parameters/nested) + if [[ $kvm_ok == '0' ]]; then + echo "Enable AMD Nested-Virtualization" + rmmod kvm-amd + sh -c "echo 'options kvm-amd nested=1' >> /etc/modprobe.d/dist.conf" + modprobe kvm-amd + fi +fi +modprobe vhost_net + ${INSTALLER_CMD} ${packages[@]} +if ! which pip; then + curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python +fi +sudo -H pip install --upgrade pip +sudo -H pip install tox +if [[ ${http_proxy+x} ]]; then + vagrant plugin install vagrant-proxyconf +fi if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then vagrant plugin install vagrant-libvirt - sudo usermod -a -G $libvirt_group $USER + sudo usermod -a -G $libvirt_group $USER # This might require to reload user's group assigments + sudo systemctl restart libvirtd + kvm-ok fi |