46 lines
1.7 KiB
Ruby
46 lines
1.7 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
|
# configures the configuration version (we support older styles for
|
|
# backwards compatibility). Please don't change it unless you know what
|
|
# you're doing.
|
|
Vagrant.configure(2) do |config|
|
|
#
|
|
# Mongo box definition
|
|
#
|
|
config.vm.define "mongo" do |mongo|
|
|
# Every Vagrant development environment requires a box. You can search for
|
|
# boxes at https://atlas.hashicorp.com/search.
|
|
mongo.vm.box = "ubuntu/trusty64"
|
|
|
|
config.vm.provider "virtualbox" do |v|
|
|
v.memory = 2048
|
|
v.cpus = 2
|
|
end
|
|
|
|
# MongoDB ports forwarded to local machine
|
|
mongo.vm.network "forwarded_port", guest: 27017, host: 27018
|
|
mongo.vm.network "forwarded_port", guest: 28017, host: 28018
|
|
|
|
# Create a private network, which allows host-only access to the machine
|
|
mongo.vm.network "private_network", ip: "172.16.0.20"
|
|
|
|
# Share an additional folder to the guest VM. The first argument is
|
|
# the path on the host to the actual folder. The second argument is
|
|
# the path on the guest to mount the folder. And the optional third
|
|
# argument is a set of non-required options.
|
|
# mongo.vm.synced_folder "./data", "/vagrant_data"
|
|
|
|
# Enable provisioning with a shell script. Additional provisioners such as
|
|
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
|
# documentation for more information about their specific syntax and use.
|
|
# config.vm.provision "shell", inline: <<-SHELL
|
|
# sudo apt-get update
|
|
# sudo apt-get install -y apache2
|
|
# SHELL
|
|
mongo.vm.provision :shell, path: "mongo/bootstrap.sh"
|
|
end
|
|
|
|
end
|