blob: ebf174d7fa77d78d53e12760fa0435a6f950aeef [file] [log] [blame]
ramonsalguer8ac0f082020-06-03 20:13:34 +02001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
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
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15
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
19# you're doing.
20Vagrant.configure("2") do |config|
21 # Installs necessary plugins, if available
22 required_plugins = %w( vagrant-vbguest vagrant-disksize )
23 _retry = false
24 required_plugins.each do |plugin|
25 unless Vagrant.has_plugin? plugin
26 system "vagrant plugin install #{plugin}"
27 _retry=true
28 end
29 end
30
31 if (_retry)
32 exec "vagrant " + ARGV.join(' ')
33 end
34
35 # 40 GB HDD
36 config.disksize.size = "40GB"
37
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.
41
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"
45
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
50
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
56
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
62
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"
66
67 # Create a public network, which generally matched to bridged network.
68 # Bridged networks make the machine appear as another physical device on
69 # your network.
70 # config.vm.network "public_network"
71
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"
77
78 # Provider-specific configuration so you can fine-tune various
79 # backing providers for Vagrant. These expose provider-specific options.
80 # Example for VirtualBox:
81 #
82 config.vm.provider "virtualbox" do |vb|
83 # # Display the VirtualBox GUI when booting the machine
84 # vb.gui = true
85 #
86 # # Customize the amount of memory on the VM:
87 vb.memory = "6144"
88 vb.cpus = 2
89 end
90 #
91 # View the documentation for the provider you are using for more
92 # information on available options.
93
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
98 # apt-get update
99 # apt-get install -y apache2
100 # SHELL
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
104 SHELL
105
106end