forked from CenturyLinkLabs/panamax-coreos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile-win
34 lines (30 loc) · 1.73 KB
/
Vagrantfile-win
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
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
Vagrant.require_version ">= 1.6.0"
config.vm.box = ENV['PMX_BASEBOX'] || "panamax-coreos-box-522.6.0"
config.vm.box_url = ENV['PMX_BASEBOX_URL'] || "http://stable.release.core-os.net/amd64-usr/522.6.0/coreos_production_vagrant.box"
config.vm.hostname = ENV['PMX_VM_NAME'] || "panamax-vm"
config.vm.network "private_network", ip: ENV['PMX_VM_PRIVATE_IP'] || "10.0.0.200"
config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
vb.name = ENV['PMX_VM_NAME'] || "panamax-vm"
vb.customize ["modifyvm", :id, "--memory", Integer(ENV['PMX_VM_MEMORY']||1536)]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", Integer(ENV['PMX_VM_CPUS']||2)]
end
config.vm.define :ENV['PMX_VM_NAME'] || "panamax-vm"
# plugin conflict
if Vagrant.has_plugin?("vagrant-vbguest") then
config.vbguest.auto_update = false
end
config.vm.synced_folder ".", "/var/panamax", type: "rsync"
#Docker Mount
config.vm.provision "shell", inline: "sudo chmod +x /var/panamax/coreos", keep_color: "true"
config.vm.provision "shell", inline: "cd /var/panamax && ./coreos $1 --$2 -pid=\"$3\" -insecureregistry=$4", args: "#{ENV['PMX_OPERATION'] || 'install'} #{ENV['PMX_IMAGE_TAG'] || 'stable'} #{ENV['PMX_PANAMAX_ID'] || 'not-set'} #{ENV['PMX_INSECURE_REGISTRY'] || 'n'} ", keep_color: "true"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.ssh.username = "core"
# always use Vagrants insecure key
config.ssh.insert_key = false
end