Add support to configuration values
In order to make more flexible the execution workflow of this
project, a new mechanism has been implemented to override the
default configuration values.
Change-Id: Ie6c5aeeb35b7f0de47379ea764ccc8dc21e4bff7
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-Id: INT-236
diff --git a/bootstrap/vagrant-onap/.gitignore b/bootstrap/vagrant-onap/.gitignore
index 446d1fb..3c502a0 100644
--- a/bootstrap/vagrant-onap/.gitignore
+++ b/bootstrap/vagrant-onap/.gitignore
@@ -7,3 +7,4 @@
lib/files/sources.list
openrc
doc/build/
+etc/settings.yaml
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 014f2fd..c10cb0b 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -1,46 +1,42 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
-
configuration = {
# Generic parameters used across all ONAP components
- 'public_net_id' => '00000000-0000-0000-0000-000000000000',
'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' => '1.0-STAGING-latest',
- 'gerrit_branch' => 'master',
-# Parameters for DCAE instantiation
+ # Parameters for DCAE instantiation
'dcae_zone' => 'iad4',
'dcae_state' => 'vi',
'openstack_tenant_id' => '',
'openstack_username' => '',
'openstack_api_key' => '',
'openstack_password' => '',
- 'nexus_repo_root' => 'https://nexus.onap.org',
- 'nexus_url_snapshot' => 'https://nexus.onap.org/content/repositories/snapshots',
- 'gitlab_branch' => 'master',
- 'build_image' => 'True',
- 'pull_docker_image' => 'True',
'odl_version' => '0.5.3-Boron-SR3',
+ # Parameters for enabling features
+ 'build_image' => 'True',
'clone_repo' => 'True',
'compile_repo' => 'False',
- 'enable_oparent' => 'True'
+ 'enable_oparent' => 'True',
+ 'skip_get_images' => 'False',
+ 'skip_install' => 'True'
}
-
box = {
:virtualbox => 'ubuntu/trusty64',
:libvirt => 'sputnik13/trusty64',
:openstack => nil
}
-
nodes = [
{
:name => "aai",
@@ -217,7 +213,6 @@
},
]
-
run_path = 'vagrant_utils/postinstall.sh'
sdc_volume = 'vol1-sdc-data.vdi'
@@ -234,7 +229,7 @@
configuration.update(user_conf)
end
-#Set network interface
+# Set network interface
net_interface = 'vboxnet0'
is_windows = Gem.win_platform?
if is_windows
@@ -243,7 +238,7 @@
puts "[INFO] Net interface: #{net_interface}"
-#If argument is given use it. Otherwise use Env: DEPLOY_MODE else use default
+# 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')
@@ -253,14 +248,14 @@
end
end
-#Catch the status of all machines
+# 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
+# In case of all-in-one or testing clean the nodes list
case deploy_mode
when 'all-in-one'
nodes.select! do |node|
@@ -368,6 +363,7 @@
if !is_windows
nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
end
+
# Set Network
nodeconfig.vm.network :private_network,
:adapter => 2,
@@ -381,7 +377,7 @@
# Specific settings:
- #Set Storage (For SDC or All-in-one)
+ # 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|
unless File.exist?(sdc_volume)
@@ -402,9 +398,11 @@
# 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
diff --git a/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst b/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst
new file mode 100644
index 0000000..e2da336
--- /dev/null
+++ b/bootstrap/vagrant-onap/doc/source/features/configure_execution.rst
@@ -0,0 +1,74 @@
+=======================
+Modify execution values
+=======================
+
+In order to provide a flexible plataform that adjusts to different developer
+needs, it has been implemented two mechanism to configure the execution of this
+project.
+
+Settings configuration file
+---------------------------
+
+The first mechanism refers to the process to replace default configuration
+values through a 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/features.rst b/bootstrap/vagrant-onap/doc/source/features/features.rst
index 9499698..d35c595 100644
--- a/bootstrap/vagrant-onap/doc/source/features/features.rst
+++ b/bootstrap/vagrant-onap/doc/source/features/features.rst
@@ -9,6 +9,7 @@
openstack.rst
consuming_scripts.rst
+ configure_execution.rst
This chapter explains how to use ONAP on Vagrant Advanced features
like different providers.
diff --git a/bootstrap/vagrant-onap/etc/settings.yaml.development b/bootstrap/vagrant-onap/etc/settings.yaml.development
new file mode 100644
index 0000000..594273b
--- /dev/null
+++ b/bootstrap/vagrant-onap/etc/settings.yaml.development
@@ -0,0 +1,6 @@
+build_images: "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
new file mode 100644
index 0000000..8beb476
--- /dev/null
+++ b/bootstrap/vagrant-onap/etc/settings.yaml.testing
@@ -0,0 +1,6 @@
+build_images: "False"
+clone_repo: "False"
+compile_repo: "False"
+enable_oparent: "False"
+skip_get_images: "False"
+skip_install: "False"
diff --git a/bootstrap/vagrant-onap/lib/aai b/bootstrap/vagrant-onap/lib/aai
index 7d87870..bd72ae0 100755
--- a/bootstrap/vagrant-onap/lib/aai
+++ b/bootstrap/vagrant-onap/lib/aai
@@ -199,5 +199,7 @@
install_ajsc_aai
_wait_for_sdc
- install_model_loader
+ if [[ "$skip_install" == "False" ]]; then
+ install_model_loader
+ fi
}
diff --git a/bootstrap/vagrant-onap/lib/appc b/bootstrap/vagrant-onap/lib/appc
index 33980ae..5e3858f 100755
--- a/bootstrap/vagrant-onap/lib/appc
+++ b/bootstrap/vagrant-onap/lib/appc
@@ -52,6 +52,10 @@
fi
fi
- get_appc_images
- install_appc
+ 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
index 6ea829f..85cdf4d 100755
--- a/bootstrap/vagrant-onap/lib/ccsdk
+++ b/bootstrap/vagrant-onap/lib/ccsdk
@@ -44,12 +44,6 @@
pull_onap_image ccsdk-$image-image
done
fi
-
-}
-
-# install_ccsdk() -
-function install_ccsdk {
- echo "pass"
}
# init_ccsdk() - Function that initialize Multi Cloud services
@@ -60,5 +54,4 @@
compile_ccsdk_repos
fi
fi
- install_ccsdk
}
diff --git a/bootstrap/vagrant-onap/lib/dcae b/bootstrap/vagrant-onap/lib/dcae
index 43da9f5..3e702d9 100755
--- a/bootstrap/vagrant-onap/lib/dcae
+++ b/bootstrap/vagrant-onap/lib/dcae
@@ -128,6 +128,10 @@
fi
_create_config_file
- get_dcae_images
- install_dcae
+ 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/mr b/bootstrap/vagrant-onap/lib/mr
index a137f73..f221817 100755
--- a/bootstrap/vagrant-onap/lib/mr
+++ b/bootstrap/vagrant-onap/lib/mr
@@ -31,6 +31,10 @@
if [[ "$clone_repo" == "True" ]]; then
clone_mr_repos
fi
- get_mr_images
- install_message_router
+ 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/mso b/bootstrap/vagrant-onap/lib/mso
index 4b20906..6ff4bbe 100755
--- a/bootstrap/vagrant-onap/lib/mso
+++ b/bootstrap/vagrant-onap/lib/mso
@@ -25,8 +25,8 @@
done
}
-# install_mso() - Installation of mso images
-function install_mso {
+# 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_folder
@@ -34,8 +34,8 @@
fi
}
-# install_mso_docker_config() - Download and install MSO Docker configuration project
-function install_mso_docker_config {
+# 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
@@ -108,6 +108,10 @@
fi
fi
- install_mso
- install_mso_docker_config
+ 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
index 1126d61..1c781fe 100755
--- a/bootstrap/vagrant-onap/lib/multicloud
+++ b/bootstrap/vagrant-onap/lib/multicloud
@@ -25,6 +25,11 @@
done
}
+# get_multicloud_images() -
+function get_multicloud_images {
+ echo "pass"
+}
+
# install_multicloud() -
function install_multicloud {
echo "pass"
@@ -38,5 +43,10 @@
compile_multicloud_repos
fi
fi
- install_multicloud
+ 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/policy b/bootstrap/vagrant-onap/lib/policy
index ce34056..f43087b 100755
--- a/bootstrap/vagrant-onap/lib/policy
+++ b/bootstrap/vagrant-onap/lib/policy
@@ -65,6 +65,10 @@
fi
fi
- get_policy_images
- install_policy
+ 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
index 998d6c0..4dc5ef9 100755
--- a/bootstrap/vagrant-onap/lib/portal
+++ b/bootstrap/vagrant-onap/lib/portal
@@ -67,6 +67,7 @@
install_package unzip
unzip -o etc.zip -d /PROJECT/OpenSource/UbuntuEP/
+ _install_mariadb
install_docker_compose
bash portal_vm_init.sh
@@ -88,7 +89,11 @@
compile_all_portal_repos
fi
fi
- get_portal_images
- _install_mariadb
- install_portal
+
+ 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
index 34b431a..ebcca6e 100755
--- a/bootstrap/vagrant-onap/lib/robot
+++ b/bootstrap/vagrant-onap/lib/robot
@@ -59,6 +59,11 @@
compile_robot_repos
fi
fi
- get_robot_images
- install_robot
+
+ 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
old mode 100644
new mode 100755
index 0580489..c7f79d6
--- a/bootstrap/vagrant-onap/lib/sdc
+++ b/bootstrap/vagrant-onap/lib/sdc
@@ -66,16 +66,11 @@
# get_sdc_images() - Function that retrieves the SDC docker images
function get_sdc_images {
if [[ "$build_image" == "True" ]]; then
- if [[ "$compile_repo" == "True" ]]; then
- compile_src $sdc_src_folder
- fi
build_docker_image $sdc_src_folder/sdc-docker-base
else
- if [["$pull_docker_image" == True]]; then
- for image in backend frontend elasticsearch kibana cassandra sanity; do
- pull_openecomp_image openecomp/sdc-$image
- done
- fi
+ for image in backend frontend elasticsearch kibana cassandra sanity; do
+ pull_openecomp_image openecomp/sdc-$image
+ done
fi
}
@@ -85,28 +80,23 @@
local MR_IP_ADDR='10.0.11.1'
_init_data_folders
- cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_run.sh /data/scripts
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_health.sh /data/scripts
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_login.sh /data/scripts
- cp $sdc_src_folder/sdc-os-chef/scripts/docker_clean.sh /data/scripts
- chmod +x /data/scripts/docker_run.sh
- chmod +x /data/scripts/docker_health.sh
- chmod +x /data/scripts/docker_login.sh
- chmod +x /data/scripts/docker_clean.sh
-
+ cp $sdc_src_folder/sdc-os-chef/environments/Template.json /data/environments
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_run.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_health.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_login.sh /data/scripts
+ cp $sdc_src_folder/sdc-os-chef/scripts/docker_clean.sh /data/scripts
+ chmod +x /data/scripts/docker_run.sh
+ chmod +x /data/scripts/docker_health.sh
+ chmod +x /data/scripts/docker_login.sh
+ chmod +x /data/scripts/docker_clean.sh
+
cat /data/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 [[ "$pull_docker_image" == "True" ]]; then
- docker_openecomp_login
- 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
+ bash /data/scripts/docker_run.sh -e $ENV_NAME -l
}
# init_sdc() - Function that initialize SDC services
@@ -118,7 +108,12 @@
compile_all_sdc_repos
fi
fi
- get_sdc_images
- install_sdc
+
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_sdc_images
+ if [[ "$skip_install" == "False" ]]; then
+ install_sdc
+ fi
+ fi
_setup_docker_aliases
}
diff --git a/bootstrap/vagrant-onap/lib/sdnc b/bootstrap/vagrant-onap/lib/sdnc
index c6d013b..22066fd 100755
--- a/bootstrap/vagrant-onap/lib/sdnc
+++ b/bootstrap/vagrant-onap/lib/sdnc
@@ -71,6 +71,11 @@
compile_all_sdnc_repos
fi
fi
- get_sdnc_images
- install_sdnc
+
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_sdnc_images
+ if [[ "$skip_install" == "False" ]]; then
+ install_sdnc
+ fi
+ fi
}
diff --git a/bootstrap/vagrant-onap/lib/vfc b/bootstrap/vagrant-onap/lib/vfc
index a879448..5cf0ed1 100755
--- a/bootstrap/vagrant-onap/lib/vfc
+++ b/bootstrap/vagrant-onap/lib/vfc
@@ -106,6 +106,10 @@
fi
fi
- get_vfc_images
- install_vfc
+ 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
index 55f399a..83b5309 100755
--- a/bootstrap/vagrant-onap/lib/vid
+++ b/bootstrap/vagrant-onap/lib/vid
@@ -56,6 +56,10 @@
fi
fi
- get_vid_images
- install_vid
+ if [[ "$skip_get_images" == "False" ]]; then
+ get_vid_images
+ if [[ "$skip_install" == "False" ]]; then
+ install_vid
+ fi
+ fi
}
diff --git a/bootstrap/vagrant-onap/tests/test_mso b/bootstrap/vagrant-onap/tests/test_mso
index cb7b014..deea7bb 100644
--- a/bootstrap/vagrant-onap/tests/test_mso
+++ b/bootstrap/vagrant-onap/tests/test_mso
@@ -4,7 +4,7 @@
source /var/onap/mso
covered_functions=(
-"clone_all_mso_repos" "compile_all_mso_repos" "install_mso" "install_mso_docker_config"
+"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
@@ -40,8 +40,8 @@
asserts_file_exist $src_folder/libs/swift-model/target/swift-model-1.1.0-SNAPSHOT.jar
}
-# test_install_mso() - Verify the creation of MSO Docker images
-function test_install_mso {
+# test_get_mso_images() - Verify the creation of MSO Docker images
+function test_get_mso_images {
clone_all_mso_repos
install_mso
@@ -50,8 +50,8 @@
done
}
-# test_install_mso_docker_config - Verify the execution of MSO Docker images
-function test_install_mso_docker_config {
+# test_install_mso - Verify the execution of MSO Docker images
+function test_install_mso {
clone_all_mso_repos
install_mso
install_mso_docker_config
diff --git a/bootstrap/vagrant-onap/tests/test_multicloud b/bootstrap/vagrant-onap/tests/test_multicloud
index 3d60533..374272c 100644
--- a/bootstrap/vagrant-onap/tests/test_multicloud
+++ b/bootstrap/vagrant-onap/tests/test_multicloud
@@ -4,7 +4,7 @@
source /var/onap/multicloud
covered_functions=(
-"clone_multicloud_repos" "compile_multicloud_repos" "install_multicloud"
+"clone_multicloud_repos" "compile_multicloud_repos" "get_multicloud_images" "install_multicloud"
)
# test_clone_multicloud_repos() - Verify that Multi Cloud repositories are cloned properly
@@ -24,9 +24,16 @@
asserts_file_exist $multicloud_src_folder/openstack/newton/target/multicloud-openstack-newton-1.0.0-SNAPSHOT.zip
}
+# test_get_multicloud_images() -
+function test_get_multicloud_images {
+ clone_multicloud_repos
+ get_multicloud_images
+}
+
# test_install_multicloud() - Verify the built and start of Multi Cloud services
function test_install_multicloud {
clone_multicloud_repos
+ get_multicloud_images
install_multicloud
}
diff --git a/bootstrap/vagrant-onap/tools/Run.ps1 b/bootstrap/vagrant-onap/tools/Run.ps1
index 8e6c94f..71e595b 100644
--- a/bootstrap/vagrant-onap/tools/Run.ps1
+++ b/bootstrap/vagrant-onap/tools/Run.ps1
@@ -20,6 +20,12 @@
.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
#>
@@ -44,7 +50,17 @@
[Parameter(Mandatory=$False,HelpMessage="Skips warning prompt.")]
[AllowNull()]
[Switch]
- $y = $false
+ $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) )
@@ -63,6 +79,9 @@
}
}
+$env:SKIP_GET_IMAGES=$skip_get_images
+$env:SKIP_INSTALL=$skip_install
+
switch ($Command)
{
"all_in_one" { $env:DEPLOY_MODE="all-in-one" }
diff --git a/bootstrap/vagrant-onap/tools/run.sh b/bootstrap/vagrant-onap/tools/run.sh
index 08eae01..9e03384 100755
--- a/bootstrap/vagrant-onap/tools/run.sh
+++ b/bootstrap/vagrant-onap/tools/run.sh
@@ -6,6 +6,10 @@
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>
@@ -23,11 +27,17 @@
COMMAND=$1
-while getopts "ys:c:" OPTION "${@:2}"; do
+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."