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

Add server-user and server-ssh-port options to join command #80

Merged
merged 1 commit into from Nov 4, 2019

Conversation

simoncas
Copy link
Contributor

@simoncas simoncas commented Oct 31, 2019

Signed-off-by: Simon Castella castella.simon@gmail.com

Add --server-user and --server-ssh-port options to the join command. Those are handy options to setup a cluster when server and agents are configured differently.

Description

Add --server-user and --server-ssh-port options to the join command.
The default behavior is to use the values respectively specified by the --ssh-port and the --user commands.

Motivation and Context

Implements the solution discussed here #34

How Has This Been Tested?

This has been tested with 2 VMs which have been setup using multipass:

  • vm_master : IP 192.168.64.3 & user root & ssh port 5001
  • vm_worker: IP 192.168.64.4 & user multipass & ssh port 22

Then I create the cluster using the following commands:

k3sup install --ip 192.168.64.3 --user multipass --ssh-port 5001

k3sup join --user multipass --ip 192.168.64.4 --server-ip 192.168.64.3 --server-ssh-port 5001 --server-user root

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can you squash the two commits?

@simoncas
Copy link
Contributor Author

simoncas commented Nov 1, 2019

done

@alexellis
Copy link
Owner

It'd be great if you could run git commit -s --amend and add a commit body.

Here's a great guide on how to write commit messages, they usually describe more of the why and how it's been tested than the what (which is in the code)

https://chris.beams.io/posts/git-commit/

An example: openfaas/faas@137b63e openfaas/of-watchdog@b0a976b

It often happens that the server and agents do not share the
same configuration. The two new options (server-user and
server-ssh-port) allow you to specify the username and the
ssh port of the server to the join command.

Signed-off-by: Simon Castella <castella.simon@gmail.com>
@simoncas simoncas force-pushed the add-server-user-options branch 3 times, most recently from da8b5f2 to 4d95a92 Compare November 3, 2019 09:29
@alexellis
Copy link
Owner

Could you do a test with --server-ssh-port and with --server-ssh-user passed separately?

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@alexellis alexellis merged commit 8982f32 into alexellis:master Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants