X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Vagrantfile;h=ff38151520a3dc5241d869734344df28f4568d95;hb=a25b628286e6e0c00facb99a44e9fc4efd377536;hp=48af4ae518dad0a8ae1f5d76ca8ee5c718d0cc7d;hpb=f68df6a9b06c7f683716c005b040c3a7bf0db046;p=friendica.git diff --git a/Vagrantfile b/Vagrantfile index 48af4ae518..ff38151520 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,59 +1,67 @@ -server_ip = "192.168.22.10" -server_memory = "384" # MB -server_timezone = "UTC" - -public_folder = "/vagrant" - -Vagrant.configure("2") do |config| - - # Set server to Ubuntu 12.04 - config.vm.box = "precise64" - - config.vm.box_url = "http://files.vagrantup.com/precise64.box" - - # Create a hostname, don't forget to put it to the `hosts` file - # This will point to the server's default virtual host - # TO DO: Make this work with virtualhost along-side xip.io URL - config.vm.hostname = "friendica.dev" - - # Create a static IP - config.vm.network :private_network, ip: server_ip - - # If using VirtualBox - config.vm.provider :virtualbox do |vb| +server_ip_trusty = "192.168.22.10" +server_ip_xenial = "192.168.22.11" +server_memory = "1024" # MB +server_timezone = "UTC" + +public_folder = "/vagrant" + +Vagrant.configure(2) do |config| +###################################################################### + # Set server to Ubuntu 14.04 + config.vm.define "trusty" do |trusty| + trusty.vm.box = "ubuntu/trusty64" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a hostname, don't forget to put it to the `hosts` file + # This will point to the server's default virtual host + # TO DO: Make this work with virtualhost along-side xip.io URL + trusty.vm.hostname = "friendica-trusty.dev" + + # Create a static IP + trusty.vm.network :private_network, ip: server_ip_trusty + end - # Set server memory - vb.customize ["modifyvm", :id, "--memory", server_memory] +###################################################################### + # Set server to Ubuntu 16.04 + config.vm.define "xenial" do |xenial| + xenial.vm.box = "boxcutter/ubuntu1604" - # Set the timesync threshold to 10 seconds, instead of the default 20 minutes. - # If the clock gets more than 15 minutes out of sync (due to your laptop going - # to sleep for instance, then some 3rd party services will reject requests. - vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000] + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false - # Prevent VMs running on Ubuntu to lose internet connection - vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] + # Create a hostname, don't forget to put it to the `hosts` file + # This will point to the server's default virtual host + # TO DO: Make this work with virtualhost along-side xip.io URL + xenial.vm.hostname = "friendica-xenial.dev" + # Create a static IP + xenial.vm.network :private_network, ip: server_ip_xenial end - # If using VMWare Fusion - config.vm.provider "vmware_fusion" do |vb, override| - override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box" - - # Set server memory - vb.vmx["memsize"] = server_memory +###################################################################### + # Share a folder between host and guest + config.vm.synced_folder "./", "/vagrant/", owner: "www-data", group: "vagrant" - end - - #### - # Local Scripts - # Any local scripts you may want to run post-provisioning. - # Add these to the same directory as the Vagrantfile. - ########## - - config.vm.synced_folder "./", "/vagrant/", :owner=> 'www-data', :group=>'vagrant', :mount_options => ['dmode=775', 'fmode=775'] - config.vm.provision "shell", path: "./util/vagrant_provision.sh" + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + config.vm.provider "virtualbox" do |vb| + # # Display the VirtualBox GUI when booting the machine + # vb.gui = true + # + # # Customize the amount of memory on the VM: + vb.memory = server_memory + end + # Enable provisioning with a shell script. + config.vm.provision "shell", path: "./util/vagrant_provision.sh" + # run: "always" + # run: "once" end