From 176bfdbbb6064a036a3b8462de5fafdcd04d9dc3 Mon Sep 17 00:00:00 2001 From: Erik Wilson Date: Fri, 10 Jul 2020 15:36:46 -0700 Subject: [PATCH] Update Vagrant dev environment --- Vagrantfile | 11 ++++++----- scripts/provision/generic/centos8 | 1 + scripts/provision/generic/ubuntu2004 | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) create mode 120000 scripts/provision/generic/centos8 create mode 120000 scripts/provision/generic/ubuntu2004 diff --git a/Vagrantfile b/Vagrantfile index 231cf9bfee..5a909ba891 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,10 +1,11 @@ OS = (ENV['OS'] || "alpine310") BOX_REPO = (ENV['BOX_REPO'] || "generic") -HOME = File.dirname(__FILE__) -PROJECT = File.basename(HOME) +HOME = ENV['HOME'] +PROJ_HOME = File.dirname(__FILE__) +PROJECT = File.basename(PROJ_HOME) NUM_NODES = (ENV['NUM_NODES'] || 0).to_i NODE_CPUS = (ENV['NODE_CPUS'] || 4).to_i -NODE_MEMORY = (ENV['NODE_MEMORY'] || 4096).to_i +NODE_MEMORY = (ENV['NODE_MEMORY'] || 8192).to_i NETWORK_PREFIX = ENV['NETWORK_PREFIX'] || "10.135.135" VAGRANT_PROVISION = ENV['VAGRANT_PROVISION'] || "./scripts/provision/vagrant" MOUNT_TYPE = ENV['MOUNT_TYPE'] || "nfs" @@ -22,7 +23,7 @@ def provision(vm, node_num) vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}" vm.provision "shell", path: VAGRANT_PROVISION, - env: { 'HOME' => HOME, 'GOPATH' => ENV['GOPATH'], 'BOX' => vm.box } + env: { 'HOME' => PROJ_HOME, 'GOPATH' => ENV['GOPATH'], 'BOX' => vm.box } end Vagrant.configure("2") do |config| @@ -35,7 +36,7 @@ Vagrant.configure("2") do |config| if Vagrant.has_plugin?("vagrant-timezone") config.timezone.value = :host end - config.vm.synced_folder ".", HOME, type: MOUNT_TYPE + config.vm.synced_folder HOME, HOME, type: MOUNT_TYPE if NUM_NODES==0 provision(config.vm, 0) diff --git a/scripts/provision/generic/centos8 b/scripts/provision/generic/centos8 new file mode 120000 index 0000000000..2fdf3e8d9b --- /dev/null +++ b/scripts/provision/generic/centos8 @@ -0,0 +1 @@ +centos7 \ No newline at end of file diff --git a/scripts/provision/generic/ubuntu2004 b/scripts/provision/generic/ubuntu2004 new file mode 120000 index 0000000000..967c57335e --- /dev/null +++ b/scripts/provision/generic/ubuntu2004 @@ -0,0 +1 @@ +ubuntu1804 \ No newline at end of file