Commit 8a032f1a authored by Francisco-Javier Ramon Salguero's avatar Francisco-Javier Ramon Salguero
Browse files

Updated Vagrant installaton for Release SEVEN

parent 6d3877c1
Loading
Loading
Loading
Loading
+33 −4
Original line number Diff line number Diff line
@@ -131,19 +131,48 @@ vagrant init osm/releaseseven

Editing the `Vagrantfile` is required if you need to customize the image for opened ports, assigned memory, etc.

For instance, if you want to access the OSM Web client externally from the VirtualBox VM, you can open up port 80 (mapped to 8080 at your host) by uncommenting this line:
For Release SEVEN, this is these are the recommended contents for the `Vagrantfile`:

```ruby
Vagrant.configure("2") do |config|
  required_plugins = %w( vagrant-vbguest vagrant-disksize )
  _retry = false
  required_plugins.each do |plugin|
      unless Vagrant.has_plugin? plugin
          system "vagrant plugin install #{plugin}"
          _retry=true
      end
  end
  if (_retry)
      exec "vagrant " + ARGV.join(' ')
  end
  config.disksize.size = "40GB"
  config.vm.box = "osm/releaseseven"
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "6144"
    vb.cpus = 2
  end
  config.vm.provision "shell", name: "Post-provisión", privileged: false, inline: <<-SHELL
    /etc/osm/update_osm_info_docker.sh  # Updates IP address for Docker Swarm
  SHELL
end
```

This configuration guarantees that:

- The resources are appropriate (6 GB memory, 2 vCPUs, 40 GB HDD).
- VirtualBox plugins are installed if not already available.
- Port 80 is mapped to 8080 at your host, so that the OSM's GUI is directly accessible.
- The IP address of the Docker Swarm running inside is properly updated.

#### 4) Start OSM

```bash
vagrant up
```

- NOTE: warnings related to `Vagrant unable to mount VirtualBox shared folders` can be safely ignored.
- NOTE: Warnings related to `Vagrant unable to mount VirtualBox shared folders` can be safely ignored.

#### 5) ssh to OSM