Merge pull request #7494 from priyawadhwa/ssh-runner
Use SSH runner once SSH is set up in kicpull/7513/head
commit
0e4b4d2d18
|
@ -157,6 +157,11 @@ func CommandRunner(h *host.Host) (command.Runner, error) {
|
||||||
if driver.IsKIC(h.Driver.DriverName()) {
|
if driver.IsKIC(h.Driver.DriverName()) {
|
||||||
return command.NewKICRunner(h.Name, h.Driver.DriverName()), nil
|
return command.NewKICRunner(h.Name, h.Driver.DriverName()), nil
|
||||||
}
|
}
|
||||||
|
return SSHRunner(h)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SSHRunner returns an SSH runner for the host
|
||||||
|
func SSHRunner(h *host.Host) (command.Runner, error) {
|
||||||
client, err := sshutil.NewSSHClient(h.Driver)
|
client, err := sshutil.NewSSHClient(h.Driver)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Wrap(err, "getting ssh client for bootstrapper")
|
return nil, errors.Wrap(err, "getting ssh client for bootstrapper")
|
||||||
|
|
|
@ -101,6 +101,18 @@ func Start(cc config.ClusterConfig, n config.Node, existingAddons map[string]boo
|
||||||
cr := configureRuntimes(mRunner, cc, sv)
|
cr := configureRuntimes(mRunner, cc, sv)
|
||||||
showVersionInfo(n.KubernetesVersion, cr)
|
showVersionInfo(n.KubernetesVersion, cr)
|
||||||
|
|
||||||
|
// ssh should be set up by now
|
||||||
|
// switch to using ssh runner since it is faster
|
||||||
|
if driver.IsKIC(cc.Driver) {
|
||||||
|
sshRunner, err := machine.SSHRunner(host)
|
||||||
|
if err != nil {
|
||||||
|
glog.Infof("error getting ssh runner: %v", err)
|
||||||
|
} else {
|
||||||
|
glog.Infof("Using ssh runner for kic...")
|
||||||
|
mRunner = sshRunner
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var bs bootstrapper.Bootstrapper
|
var bs bootstrapper.Bootstrapper
|
||||||
var kcs *kubeconfig.Settings
|
var kcs *kubeconfig.Settings
|
||||||
if apiServer {
|
if apiServer {
|
||||||
|
|
Loading…
Reference in New Issue