From f144563cb0b7c1709602086a4ef9fcf6981a2e9f Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Thu, 17 Jan 2019 05:03:50 -0800 Subject: Deprecate trusty support Trusty libvirt boxes have issues to setup the IP address during the provisioning process. This change deprecates the usage of Vagrant Trusty boxes in favor to Xenail. Change-Id: I74c0e77c9812c31ff7504c16f8538f9293b7f3f6 Signed-off-by: Victor Morales Issue-ID: INT-478 --- Vagrantfile | 27 ++++++++++++++++----------- 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 939349a..d10ee7a 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 -- cgit 1.2.3-korg