-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
50 lines (39 loc) · 1.51 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
fqdn = 'vagrant.maetthu.dev'
config.hostmanager.enabled = false
config.hostmanager.manage_host = false
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
# define a puppet agent VM
config.vm.define :dev1 do |vm_config|
# some variables for easier configuration
vm_name = 'docker'
vm_cores = 2
vm_memory = 4096
vm_hostname = "#{vm_name}.#{fqdn}"
vm_ip = '192.168.215.13'
vb_name = "maetthu Vagrant Test - #{vm_name}"
box = 'ubuntu/trusty64'
# basic parameters
vm_config.vm.hostname = vm_hostname
vm_config.vm.box = box
vm_config.ssh.forward_agent = true
# host-only network
vm_config.vm.network :private_network, ip: vm_ip
vm_config.vm.network :forwarded_port, guest: 80, host: 8888, auto_correct: true
vm_config.vm.network :forwarded_port, guest: 443, host: 8448, auto_correct: true
########## provisioning ####################################################
vm_config.vm.provision :shell, :path => 'install_docker.sh'
############################################################################
# configure virtualbox VM
vm_config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.name = vb_name
vb.customize ['modifyvm', :id, '--memory', vm_memory]
vb.customize ['modifyvm', :id, '--ioapic', 'on']
vb.customize ['modifyvm', :id, '--cpus', vm_cores]
end
end
end