mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #21275 from tonistiigi/fix-vendor-vagrantfile
Remove vagrantfiles from vendor
This commit is contained in:
commit
9c20d920a6
2 changed files with 0 additions and 92 deletions
|
@ -1,58 +0,0 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
$consul=<<SCRIPT
|
||||
apt-get update
|
||||
apt-get -y install wget
|
||||
wget -qO- https://experimental.docker.com/ | sh
|
||||
gpasswd -a vagrant docker
|
||||
service docker restart
|
||||
docker run -d -p 8500:8500 -p 8300-8302:8300-8302/tcp -p 8300-8302:8300-8302/udp -h consul progrium/consul -server -bootstrap
|
||||
SCRIPT
|
||||
|
||||
$bootstrap=<<SCRIPT
|
||||
apt-get update
|
||||
apt-get -y install wget curl
|
||||
apt-get -y install bridge-utils
|
||||
wget -qO- https://experimental.docker.com/ | sh
|
||||
gpasswd -a vagrant docker
|
||||
echo DOCKER_OPTS=\\"--cluster-store=consul://192.168.33.10:8500 --cluster-advertise=${1}:0\\" >> /etc/default/docker
|
||||
cp /vagrant/docs/vagrant-systemd/docker.service /etc/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl restart docker.service
|
||||
SCRIPT
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
|
||||
num_nodes = 2
|
||||
base_ip = "192.168.33."
|
||||
net_ips = num_nodes.times.collect { |n| base_ip + "#{n+11}" }
|
||||
|
||||
config.vm.define "consul-server" do |consul|
|
||||
consul.vm.box = "ubuntu/trusty64"
|
||||
consul.vm.hostname = "consul-server"
|
||||
consul.vm.network :private_network, ip: "192.168.33.10"
|
||||
consul.vm.provider "virtualbox" do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", "512"]
|
||||
end
|
||||
consul.vm.provision :shell, inline: $consul
|
||||
end
|
||||
|
||||
num_nodes.times do |n|
|
||||
config.vm.define "net-#{n+1}" do |net|
|
||||
net.vm.box = "ubuntu/vivid64"
|
||||
net_ip = net_ips[n]
|
||||
net_index = n+1
|
||||
net.vm.hostname = "net-#{net_index}"
|
||||
net.vm.provider "virtualbox" do |vb|
|
||||
vb.customize ["modifyvm", :id, "--memory", "1024"]
|
||||
end
|
||||
net.vm.network :private_network, ip: "#{net_ip}"
|
||||
net.vm.provision :shell, inline: $bootstrap, :args => "#{net_ip}"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/mistifyio/go-zfs", create: true
|
||||
|
||||
config.vm.provision "shell", inline: <<EOF
|
||||
cat << END > /etc/profile.d/go.sh
|
||||
export GOPATH=\\$HOME/go
|
||||
export PATH=\\$GOPATH/bin:/usr/local/go/bin:\\$PATH
|
||||
END
|
||||
|
||||
chown -R vagrant /home/vagrant/go
|
||||
|
||||
apt-get update
|
||||
apt-get install -y software-properties-common curl
|
||||
apt-add-repository --yes ppa:zfs-native/stable
|
||||
apt-get update
|
||||
apt-get install -y ubuntu-zfs
|
||||
|
||||
cd /home/vagrant
|
||||
curl -z go1.3.3.linux-amd64.tar.gz -L -O https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
|
||||
tar -C /usr/local -zxf /home/vagrant/go1.3.3.linux-amd64.tar.gz
|
||||
|
||||
cat << END > /etc/sudoers.d/go
|
||||
Defaults env_keep += "GOPATH"
|
||||
END
|
||||
|
||||
EOF
|
||||
|
||||
end
|
Loading…
Reference in a new issue