Created
February 14, 2016 01:28
-
-
Save mihok/04e13a276c72a0d1b9da to your computer and use it in GitHub Desktop.
Vagrant file to create 3 Ubuntu 14.04 machines to run Kubernetes on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$instances = 3 | |
$instance_name_prefix = "kube" | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.ssh.forward_agent = true | |
(1..$instances).each do |i| | |
config.vm.define vm_name = "%s-%02d" % [$instance_name_prefix, i] do |config| | |
config.vm.hostname = vm_name | |
ip = "172.20.0.#{i+100}" | |
config.vm.network :private_network, ip: ip | |
config.vm.provision "docker" | |
config.vm.provision "file", source: "kube.pub", destination: ".ssh/authorized_keys" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment