aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/Vagrantfile
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap/Vagrantfile')
-rw-r--r--bootstrap/vagrant-onap/Vagrantfile64
1 files changed, 40 insertions, 24 deletions
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 800ed992e..d70cf8f8a 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",
@@ -215,9 +211,18 @@ nodes = [
:groups => ["individual"],
:args => ['vid'],
},
+ {
+ :name => "vvp",
+ :ips => ['10.252.0.17', "192.168.50.17"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 4 * 1024,
+ :groups => ["individual"],
+ :args => ['vvp'],
+ },
]
-
run_path = 'vagrant_utils/postinstall.sh'
sdc_volume = 'vol1-sdc-data.vdi'
@@ -234,17 +239,16 @@ if File.exist?(vd_conf)
configuration.update(user_conf)
end
-#Set network interface
+# Set network interface
+net_interface = 'vboxnet0'
is_windows = Gem.win_platform?
if is_windows
net_interface = 'VirtualBox Host-Only Ethernet Adapter #2'
-else
- net_interface = 'vboxnet0'
end
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')
@@ -254,14 +258,14 @@ if requested_machine != nil
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|
@@ -296,6 +300,7 @@ Vagrant.configure("2") do |config|
config.proxy.http = ENV['http_proxy']
config.proxy.https = ENV['https_proxy']
config.proxy.no_proxy = ENV['no_proxy']
+ configuration['socks_proxy'] = ENV['socks_proxy']
end
if Vagrant.has_plugin?('vagrant-vbguest')
@@ -309,6 +314,7 @@ Vagrant.configure("2") do |config|
raise 'vagrant-libvirt was installed but it requires to execute again'
end
end
+
if provider == :openstack
config.ssh.username = 'ubuntu'
if not Vagrant.has_plugin?('vagrant-openstack-provider')
@@ -368,12 +374,21 @@ Vagrant.configure("2") do |config|
if !is_windows
nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
end
+
# Set Network
- nodeconfig.vm.network :private_network, ip: node[:ips][1]
+ nodeconfig.vm.network :private_network,
+ :adapter => 2,
+ :name => net_interface,
+ :ip => node[:ips][0]
+
+ nodeconfig.vm.network :private_network,
+ :adapter => 3,
+ :ip => node[:ips][1],
+ :type => :static
# 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)
@@ -386,8 +401,7 @@ Vagrant.configure("2") do |config|
v.storage :file, path: sdc_volume, bus: 'sata', device: 'vdb', size: '2G'
end
end
-
-
+
if node[:name].include? "testing"
nodeconfig.vm.synced_folder './tests', '/var/onap_tests/', create: true
test_suite = ENV.fetch('TEST_SUITE', '*')
@@ -395,9 +409,11 @@ Vagrant.configure("2") do |config|
# 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