Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Vendoring commit Signed-off-by: aerosouund <[email protected]> * feat: Introduce SSH package The package provides simple interface for SSH to specific node and implementation of this interface. The implementation is based on std ssh package and we use the SSH port exposed on master node. Jump is used to SSH to other nodes. Signed-off-by: aerosouund <[email protected]> * feat: Create DockerAdapter type The DockerAdapter type changes the previously used docker.Exec ssh.sh method and conforms it into the SSHClient interface. By taking the command and modifying it to be runnable with ssh.sh based on whether its a script, script with params or direct binary command. The node container field indicates the name of the container that ran the qemu command that corresponds to the target ssh node Signed-off-by: aerosouund <[email protected]> * refactor: Use DockerAdapter in place of docker.Exec Keep ssh in a single place by leveraging the adapter and passing it as a param for functions that did docker exec themselves; prepareDeviceForAssignment and prepareEtcdDataMount. Replace the logic for checking if there's a special provision script for a node to running the script for node01 at index 1 Signed-off-by: aerosouund <[email protected]> * feat: Create the config package The config package introduces holder structs that contain the params for a node and the k8s optional deployments on a kubevirt provider. To pass this config directly to other methods without having to pass every parameter to the functions that run the node or k8s options Signed-off-by: aerosouund <[email protected]> * refactor: Introduce provisionNode and provisionK8sOptions Package the logic of node launching and configuring its linux system into provisionNode and running the optional k8s deployments into provisionK8sOptions. Both functions take as a parameter an ssh client and a struct that represents a holder to their config from the config package Signed-off-by: aerosouund <[email protected]> * test: Testing logic for ssh Introduce a testing package based on mock that tests the provisionNode and provisionK8sOptions methods and include the logic to run this package in the main test suite of the cmd package Signed-off-by: aerosouund <[email protected]> * refactor: Leverage the ssh client in favor of Docker adapter Use an implementation based on ssh'ing directly to nodes rather than through their node container. Move the scripts directory on the node during provisioning and remove it after finishing Signed-off-by: aerosouund <[email protected]> --------- Signed-off-by: aerosouund <[email protected]>
- Loading branch information