forked from nanovms/ops-documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
67 lines (49 loc) · 1.9 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This vagrant file is here so we have an easy means of create temporary
# sandbox environments to test various installation and configuration
# documentation.
$aptget_install = <<-SCRIPT
apt-get update && apt-get -y install qemu
SCRIPT
$yum_install = <<-SCRIPT
yum -y update && yum -y install which qemu-kvm qemu-img
SCRIPT
$install_script_url = "https://gist.githubusercontent.com/tijoytom/076dbf088549844692c883539de4260e/raw"
Vagrant.configure("2") do |config|
# this is added so we can git clone the ops repo if desired. Once the ops
# repo is open source and public, we can remove this line.
config.ssh.forward_agent = true
# Ensure we have access to public internet...
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
v.memory = 4048
v.cpus = 2
end
config.vm.define "ubuntu16" do |v|
v.vm.box = "ubuntu/xenial64"
v.vm.provision "shell", inline: $aptget_install
v.vm.provision "shell", privileged: false, path: $install_script_url
end
config.vm.define "ubuntu18" do |v|
v.vm.box = "ubuntu/bionic64"
v.vm.provision "shell", inline: $aptget_install
v.vm.provision "shell", privileged: false, path: $install_script_url
end
config.vm.define "debian8" do |v|
v.vm.box = "debian/jessie64"
v.vm.provision "shell", inline: $aptget_install
v.vm.provision "shell", privileged: false, path: $install_script_url
end
config.vm.define "centos7" do |v|
v.vm.box = "centos/7"
v.vm.provision "shell", inline: $yum_install
v.vm.provision "shell", privileged: false, path: $install_script_url
end
config.vm.define "fedora28" do |v|
v.vm.box = "generic/fedora28"
v.vm.provision "shell", inline: $yum_install
v.vm.provision "shell", privileged: false, path: $install_script_url
end
end