Skip to content

Commit

Permalink
Resolves kubernetes#4633.
Browse files Browse the repository at this point in the history
Fixes broken vagrant ssh commands
  • Loading branch information
jameskyle committed Feb 20, 2015
1 parent e2c97e0 commit 34abf43
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end

# Kubernetes master
config.vm.define "master" do |config|
customize_vm config

config.vm.provision "shell", run: "always", path: "#{ENV['KUBE_TEMP']}/master-start.sh"
config.vm.network "private_network", ip: "#{$master_ip}"
config.vm.hostname = ENV['MASTER_NAME']
config.vm.define "master" do |c|
customize_vm c
if ENV['KUBE_TEMP'] then
script = "#{ENV['KUBE_TEMP']}/master-start.sh"
c.vm.provision "shell", run: "always", path: script
end
c.vm.network "private_network", ip: "#{$master_ip}"
c.vm.hostname = ENV['MASTER_NAME']
end

# Kubernetes minion
Expand All @@ -84,10 +86,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

minion_index = n+1
minion_ip = $minion_ips[n]
minion.vm.provision "shell", run: "always", path: "#{ENV['KUBE_TEMP']}/minion-start-#{n}.sh"
if ENV['KUBE_TEMP'] then
script = "#{ENV['KUBE_TEMP']}/minion-start-#{n}.sh"
minion.vm.provision "shell", run: "always", path: script
end
minion.vm.network "private_network", ip: "#{minion_ip}"
minion.vm.hostname = "#{ENV['INSTANCE_PREFIX']}-minion-#{minion_index}"
end
end

end

0 comments on commit 34abf43

Please sign in to comment.