4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # All Vagrant configuration is done below. The "2" in Vagrant.configure
17 # configures the configuration version (we support older styles for
18 # backwards compatibility). Please don't change it unless you know what
20 Vagrant.configure("2") do |config|
21 # Installs necessary plugins, if available
22 required_plugins = %w( vagrant-vbguest vagrant-disksize )
24 required_plugins.each do |plugin|
25 unless Vagrant.has_plugin? plugin
26 system "vagrant plugin install #{plugin}"
32 exec "vagrant " + ARGV.join(' ')
36 config.disksize.size = "40GB"
38 # The most common configuration options are documented and commented below.
39 # For a complete reference, please see the online documentation at
40 # https://docs.vagrantup.com.
42 # Every Vagrant development environment requires a box. You can search for
43 # boxes at https://vagrantcloud.com/search.
44 config.vm.box = "osm/osm-rel7"
46 # Disable automatic box update checking. If you disable this, then
47 # boxes will only be checked for updates when the user runs
48 # `vagrant box outdated`. This is not recommended.
49 # config.vm.box_check_update = false
51 # Create a forwarded port mapping which allows access to a specific port
52 # within the machine from a port on the host machine. In the example below,
53 # accessing "localhost:8080" will access port 80 on the guest machine.
54 # NOTE: This will enable public access to the opened port
55 # config.vm.network "forwarded_port", guest: 80, host: 8080
57 # Create a forwarded port mapping which allows access to a specific port
58 # within the machine from a port on the host machine and only allow access
59 # via 127.0.0.1 to disable public access
60 # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
61 config.vm.network "forwarded_port", guest: 80, host: 8080
63 # Create a private network, which allows host-only access to the machine
64 # using a specific IP.
65 # config.vm.network "private_network", ip: "192.168.33.10"
67 # Create a public network, which generally matched to bridged network.
68 # Bridged networks make the machine appear as another physical device on
70 # config.vm.network "public_network"
72 # Share an additional folder to the guest VM. The first argument is
73 # the path on the host to the actual folder. The second argument is
74 # the path on the guest to mount the folder. And the optional third
75 # argument is a set of non-required options.
76 # config.vm.synced_folder "../data", "/vagrant_data"
78 # Provider-specific configuration so you can fine-tune various
79 # backing providers for Vagrant. These expose provider-specific options.
80 # Example for VirtualBox:
82 config.vm.provider "virtualbox" do |vb|
83 # # Display the VirtualBox GUI when booting the machine
86 # # Customize the amount of memory on the VM:
91 # View the documentation for the provider you are using for more
92 # information on available options.
94 # Enable provisioning with a shell script. Additional provisioners such as
95 # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
96 # documentation for more information about their specific syntax and use.
97 # config.vm.provision "shell", inline: <<-SHELL
99 # apt-get install -y apache2
101 config.vm.provision "shell", name: "Post-provisiĆ³n", privileged: false, inline: <<-SHELL
102 # Updates the IP address used by Docker Swarm
103 /etc/osm/update_osm_info_docker.sh