Skip to content

Instantly share code, notes, and snippets.

@cybertk
Created Oct 30, 2014
Embed
What would you like to do?
Vagrantfile
# vi: set ft=ruby :
# Fail if Vagrant version is too old
begin
Vagrant.require_version ">= 1.6.0"
rescue NoMethodError
$stderr.puts "This Vagrantfile requires Vagrant version >= 1.6.0"
exit 1
end
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "flynn-base"
config.vm.box_url = "https://dl.flynn.io/vagrant/flynn-base.json"
config.vm.define "node-1" do |node|
node.vm.hostname = "node-1"
node.vm.network "private_network", ip: "192.168.84.42"
end
config.vm.define "node-2" do |node|
node.vm.hostname = "node-2"
node.vm.network "private_network", ip: "192.168.84.43"
end
config.vm.define "node-3" do |node|
node.vm.hostname = "node-3"
node.vm.network "private_network", ip: "192.168.84.44"
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provision "shell", privileged: false, inline: <<SCRIPT
sudo apt-get update -qq
sudo apt-get install -y flynn-host
sudo flynn-release download /etc/flynn/version.json
sudo start flynn-host
CONTROLLER_DOMAIN=demo.localflynn.com \
DEFAULT_ROUTE_DOMAIN=demo.localflynn.com \
flynn-bootstrap /etc/flynn/bootstrap-manifest.json 2>&1
SCRIPT
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment