aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-09-20 09:55:45 -0700
committerVictor Morales <victor.morales@intel.com>2017-09-20 09:55:45 -0700
commitdbe2e0b8ff4476016f68c8885bbaa23c303aeafa (patch)
tree6300e53e747f83ca0e2512bc3db96f8cb3ca8f07 /bootstrap
parent7e83d7fbdb6975f7b9e47284aacc833749853d62 (diff)
Update SDC lib and test scripts
The SDC project has updated its compilation output files, as result the Unit Test needs to be changed. Change-Id: I31c7773a2de1ac865ce8b45a5c10e5995ee960d0 Signed-off-by: Victor Morales <victor.morales@intel.com> Issue-Id: INT-16
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile66
-rw-r--r--bootstrap/vagrant-onap/lib/sdc10
-rwxr-xr-xbootstrap/vagrant-onap/lib/vfc4
-rw-r--r--bootstrap/vagrant-onap/tests/test_sdc19
4 files changed, 46 insertions, 53 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/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/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
}