forked from fabric8io/fabric8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
51 lines (38 loc) · 1.55 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$provisionScript = <<SCRIPT
# add host
echo 172.28.128.4 vagrant-ubuntu-trusty-64 >> /etc/hosts
# update limits
echo >> /etc/security/limits.conf
echo * hard nproc 8192 >> /etc/security/limits.conf
echo * soft nproc 8192 >> /etc/security/limits.conf
echo * hard nofile 8192 >> /etc/security/limits.conf
echo * soft nofile 8192 >> /etc/security/limits.conf
# add some user aliases
echo >> ~/.bashrc
echo export DOCKER_IP=172.28.128.4 >> ~/.bashrc
echo alias kube="docker run --rm -i --net=host openshift/origin kube" >> ~/.bashrc
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "172.28.128.4"
config.vm.provider "virtualbox" do |v|
v.memory = 8192
v.cpus = 4
# config.ssh.pty= true
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provision "shell", inline: $provisionScript
config.vm.provision "docker" do |d|
d.run "openshift",
image: "openshift/origin:latest",
cmd: "start",
args: "-v /var/run/docker.sock:/var/run/docker.sock --privileged --net=host"
d.run "cadvisor",
image: "google/cadvisor:0.6.2",
args: "-p 4194:8080 --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro"
end
end