summaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap')
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile66
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions9
-rw-r--r--bootstrap/vagrant-onap/lib/sdc10
-rwxr-xr-xbootstrap/vagrant-onap/lib/sdnc2
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc4
-rw-r--r--bootstrap/vagrant-onap/tests/test_sdc19
-rw-r--r--bootstrap/vagrant-onap/tests/test_sdnc51
7 files changed, 77 insertions, 84 deletions
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index adc73ca0d..800ed992e 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -42,7 +42,7 @@ box = {
nodes = [
- {
+ {
:name => "aai",
:ips => ['10.252.0.6', "192.168.50.6"],
:macs => [],
@@ -52,7 +52,7 @@ nodes = [
:groups => ["individual"],
:args => ["aai"]
},
- {
+ {
:name => "all-in-one",
:ips => ['10.252.0.3', "192.168.50.3"],
:macs => [],
@@ -63,7 +63,7 @@ nodes = [
:flavor => 'm1.xlarge',
:args => ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk'],
},
- {
+ {
:name => "appc",
:ips => ['10.252.0.14', "192.168.50.14"],
:macs => [],
@@ -73,7 +73,7 @@ nodes = [
:groups => ["individual"],
:args => ["appc"],
},
- {
+ {
:name => "ccsdk",
:ips => ['10.252.0.14', "192.168.50.17"],
:macs => [],
@@ -83,7 +83,7 @@ nodes = [
:groups => ["individual"],
:args => ["ccsdk"],
},
- {
+ {
:name => "dcae",
:ips => ['10.252.0.12', "192.168.50.12"],
:macs => [],
@@ -93,7 +93,7 @@ nodes = [
:groups => ["individual"],
:args => ["dcae"],
},
- {
+ {
:name => "dns",
:ips => ['10.252.0.3', "192.168.50.3"],
:macs => [],
@@ -104,7 +104,7 @@ nodes = [
:flavor => 'm1.small',
:args => [" "]
},
- {
+ {
:name => "message-router",
:ips => ['10.252.0.4', "192.168.50.4"],
:macs => [],
@@ -114,7 +114,7 @@ nodes = [
:groups => ["individual"],
:args => ["mr"],
},
- {
+ {
:name => "mso",
:ips => ['10.252.0.7', "192.168.50.7"],
:macs => [],
@@ -124,7 +124,7 @@ nodes = [
:groups => ["individual"],
:args => ["mso"],
},
- {
+ {
:name => "multicloud",
:ips => ['10.252.0.16', "192.168.50.16"],
:macs => [],
@@ -134,7 +134,7 @@ nodes = [
:groups => ["individual"],
:args => ["multicloud"],
},
- {
+ {
:name => "policy",
:ips => ['10.252.0.13', "192.168.50.13"],
:macs => [],
@@ -144,7 +144,7 @@ nodes = [
:groups => ["individual"],
:args => ["policy"],
},
- {
+ {
:name => "portal",
:ips => ['10.252.0.11', "192.168.50.11"],
:macs => [],
@@ -154,7 +154,7 @@ nodes = [
:groups => ["individual"],
:args => ["portal"],
},
- {
+ {
:name => "robot",
:ips => ['10.252.0.8', "192.168.50.8"],
:macs => [],
@@ -164,7 +164,7 @@ nodes = [
:groups => ["individual"],
:args => ["robot"],
},
- {
+ {
:name => "sdc",
:ips => ['10.252.0.5', "192.168.50.5"],
:macs => [],
@@ -174,7 +174,7 @@ nodes = [
:groups => ["individual"],
:args => ["sdc"],
},
- {
+ {
:name => "sdnc",
:ips => ['10.252.0.10', "192.168.50.10"],
:macs => [],
@@ -182,9 +182,9 @@ nodes = [
:cpu => "50",
:ram => 4 * 1024,
:groups => ["individual"],
- :args => ["sdnc"],
+ :args => ["sdnc"],
},
- {
+ {
:name => "testing",
:ips => ['10.252.0.3', "192.168.50.3"],
:macs => [],
@@ -195,7 +195,7 @@ nodes = [
:flavor => 'm1.small',
:args => [""],
},
- {
+ {
:name => "vfc",
:ips => ['10.252.0.15', "192.168.50.15"],
:macs => [],
@@ -205,8 +205,7 @@ nodes = [
:groups => ["individual"],
:args => ['vfc'],
},
-
- {
+ {
:name => "vid",
:ips => ['10.252.0.9', "192.168.50.9"],
:macs => [],
@@ -215,13 +214,12 @@ nodes = [
:ram => 4 * 1024,
:groups => ["individual"],
:args => ['vid'],
- },
+ },
]
-run_path = 'vagrant_utils/postinstall.sh'
-
-sdc_volume='vol1-sdc-data.vdi'
+run_path = 'vagrant_utils/postinstall.sh'
+sdc_volume = 'vol1-sdc-data.vdi'
Vagrant.require_version ">= 1.8.6"
@@ -229,7 +227,6 @@ Vagrant.require_version ">= 1.8.6"
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'
@@ -277,7 +274,6 @@ case deploy_mode
nodes.select! do |node|
if node[:groups][0].include?("individual")
true if node[:name]
-
end
end
@@ -325,22 +321,22 @@ Vagrant.configure("2") do |config|
config.vm.define node[:name] do |nodeconfig|
# 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, "--cpus", node[:cpus]]
vbox.customize ["modifyvm", :id, "--memory", node[:ram]]
end
-
+
nodeconfig.vm.provider "libvirt" do |lbox|
lbox.memory = node[:ram]
lbox.nested = true
end
-
+
nodeconfig.vm.provider :openstack do |obox|
obox.openstack_auth_url = ENV.fetch('OS_AUTH_URL', '')
obox.tenant_name = ENV.fetch('OS_TENANT_NAME', '')
@@ -357,15 +353,14 @@ Vagrant.configure("2") do |config|
obox.networks = ENV.fetch('OS_NETWORK', '')
obox.flavor = node[:flavor]
obox.server_name = node[:name]
-
end
# Set Box type
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/', create: true
@@ -373,11 +368,11 @@ Vagrant.configure("2") do |config|
if !is_windows
nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
end
- # Set Network
+ # Set Network
nodeconfig.vm.network :private_network, ip: node[:ips][1]
# Specific settings:
-
+
#Set Storage (For SDC or All-in-one)
if node[:name].include?("all-in-one") || node[:name].include?("sdc")
nodeconfig.vm.provider "virtualbox" do |v|
@@ -386,7 +381,7 @@ Vagrant.configure("2") do |config|
end
v.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', sdc_volume]
end
-
+
nodeconfig.vm.provider "libvirt" do |v|
v.storage :file, path: sdc_volume, bus: 'sata', device: 'vdb', size: '2G'
end
@@ -416,4 +411,3 @@ Vagrant.configure("2") do |config|
end #nodeconfig
end #node
end #config
-
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index 16e774178..8fff0c2c4 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -105,6 +105,15 @@ function _configure_docker_settings {
fi
if [ $https_proxy ]; then
echo "export https_proxy=$https_proxy" >> /etc/default/docker
+ #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.sh
+ chmod 755 chameleonsocks.sh
+ socks=$(echo $socks_proxy | sed -e "s/^.*\///" | sed -e "s/:.*$//")
+ port=$(echo $socks_proxy | sed -e "s/^.*://")
+ PROXY=$socks PORT=$port ./chameleonsocks.sh --install
+ fi
fi
echo "DOCKER_OPTS=\"-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock\"" >> /etc/default/docker
diff --git a/bootstrap/vagrant-onap/lib/sdc b/bootstrap/vagrant-onap/lib/sdc
index 275f64485..9ec04b21b 100644
--- a/bootstrap/vagrant-onap/lib/sdc
+++ b/bootstrap/vagrant-onap/lib/sdc
@@ -5,7 +5,7 @@ set -o xtrace
source /var/onap/functions
sdc_src_folder=$git_src_folder/sdc
-sdc_repos=("sdc-os-chef" "jtosca" "sdc-distribution-client" "sdc-titan-cassandra" "sdc-tosca" "sdc_common")
+sdc_repos=("jtosca" "sdc-distribution-client" "sdc-docker-base" "sdc-titan-cassandra" "sdc-tosca" "sdc-vnfdesign" "sdc-workflow-designer" "sdc_common")
# _mount_external_partition() - Create partition and mount the external volume
function _mount_external_partition {
@@ -69,7 +69,7 @@ function get_sdc_images {
if [[ "$compile_repo" != "True" ]]; then
compile_src $sdc_src_folder
fi
- build_docker_image $sdc_src_folder/sdc-os-chef docker
+ build_docker_image $sdc_src_folder/sdc-docker-base
else
for image in backend frontend elasticsearch kibana cassandra sanity; do
pull_openecomp_image openecomp/sdc-$image
@@ -81,8 +81,6 @@ function get_sdc_images {
function install_sdc {
local ENV_NAME=$dmaap_topic
local MR_IP_ADDR='10.0.11.1'
- local RELEASE=$docker_version
- NEXUS_DOCKER_PORT=$(echo $nexus_docker_repo | cut -d':' -f2)
_init_data_folders
cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
@@ -99,7 +97,9 @@ function install_sdc {
install_docker
if [[ "$pull_docker_image" == "True" ]]; then
docker_openecomp_login
- bash /data/scripts/docker_run.sh -e $ENV_NAME -r $RELEASE -p $NEXUS_DOCKER_PORT
+ bash /data/scripts/docker_run.sh -e $ENV_NAME -r $docker_version -p $(echo $nexus_docker_repo | cut -d':' -f2)
+ else
+ bash /data/scripts/docker_run.sh -e $ENV_NAME -l
fi
}
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index 770f6be9f..c6d013b79 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -6,7 +6,7 @@ source /var/onap/functions
source /var/onap/ccsdk
sdnc_src_folder=$git_src_folder/openecomp/sdnc
-sdnc_repos=("core" "adaptors" "northbound" "plugins" "oam")
+sdnc_repos=("adaptors" "architecture" "core" "features" "northbound" "oam" "parent" "plugins")
# clone_all_sdnc_repos() - Function that clones SDNC source repo.
function clone_all_sdnc_repos {
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index 2d1418258..fb32708e0 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -19,8 +19,8 @@ function clone_all_vfc_repos {
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")
+ 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_folder/$dirc
tox -e py27
diff --git a/bootstrap/vagrant-onap/tests/test_sdc b/bootstrap/vagrant-onap/tests/test_sdc
index bb0cd7010..9b6f5a5a5 100644
--- a/bootstrap/vagrant-onap/tests/test_sdc
+++ b/bootstrap/vagrant-onap/tests/test_sdc
@@ -1,7 +1,7 @@
#!/bin/bash
source /var/onap_tests/_test_base
-source /var/onap/asdc
+source /var/onap/sdc
covered_functions=(
"clone_all_sdc_repos" "compile_all_sdc_repos" "get_sdc_images" "install_sdc"
@@ -26,11 +26,10 @@ function test_compile_all_sdc_repos {
compile_all_sdc_repos
asserts_file_exist $sdc_src_folder/jtosca/target/jtosca-1.1.10-SNAPSHOT.jar
- asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.32-SNAPSHOT.jar
- asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.32-SNAPSHOT.jar
- asserts_file_exist $sdc_src_folder/sdc-os-chef/target/sdc-os-chef-1.1.0-SNAPSHOT.jar
- asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/target/sdc-titan-cassandra-1.0.0.jar
- asserts_file_exist $sdc_src_folder/sdc-tosca/target/sdc-tosca-1.1.50-SNAPSHOT.jar
+ asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-ci/target/sdc-distribution-ci-1.1.*-SNAPSHOT.jar
+ asserts_file_exist $sdc_src_folder/sdc-distribution-client/sdc-distribution-client/target/sdc-distribution-client-1.1.*-SNAPSHOT.jar
+ asserts_file_exist $sdc_src_folder/sdc-titan-cassandra/target/jamm-0.3.0.jar
+ asserts_file_exist $sdc_src_folder/sdc-tosca/target/sdc-tosca-1.1.*-SNAPSHOT.jar
for dirc in logging sdc-artifact-generator; do
name="openecomp-$dirc"
@@ -46,8 +45,8 @@ function test_get_sdc_images {
clone_all_sdc_repos
get_sdc_images
- for image in backend frontend elasticsearch kibana cassandra sanity; do
- asserts_image openecomp/sdc-$image
+ for image in sanity elasticsearch cassandra kibana frontend backend; do
+ asserts_image openecomp/base_sdc-$image
done
}
@@ -57,8 +56,8 @@ function test_install_sdc {
get_sdc_images
install_sdc
- for image in backend frontend elasticsearch kibana cassandra sanity; do
- asserts_image_running openecomp/sdc-$image
+ for image in elasticsearch cassandra kibana frontend backend; do
+ asserts_image_running openecomp/base_sdc-$image
done
}
diff --git a/bootstrap/vagrant-onap/tests/test_sdnc b/bootstrap/vagrant-onap/tests/test_sdnc
index bc742fad2..ddc1d9c6b 100644
--- a/bootstrap/vagrant-onap/tests/test_sdnc
+++ b/bootstrap/vagrant-onap/tests/test_sdnc
@@ -11,11 +11,14 @@ covered_functions=(
function test_clone_all_sdnc_repos {
clone_all_sdnc_repos
- asserts_file_exist $sdnc_src_folder/core/pom.xml
asserts_file_exist $sdnc_src_folder/adaptors/pom.xml
+ # asserts_file_exist $sdnc_src_folder/architecture/pom.xml
+ asserts_file_exist $sdnc_src_folder/core/pom.xml
+ # asserts_file_exist $sdnc_src_folder/features/pom.xml
asserts_file_exist $sdnc_src_folder/northbound/pom.xml
- asserts_file_exist $sdnc_src_folder/plugins/pom.xml
asserts_file_exist $sdnc_src_folder/oam/pom.xml
+ # asserts_file_exist $sdnc_src_folder/parent/pom.xml
+ asserts_file_exist $sdnc_src_folder/plugins/pom.xml
}
# test_compile_all_sdnc_repos() - Verify the correct compilation of SDNC projects
@@ -23,36 +26,24 @@ function test_compile_all_sdnc_repos {
clone_all_sdnc_repos
compile_all_sdnc_repos
- for adaptor in aai-service mdsal-resource resource-assignment sql-resource; do
- asserts_file_exist $sdnc_src_folder/adaptors/$adaptor/features/target/$adaptor-features-1.1.2-SNAPSHOT.jar
- asserts_file_exist $sdnc_src_folder/adaptors/$adaptor/installer/target/sdnc-$adaptor-1.1.2-SNAPSHOT-installer.zip
- asserts_file_exist $sdnc_src_folder/adaptors/$adaptor/provider/target/$adaptor-provider-1.1.2-SNAPSHOT.jar
- done
-
- asserts_file_exist $sdnc_src_folder/core/dblib/provider/target/dblib-provider-1.1.2-SNAPSHOT.jar
- asserts_file_exist $sdnc_src_folder/core/rootpom/target/rootpom-1.1.0-site_en.xml
- asserts_file_exist $sdnc_src_folder/core/target/sdnc-core-1.1.2-SNAPSHOT-site.xml
-
- for component in asdcApi dataChange vnfapi vnftools; do
- asserts_file_exist $sdnc_src_folder/northbound/$component/features/target/$component-features-1.1.2-SNAPSHOT.jar
- asserts_file_exist $sdnc_src_folder/northbound/$component/installer/target/sdnc-$component-1.1.2-SNAPSHOT-installer.zip
- if [[ "$component" != "vnftools" ]]; then
- asserts_file_exist $sdnc_src_folder/northbound/$component/model/target/$component-model-1.1.2-SNAPSHOT.jar
+ for component in generic-resource-api vnfapi vnftools; do
+ if [[ "$component" != "generic-resource-api" ]]; then
+ if [[ "$component" == "vnfapi" ]]; then
+ asserts_file_exist $sdnc_src_folder/northbound/vnfapi/model/target/vnfapi-model-1.2.0-SNAPSHOT.jar
+ fi
+ asserts_file_exist $sdnc_src_folder/northbound/$component/installer/target/sdnc-$component-1.2.0-SNAPSHOT-installer.zip
+ asserts_file_exist $sdnc_src_folder/northbound/$component/features/target/$component-features-1.2.0-SNAPSHOT.jar
+ asserts_file_exist $sdnc_src_folder/northbound/$component/provider/target/$component-provider-1.2.0-SNAPSHOT.jar
+ else
+ asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/features/target/generic-resource-api.features-1.2.0-SNAPSHOT.jar
+ asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/installer/target/sdnc-generic-resources-api-1.2.0-SNAPSHOT-installer.zip
+ asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/model/target/generic-resource-api.model-1.2.0-SNAPSHOT.jar
+ asserts_file_exist $sdnc_src_folder/northbound/generic-resource-api/provider/target/generic-resource-api.provider-1.2.0-SNAPSHOT.jar
fi
- asserts_file_exist $sdnc_src_folder/northbound/$component/provider/target/$component-provider-1.1.2-SNAPSHOT.jar
- done
- asserts_file_exist $sdnc_src_folder/northbound/dmaap-listener/target/dmaap-listener-1.1.2-SNAPSHOT.jar
- asserts_file_exist $sdnc_src_folder/northbound/ueb-listener/target/ueb-listener-1.1.2-SNAPSHOT.jar
-
- asserts_file_exist $sdnc_src_folder/oam/admportal/target/admportal.1.1.2-SNAPSHOT.zip
- asserts_file_exist $sdnc_src_folder/oam/dgbuilder/target/dgbuilder.1.1.2-SNAPSHOT.zip
- asserts_file_exist $sdnc_src_folder/oam/platform-logic/installer/target/platform-logic-installer-1.1.2-SNAPSHOT.zip
-
- for plugin in properties-node restapi-call-node; do
- asserts_file_exist $sdnc_src_folder/plugins/$plugin/features/target/$plugin-features-1.1.2-SNAPSHOT.jar
- asserts_file_exist $sdnc_src_folder/plugins/$plugin/installer/target/sdnc-$plugin-1.1.2-SNAPSHOT-installer.zip
- asserts_file_exist $sdnc_src_folder/plugins/$plugin/provider/target/$plugin-provider-1.1.2-SNAPSHOT.jar
done
+ asserts_file_exist $sdnc_src_folder/oam/admportal/target/admportal.*-SNAPSHOT.zip
+ asserts_file_exist $sdnc_src_folder/oam/dgbuilder/target/dgbuilder.*-SNAPSHOT.zip
+ asserts_file_exist $sdnc_src_folder/oam/platform-logic/installer/target/platform-logic-installer-*-SNAPSHOT.zip
}
# test_get_sdnc_images() - Verify that the SDNC images are created or retrieved