Multiple fixes to deployment scripts and lab

- Clean up private/pub keys from k8s nodes
- Install kpm on k8s nodes, not on master node
This commit is contained in:
Aleksandr Didenko
2016-06-20 12:02:25 +02:00
parent bc29db7bd2
commit 0e48ce51ce
3 changed files with 18 additions and 14 deletions

18
Vagrantfile vendored
View File

@@ -37,10 +37,8 @@ Vagrant.configure("2") do |config|
(1..$num_instances).each do |i|
# First node would be master node
if i == 1
bootstrap_script = "bootstrap-master.sh"
master = true
else
bootstrap_script = "bootstrap-node.sh"
master = false
end
@@ -74,14 +72,16 @@ Vagrant.configure("2") do |config|
test_vm.vm.network :private_network, :ip => "#{ip}"
# Provisioning
if master
config.vm.provision "file", source: "deploy-k8s.kargo.sh", destination: "~/deploy-k8s.kargo.sh"
config.vm.provision "file", source: "custom.yaml", destination: "~/custom.yaml"
config.vm.provision "file", source: "nodes", destination: "~/nodes"
end
config.vm.provision "file", source: "ssh", destination: "~/ssh"
config.vm.provision :shell, :path => bootstrap_script
if master
config.vm.provision "deploy-k8s", type: "file", source: "deploy-k8s.kargo.sh", destination: "~/deploy-k8s.kargo.sh"
config.vm.provision "custom.yaml", type: "file", source: "custom.yaml", destination: "~/custom.yaml"
config.vm.provision "kubedns.yaml", type: "file", source: "kubedns.yaml", destination: "~/kubedns.yaml"
config.vm.provision "nodes", type: "file", source: "nodes", destination: "~/nodes"
config.vm.provision "bootstrap", type: "shell", path: "bootstrap-master.sh"
else
config.vm.provision "bootstrap", type: "shell", path: "bootstrap-node.sh"
end
end
end