Skip to content

Commit

Permalink
ha: fix for ssh timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
marthanda93 committed May 2, 2021
1 parent 0b797cc commit ce0a0b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 25 deletions.
8 changes: 1 addition & 7 deletions kubernetes/ha/lib/ha.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,5 @@
lb_config.args = ["#{k8s['ip_part']}", "#{k8s['resources']['master']['ip_prefix']}", "#{k8s['resources']['node']['ip_prefix']}", "#{k8s['resources']['ha']['ip_prefix']}", "#{k8s['cluster']['master']}", "#{k8s['cluster']['node']}", "#{k8s['resources']['master']['count']}", "#{k8s['resources']['node']['count']}"]
end

subconfig.vm.provision "Restart VM", type: "shell" do |reboot|
reboot.privileged = true
reboot.inline = <<-SHELL
echo "----------------------------------|| Reboot to load all config"
SHELL
reboot.reboot = true
end
subconfig.vm.provision "Reboot to load all config", type:"shell", inline: "shutdown -r now"
end
8 changes: 1 addition & 7 deletions kubernetes/ha/lib/master.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,5 @@
mns.args = ["#{k8s['ip_part']}", "#{k8s['resources']['master']['ip_prefix']}", "#{i}", "#{k8s['cluster']['master']}", "#{k8s['resources']['master']['count']}"]
end

subconfig.vm.provision "Restart VM", type: "shell" do |reboot|
reboot.privileged = true
reboot.inline = <<-SHELL
echo "----------------------------------|| Reboot to load all config"
SHELL
reboot.reboot = true
end
subconfig.vm.provision "Reboot to load all config", type:"shell", inline: "shutdown -r now"
end
8 changes: 1 addition & 7 deletions kubernetes/ha/lib/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,5 @@
ks.path = "script/bootstrap_node.sh"
end

subconfig.vm.provision "Restart VM", type: "shell" do |reboot|
reboot.privileged = true
reboot.inline = <<-SHELL
echo "----------------------------------|| Reboot to load all config"
SHELL
reboot.reboot = true
end
subconfig.vm.provision "Reboot to load all config", type:"shell", inline: "shutdown -r now"
end
3 changes: 1 addition & 2 deletions kubernetes/ha/script/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,4 @@ ufw enable <<<y
ufw allow 22

# The SSH connection was unexpectedly closed by the remote end
echo "ClientAliveInterval 30" >> /etc/ssh/ssh_config
echo "ClientAliveCountMax 5" >> /etc/ssh/ssh_config
echo -e "ClientAliveInterval 600\nTCPKeepAlive yes\nClientAliveCountMax 10" >> /etc/ssh/sshd_config
3 changes: 1 addition & 2 deletions kubernetes/ha/script/bootstrap_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ ufw allow 6443/tcp
ufw allow 22

# The SSH connection was unexpectedly closed by the remote end
echo "ClientAliveInterval 30" >> /etc/ssh/ssh_config
echo "ClientAliveCountMax 5" >> /etc/ssh/ssh_config
echo -e "ClientAliveInterval 600\nTCPKeepAlive yes\nClientAliveCountMax 10" >> /etc/ssh/sshd_config

0 comments on commit ce0a0b2

Please sign in to comment.