Skip to content

Instantly share code, notes, and snippets.

@zehicle
Created August 26, 2015 16:57
Show Gist options
  • Save zehicle/e6c66f953239efa59301 to your computer and use it in GitHub Desktop.
Save zehicle/e6c66f953239efa59301 to your computer and use it in GitHub Desktop.
Slave file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define "slave", primary: true do |slave|
slave.vm.box = "chef/centos-7.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
slave.vm.network "private_network", ip: "192.168.124.41", bridge: 'docker0', adapter: 1
# slave share an additional folder to the guest VM.
slave.vm.synced_folder "~/ocb/core", "/tmp/ocb"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
slave.vm.provider "virtualbox" do |vb|
vb.gui = false # Display the VirtualBox GUI when booting the machine
vb.memory = "2048" # Customize the amount of memory on the VM
end
#
# View the documentation for the provider you are using for more
# information on available options.
# admin noode - eth1 on hostonly .10
# nat eth0 to internet
# admin network change conduit in admin range to 1g1
# network w/ addresses assigned .10,
# slaves on host only interface .81, .82, .83
# inject into slaves - mount crowbar/core into containers to opt/opencrowbar/core
# copy /etc/crowbar/install/key from admin into same space on other system
# cd /opt/opencrowbar.core run ./crowbar-node.sh 192.168.124.10 true
slave.vm.provision "shell", inline: <<-SHELL
sudo mkdir -p /opt/opencrowbar
cd /opt/opencrowbar
sudo cp /tmp/ocb/bin/crowbar .
sudo cp /tmp/ocb/crowbar-slave.sh .
sudo cp /tmp/ocb/bin/crowbar-key.sh .
EXPORT
SHELL
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment