Update devstack vagrant definition for private cloud
[releng/builder.git] / vagrant / docker / Vagrantfile
index 278a0581d9ac7aa4a5c8d7f4dcb1642d6538fe59..df954e618bd4d3167f54681c23c6a25bcf584fbc 100644 (file)
@@ -14,6 +14,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   # so use that
   config.ssh.username = 'root'
 
+  # Fedora and EL systems default to requiring tty for sudo
+  # This should have been disabled with the Vagrant ready
+  # base box conversion (see rackspace-convert-base vagrant)
+  # but just to be safe
+  config.ssh.pty = false
+
   # make sure to set the following in your
   # ~/.vagrant.d/boxes/dummy/0/rackspace/Vagrantfile
   # rs.username
@@ -44,13 +50,33 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     end
   end
 
+  # Explicitlly set default shared folder and load lib folder
+  config.vm.synced_folder ".", "/vagrant"
+  config.vm.synced_folder "../lib/", "/vagrant/lib"
+
   # run our bootstrapping for the ovsdb-devstack system
   config.vm.provision 'shell', path: 'bootstrap.sh'
 
+
+  #################
+  # LF NETWORKING #
+  #################
+
+  if ENV['LFNETWORK']
+    # reconfigure the network setup to support our special private setup
+    config.vm.provision 'shell', path: '../lib/lf-networking/configure_lf_infra.sh',
+      args: ENV['RSSUBDOMAIN']
+  end
+
+
+  #################
+  # FINAL CLEANUP #
+  #################
+
   # set RSRESEAL to... anything if you want to snap an image of this box
   # not setting the environment variable will cause the system to come
   # up fully and not be in a resealable state
   if ENV['RSRESEAL']
-    config.vm.provision 'shell', path: 'system_reseal.sh'
+    config.vm.provision 'shell', path: '../lib/system_reseal.sh'
   end
 end