mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
Adding support for CentOS as a multi-machine argument
1. CentOS has been added as a multi-machine option to the Vagrant script 2. Ubuntu is still the default option Usage: For starting the CentOS machine please do ```bash $ vagrant up centos ```
This commit is contained in:
parent
7cc6abeef6
commit
99152d7f7e
3 changed files with 43 additions and 21 deletions
44
containers/vagrant/Vagrantfile
vendored
44
containers/vagrant/Vagrantfile
vendored
|
|
@ -1,29 +1,33 @@
|
|||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
config.vm.box = "ubuntu/trusty64"
|
||||
require 'yaml'
|
||||
|
||||
VAGRANTFILE_API_VERSION = 2
|
||||
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
|
||||
|
||||
config.vm.define "centos", :autostart => false do |centos|
|
||||
centos.vm.box = "centos/7"
|
||||
centos.vm.provision "shell", :path => "provisioners/shell/centos.sh"
|
||||
end
|
||||
|
||||
config.vm.provider "virtualbox" do |vb|
|
||||
vb.memory = "2048"
|
||||
vb.memory = VM_RAM
|
||||
end
|
||||
|
||||
config.vm.provider "libvirt" do |lv|
|
||||
lv.memory = VM_RAM
|
||||
|
||||
config.vm.synced_folder ".", "/home/vagrant/sync", :disabled => true
|
||||
end
|
||||
|
||||
config.vm.synced_folder ".", "/vagrant", :disabled => true
|
||||
config.vm.synced_folder "../../", "/home/vagrant/go/src/github.com/ethereum/go-ethereum"
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
sudo apt-get install software-properties-common
|
||||
sudo add-apt-repository -y ppa:ethereum/ethereum
|
||||
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install -y build-essential golang git-all
|
||||
|
||||
GOPATH=/home/vagrant/go go get github.com/tools/godep
|
||||
|
||||
sudo chown -R vagrant:vagrant ~vagrant/go
|
||||
|
||||
echo "export GOPATH=/home/vagrant/go" >> ~vagrant/.bashrc
|
||||
echo "export PATH=\\\$PATH:\\\$GOPATH/bin:/usr/local/go/bin" >> ~vagrant/.bashrc
|
||||
SHELL
|
||||
end
|
||||
|
|
|
|||
3
containers/vagrant/provisioners/shell/centos.sh
Executable file
3
containers/vagrant/provisioners/shell/centos.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
#sudo yum install -y golang git
|
||||
15
containers/vagrant/provisioners/shell/ubuntu.sh
Executable file
15
containers/vagrant/provisioners/shell/ubuntu.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo apt-get install software-properties-common
|
||||
sudo add-apt-repository -y ppa:ethereum/ethereum
|
||||
sudo add-apt-repository -y ppa:ethereum/ethereum-dev
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install -y build-essential golang git-all
|
||||
|
||||
GOPATH=/home/vagrant/go go get github.com/tools/godep
|
||||
|
||||
sudo chown -R vagrant:vagrant ~vagrant/go
|
||||
|
||||
echo "export GOPATH=/home/vagrant/go" >> ~vagrant/.bashrc
|
||||
echo "export PATH=\\\$PATH:\\\$GOPATH/bin:/usr/local/go/bin" >> ~vagrant/.bashrc
|
||||
Loading…
Reference in a new issue