containers/vagrant: add support for CentOS (#14380)

CentOS has been added as a multi-machine option to the Vagrant script.
Ubuntu is still the default option. For starting the CentOS machine, use:

   vagrant up centos
pull/14480/head
Koustubh Sinkar 8 years ago committed by Felix Lange
parent 7c707d14d1
commit df4e7eccf5
  1. 1
      containers/vagrant/.gitignore
  2. 43
      containers/vagrant/Vagrantfile
  3. 11
      containers/vagrant/provisioners/shell/centos.sh
  4. 11
      containers/vagrant/provisioners/shell/debian.sh
  5. 11
      containers/vagrant/provisioners/shell/ubuntu.sh

@ -0,0 +1 @@
.vagrant

@ -1,29 +1,38 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
Vagrant.configure(2) do |config| require 'yaml'
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb| VAGRANTFILE_API_VERSION = 2
vb.memory = "2048" VM_RAM = 2048
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "ubuntu", :primary => true do |ubuntu|
ubuntu.vm.box = "ubuntu/trusty64"
ubuntu.vm.provision "shell", :path => "provisioners/shell/ubuntu.sh"
end end
config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/ethereum/go-ethereum" config.vm.define "debian", :primary => true do |debian|
config.vm.synced_folder ".", "/vagrant", disabled: true debian.vm.box = "debian/jessie64"
debian.vm.provision "shell", :path => "provisioners/shell/debian.sh"
end
config.vm.provision "shell", inline: <<-SHELL config.vm.define "centos", :autostart => false do |centos|
sudo apt-get install software-properties-common centos.vm.box = "centos/7"
sudo add-apt-repository -y ppa:ethereum/ethereum centos.vm.provision "shell", :path => "provisioners/shell/centos.sh"
sudo add-apt-repository -y ppa:ethereum/ethereum-dev end
sudo apt-get update
sudo apt-get install -y build-essential golang git-all config.vm.provider "virtualbox" do |vb|
vb.memory = VM_RAM
end
GOPATH=/home/vagrant/go go get github.com/tools/godep config.vm.provider "libvirt" do |lv|
lv.memory = VM_RAM
sudo chown -R vagrant:vagrant ~vagrant/go config.vm.synced_folder ".", "/home/vagrant/sync", :disabled => true
end
echo "export GOPATH=/home/vagrant/go" >> ~vagrant/.bashrc config.vm.synced_folder ".", "/vagrant", :disabled => true
echo "export PATH=\\\$PATH:\\\$GOPATH/bin:/usr/local/go/bin" >> ~vagrant/.bashrc config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/ethereum/go-ethereum"
SHELL
end end

@ -0,0 +1,11 @@
#!/bin/bash
sudo yum install -y git wget
sudo yum update -y
wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz
GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/"
echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc

@ -0,0 +1,11 @@
#!/bin/bash
sudo apt-get install -y build-essential git-all wget
sudo apt-get update
wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz
GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/"
echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc

@ -0,0 +1,11 @@
#!/bin/bash
sudo apt-get install -y build-essential git-all wget
sudo apt-get update
wget --continue https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.8.1.linux-amd64.tar.gz
GETH_PATH="~vagrant/go/src/github.com/ethereum/go-ethereum/build/bin/"
echo "export PATH=$PATH:/usr/local/go/bin:$GETH_PATH" >> ~vagrant/.bashrc
Loading…
Cancel
Save