dev/Vagrantfile
changeset 590 e103299bccc0
parent 588 8e9ea314e06e
child 609 736fdedb7774
equal deleted inserted replaced
589:a87316d901be 590:e103299bccc0
     1 # -*- mode: ruby -*-
     1 # -*- mode: ruby -*-
     2 # vi: set ft=ruby :
     2 # vi: set ft=ruby :
       
     3 
     3 
     4 
     4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
     5 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
     5 VAGRANTFILE_API_VERSION = "2"
     6 VAGRANTFILE_API_VERSION = "2"
     6 
     7 
     7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     8 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    21   # accessing "localhost:8080" will access port 80 on the guest machine.
    22   # accessing "localhost:8080" will access port 80 on the guest machine.
    22   # config.vm.network :forwarded_port, guest: 80, host: 8080
    23   # config.vm.network :forwarded_port, guest: 80, host: 8080
    23 
    24 
    24   # Create a private network, which allows host-only access to the machine
    25   # Create a private network, which allows host-only access to the machine
    25   # using a specific IP.
    26   # using a specific IP.
    26   config.vm.network :private_network, ip: "172.16.1.2"
    27   config.vm.network :private_network, ip: (ENV['VM_IP'] || "172.16.1.2")
    27 
    28 
    28   # Create a public network, which generally matched to bridged network.
    29   # Create a public network, which generally matched to bridged network.
    29   # Bridged networks make the machine appear as another physical device on
    30   # Bridged networks make the machine appear as another physical device on
    30   # your network.
    31   # your network.
    31   # config.vm.network :public_network
    32   # config.vm.network :public_network
    38   # the path on the host to the actual folder. The second argument is
    39   # the path on the host to the actual folder. The second argument is
    39   # the path on the guest to mount the folder. And the optional third
    40   # the path on the guest to mount the folder. And the optional third
    40   # argument is a set of non-required options.
    41   # argument is a set of non-required options.
    41   config.vm.synced_folder "../", "/srv/comt"
    42   config.vm.synced_folder "../", "/srv/comt"
    42 
    43 
    43   config.vm.define :coment_dev do |coment_dev|
    44   #vmname = "coment_dev_5311da30" #"coment_dev_"+Time.now.getutc.to_f.to_int.to_s(16)
       
    45   vmname = "coment_dev"
       
    46 
       
    47   config.vm.define :"#{vmname}" do |coment_dev|
    44   end
    48   end
    45 
    49 
    46   # Provider-specific configuration so you can fine-tune various
    50   # Provider-specific configuration so you can fine-tune various
    47   # backing providers for Vagrant. These expose provider-specific options.
    51   # backing providers for Vagrant. These expose provider-specific options.
    48   # Example for VirtualBox:
    52   # Example for VirtualBox:
    49   #
    53   #
    50   config.vm.provider :virtualbox do |vb|
    54   config.vm.provider :virtualbox do |vb|
    51       vb.name = "coment_dev"
    55       vb.name = vmname
    52   #   # Don't boot with headless mode
    56   #   # Don't boot with headless mode
    53   #   vb.gui = true
    57   #   vb.gui = true
    54   #
    58   #
    55   #   # Use VBoxManage to customize the VM. For example to change memory:
    59   #   # Use VBoxManage to customize the VM. For example to change memory:
    56   #   vb.customize ["modifyvm", :id, "--memory", "1024"]
    60   #   vb.customize ["modifyvm", :id, "--memory", "1024"]