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/Vagrantfile169
1 files changed, 124 insertions, 45 deletions
diff --git a/bootstrap/vagrant-onap/Vagrantfile b/bootstrap/vagrant-onap/Vagrantfile
index 2490b1c75..31a9970a5 100644
--- a/bootstrap/vagrant-onap/Vagrantfile
+++ b/bootstrap/vagrant-onap/Vagrantfile
@@ -13,7 +13,7 @@ configuration = {
'nexus_password' => 'docker',
'dmaap_topic' => 'AUTO',
'artifacts_version' => '1.0.0',
- 'docker_version' => '1.0-STAGING-latest',
+ 'docker_version' => 'latest',
# Parameters for DCAE instantiation
'dcae_zone' => 'iad4',
'dcae_state' => 'vi',
@@ -23,6 +23,7 @@ configuration = {
'openstack_password' => '',
'odl_version' => '0.5.3-Boron-SR3',
# Parameters for enabling features
+ 'debug' => 'True',
'build_image' => 'True',
'clone_repo' => 'True',
'compile_repo' => 'False',
@@ -33,7 +34,7 @@ configuration = {
box = {
:virtualbox => 'ubuntu/trusty64',
- :libvirt => 'sputnik13/trusty64',
+ :libvirt => 'elastic/ubuntu-14.04-x86_64',
:openstack => nil
}
@@ -50,14 +51,14 @@ nodes = [
},
{
:name => "all-in-one",
- :ips => ['10.252.0.3', "192.168.50.3"],
+ :ips => ['10.252.1.3', "192.168.51.3"],
:macs => [],
:cpus => 2,
:cpu => "50",
:ram => 12 * 1024,
:groups => ["all-in-one"],
:flavor => 'm1.xlarge',
- :args => ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk'],
+ :args => ['mr', 'sdc', 'aai', 'mso', 'robot', 'vid', 'sdnc', 'portal', 'dcae', 'policy', 'appc', 'vfc', 'ccsdk', 'multicloud', 'vnfsdk', 'vpp', 'msb'],
},
{
:name => "appc",
@@ -71,7 +72,7 @@ nodes = [
},
{
:name => "ccsdk",
- :ips => ['10.252.0.14', "192.168.50.17"],
+ :ips => ['10.252.0.19', "192.168.50.19"],
:macs => [],
:cpus => 2,
:cpu => "50",
@@ -112,7 +113,7 @@ nodes = [
},
{
:name => "mso",
- :ips => ['10.252.0.7', "192.168.50.7"],
+ :ips => ['10.252.0.20', "192.168.50.20"],
:macs => [],
:cpus => 2,
:cpu => "50",
@@ -121,6 +122,16 @@ nodes = [
:args => ["mso"],
},
{
+ :name => "msb",
+ :ips => ['10.252.0.7', "192.168.50.7"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 4 * 1024,
+ :groups => ["individual"],
+ :args => ["msb"],
+ },
+ {
:name => "multicloud",
:ips => ['10.252.0.16', "192.168.50.16"],
:macs => [],
@@ -129,6 +140,24 @@ nodes = [
:ram => 4 * 1024,
:groups => ["individual"],
:args => ["multicloud"],
+ :fwds => [
+ { :guest => 9003, :host => 9003, :guest_ip => '192.168.50.16' },
+ ]
+ },
+ {
+ :name => "oom",
+ :ips => ['10.252.0.21', "192.168.50.21"],
+ :macs => [],
+ :cpus => 16,
+ :cpu => "50",
+ :ram => 64 * 1024,
+ :groups => ["individual"],
+ :args => ["oom"],
+ :hd => "60G",
+ :fwds => [
+ { :guest => 8880, :host => 8880, :guest_ip => '192.168.50.21' },
+ { :guest => 8989, :host => 8989, :guest_ip => '192.168.50.21' },
+ ]
},
{
:name => "policy",
@@ -169,6 +198,7 @@ nodes = [
:ram => 8 * 1024,
:groups => ["individual"],
:args => ["sdc"],
+ :hd => "20G",
},
{
:name => "sdnc",
@@ -182,7 +212,7 @@ nodes = [
},
{
:name => "testing",
- :ips => ['10.252.0.3', "192.168.50.3"],
+ :ips => ['10.252.2.3', "192.168.52.3"],
:macs => [],
:cpus => 2,
:cpu => "50",
@@ -212,14 +242,14 @@ nodes = [
:args => ['vid'],
},
{
- :name => "vnfsdk",
- :ips => ['10.252.0.16', "192.168.50.16"],
- :macs => [],
- :cpus => 2,
- :cpu => "50",
- :ram => 4 * 1024,
- :groups => ["individual"],
- :args => ['vnfsdk'],
+ :name => "vnfsdk",
+ :ips => ['10.252.0.18', "192.168.50.18"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 4 * 1024,
+ :groups => ["individual"],
+ :args => ['vnfsdk'],
},
{
:name => "vvp",
@@ -230,6 +260,20 @@ nodes = [
:ram => 4 * 1024,
:groups => ["individual"],
:args => ['vvp'],
+ },
+ {
+ :name => "openstack",
+ :ips => ['10.252.3.3', "192.168.53.3"],
+ :macs => [],
+ :cpus => 2,
+ :cpu => "50",
+ :ram => 8 * 1024,
+ :groups => ["individual"],
+ :args => ['openstack'],
+ :fwds => [
+ { :guest => 80, :host => 8888, :guest_ip => '192.168.53.4' },
+ { :guest => 6080, :host => 6080, :guest_ip => '192.168.53.4' },
+ ]
}
]
@@ -301,15 +345,14 @@ end
Vagrant.configure("2") do |config|
- # PROXY definitions
- if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil and ENV['no_proxy'] != nil
+ # PROXY definitions
+ if ENV['http_proxy'] != nil and ENV['https_proxy'] != nil
if not Vagrant.has_plugin?('vagrant-proxyconf')
system 'vagrant plugin install vagrant-proxyconf'
raise 'vagrant-proxyconf was installed but it requires to execute again'
end
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
@@ -318,11 +361,13 @@ Vagrant.configure("2") do |config|
config.vbguest.auto_update = false
end
+ sync_type = "virtualbox"
if provider == :libvirt
if not Vagrant.has_plugin?('vagrant-libvirt')
system 'vagrant plugin install vagrant-libvirt'
raise 'vagrant-libvirt was installed but it requires to execute again'
end
+ sync_type = "nfs"
end
if provider == :openstack
@@ -336,6 +381,15 @@ Vagrant.configure("2") do |config|
nodes.each do |node|
config.vm.define node[:name] do |nodeconfig|
+ # NO_PROXY definitions
+ if ENV['no_proxy'] != nil
+ if not Vagrant.has_plugin?('vagrant-proxyconf')
+ system 'vagrant plugin install vagrant-proxyconf'
+ raise 'vagrant-proxyconf was installed but it requires to execute again'
+ end
+ config.proxy.no_proxy = node[:ips].join(",") + "," + ENV['no_proxy']
+ end
+
# Common Settings:
nodeconfig.vm.provider "virtualbox" do |vbox|
@@ -346,11 +400,55 @@ Vagrant.configure("2") do |config|
vbox.customize ['modifyvm', :id, "--cpuexecutioncap", node[:cpu]]
vbox.customize ['modifyvm', :id, "--cpus", node[:cpus]]
vbox.customize ["modifyvm", :id, "--memory", node[:ram]]
+
+ # Set Network
+ 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
+
+ # Set Storage
+ if node.has_key? :hd
+ volume_file = node[:name] + '-vol1-data.vdi'
+ unless File.exist?(volume_file)
+ vbox.customize ['createhd', '--filename', volume_file, '--size', node[:hd]]
+ end
+ vbox.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', volume_file]
+ end
end
nodeconfig.vm.provider "libvirt" do |lbox|
lbox.memory = node[:ram]
lbox.nested = true
+ lbox.cpu_mode = 'host-passthrough'
+ lbox.cpus = node[:cpus]
+
+ # Set Network
+ nodeconfig.vm.network :private_network,
+ :ip => node[:ips][0]
+
+ nodeconfig.vm.network :private_network,
+ :ip => node[:ips][1],
+ :type => :static
+
+ # Set Storage
+ if node.has_key? :hd
+ lbox.storage :file, bus: 'sata', device: 'sda', size: node[:hd]
+ end
+ end
+ if node.has_key? :fwds
+ node[:fwds].each do |fwd|
+ nodeconfig.vm.network :forwarded_port,
+ :guest => fwd[:guest],
+ :guest_ip => fwd[:guest_ip],
+ :host => fwd[:host],
+ :host_ip => "0.0.0.0"
+ end
end
nodeconfig.vm.provider :openstack do |obox|
@@ -372,6 +470,12 @@ Vagrant.configure("2") do |config|
end
# Set Box type
+ if "openstack" == node[:name]
+ box = {
+ :virtualbox => 'ubuntu/xenial64',
+ :libvirt => 'elastic/ubuntu-16.04-x86_64'
+ }
+ end
nodeconfig.vm.box = box[provider]
# Set Node name
@@ -379,39 +483,14 @@ Vagrant.configure("2") do |config|
# Set Sync Folder
nodeconfig.vm.synced_folder ".", "/vagrant", disabled: true
- nodeconfig.vm.synced_folder './opt', '/opt/', create: true
- nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true
+ nodeconfig.vm.synced_folder './opt', '/opt/', create: true, type: sync_type
+ nodeconfig.vm.synced_folder './lib', '/var/onap/', create: true, type: sync_type
if !is_windows
nodeconfig.vm.synced_folder '~/.m2', '/root/.m2/', create: true
end
- # Set Network
- 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)
- if node[:name].include?("all-in-one") || node[:name].include?("sdc")
- nodeconfig.vm.provider "virtualbox" do |v|
- unless File.exist?(sdc_volume)
- v.customize ['createhd', '--filename', sdc_volume, '--size', 20 * 1024]
- 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
- end
-
if node[:name].include? "testing"
nodeconfig.vm.synced_folder './tests', '/var/onap_tests/', create: true
test_suite = ENV.fetch('TEST_SUITE', '*')