Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSH commands for kic #6388

Closed
medyagh opened this issue Jan 23, 2020 · 2 comments
Closed

SSH commands for kic #6388

medyagh opened this issue Jan 23, 2020 · 2 comments
Assignees
Labels
co/docker-driver Issues related to kubernetes in container

Comments

@medyagh
Copy link
Member

medyagh commented Jan 23, 2020

for a better unifying experience, we need to handle ssh commands for kic as well

// RunSSHCommandFromDriver implements direct ssh control to the driver
func (d *Driver) RunSSHCommandFromDriver() error {
	return fmt.Errorf("driver does not support RunSSHCommandFromDriver commands")
}

I suspect we might need to implement a NewBuildrootProvisioner

func NewBuildrootProvisioner(d drivers.Driver) provision.Provisioner {
	return &BuildrootProvisioner{
		provision.NewSystemdProvisioner("buildroot", d),
	}

the current one uses https://github.com/machine-drivers/machine

@medyagh medyagh added the co/docker-driver Issues related to kubernetes in container label Jan 23, 2020
@medyagh
Copy link
Member Author

medyagh commented Jan 23, 2020

alternatively we could make a factory that Turns a kic runner to machine-driver's ssh.Cllient
but that would loos all the nice interface we have for command runner to set stdin and stdout and we need to convert to this interface:

type Client interface {
	Output(command string) (string, error)
	Shell(args ...string) error

	// Start starts the specified command without waiting for it to finish. You
	// have to call the Wait function for that.
	//
	// The first two io.ReadCloser are the standard output and the standard
	// error of the executing command respectively. The returned error follows
	// the same logic as in the exec.Cmd.Start function.
	Start(command string) (io.ReadCloser, io.ReadCloser, error)

	// Wait waits for the command started by the Start function to exit. The
	// returned error follows the same logic as in the exec.Cmd.Wait function.
	Wait() error
}

@medyagh
Copy link
Member Author

medyagh commented Jan 25, 2020

closed by #6390

@medyagh medyagh closed this as completed Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container
Projects
None yet
Development

No branches or pull requests

1 participant