diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2019-01-18 00:09:07 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-18 00:09:07 +0000 |
commit | 07c12b82b1b23d9c824a46e9c861f79ee5a6867c (patch) | |
tree | ade1aa779fba577d7bdc2a9d559502822b605b95 | |
parent | dbe461f185aeed76c1a63b5302ff9b0f20952df6 (diff) | |
parent | f144563cb0b7c1709602086a4ef9fcf6981a2e9f (diff) |
Merge "Deprecate trusty support"
-rw-r--r-- | Vagrantfile | 27 | ||||
-rwxr-xr-x | lib/_installers | 16 |
2 files changed, 18 insertions, 25 deletions
diff --git a/Vagrantfile b/Vagrantfile index 506fdee..38c6fdb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -33,8 +33,8 @@ configuration = { } box = { - :virtualbox => 'ubuntu/trusty64', - :libvirt => 'elastic/ubuntu-14.04-x86_64', + :virtualbox => { :name => 'elastic/ubuntu-16.04-x86_64', :version => '20180708.0.0' }, + :libvirt => { :name => 'elastic/ubuntu-16.04-x86_64', :version=> '20180210.0.0'}, :openstack => nil } @@ -387,12 +387,21 @@ Vagrant.configure("2") do |config| config.vm.define node[:name] do |nodeconfig| # NO_PROXY definitions - if ENV['no_proxy'] != nil + if ENV['no_proxy'] != nil or ENV['NO_PROXY'] + $no_proxy = ENV['NO_PROXY'] || ENV['no_proxy'] || "127.0.0.1,localhost" + $subnet = "192.168.121" + if provider == :virtualbox + $subnet = "10.0.2" + end + # NOTE: This range is based on vagrant-libvirt network definition CIDR 192.168.121.0/27 + (1..31).each do |i| + $no_proxy += ",#{$subnet}.#{i}" + end 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'] + config.proxy.no_proxy = node[:ips].join(",") + "," + $no_proxy end # Common Settings: @@ -432,6 +441,7 @@ Vagrant.configure("2") do |config| lbox.nested = true lbox.cpu_mode = 'host-passthrough' lbox.cpus = node[:cpus] + lbox.management_network_address = "192.168.121.0/27" # Set Network nodeconfig.vm.network :private_network, @@ -475,13 +485,8 @@ Vagrant.configure("2") do |config| end # Set Box type - if ["openstack", "oom"].include? node[:name] - box = { - :virtualbox => 'ubuntu/xenial64', - :libvirt => 'elastic/ubuntu-16.04-x86_64' - } - end - nodeconfig.vm.box = box[provider] + nodeconfig.vm.box = box[provider][:name] + nodeconfig.vm.box_version = box[provider][:version] # Set Node name nodeconfig.vm.hostname = if node.has_key? :hostname then node[:hostname] else node[:name] end diff --git a/lib/_installers b/lib/_installers index 2ade933..af1d3b1 100755 --- a/lib/_installers +++ b/lib/_installers @@ -49,23 +49,11 @@ function install_java { # install_maven() - Install maven binaries function install_maven { - if is_package_installed maven3; then + if is_package_installed maven; then return fi install_java - source /etc/os-release || source /usr/lib/os-release - case ${ID,,} in - *suse) - ;; - ubuntu|debian) - install_package software-properties-common - add-apt-repository -y ppa:andrei-pozolotin/maven3 - ;; - rhel|centos|fedora) - ;; - esac - update_repos - install_package maven3 + install_package maven # Remove Java 7 uninstall_package openjdk-7-jdk |