-
Notifications
You must be signed in to change notification settings - Fork 76
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
More automation in getting_started.md guide #385
Conversation
Signed-off-by: chen hui <[email protected]>
Suggest to move this script under |
Co-authored-by: Anusha Hegde <[email protected]>
This is a script just do all steps in getting_started.md guide, not designed to accepted any arguments to customize their byoh cluster. It just help customer try out our software with just one command run. If customer want to create "real" byoh culster with customize configuration, do it by manually. It's better not to rename this script name, or it will made customer think they can bring up and configure their byoh cluster by this script.
|
Signed-off-by: chen hui <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #385 +/- ##
==========================================
- Coverage 66.45% 63.99% -2.46%
==========================================
Files 23 24 +1
Lines 1696 1811 +115
==========================================
+ Hits 1127 1159 +32
- Misses 495 580 +85
+ Partials 74 72 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wow, this was a lot bigger than I expected. Thats a lot of code 😸
Anyways, this feels like new functionality we are maintaining. I worry its going to be super easy to break this. So I suggest that we add some tests for it. Not unit tests, but at least an e2e test of sorts, that is included in our github checks. Essentially a check that runs this script, and verifies that we have a running cluster(s) at the end if it. Thoughts @huchen2021 ?
And, I assume this script would live in parallel to the existing BYOH getting started guide. Kind of like an alternate experience. If users want white glove service, they run this script. Else, users can get their hands dirty, and manually follow the steps, so that they know all the pieces that make up BYOH. So we would have to modify the README / exisiting getting started guide, to hook this in. Yes?
@jamiemonserrate, I don't know if that's necessary. This is sort of a simple script that will get a byoh workload cluster up. What breaking changes are you worried of? I am looking for a similar experience like k/k's hack/local-up-cluster.sh. |
I guess I'm worried that it would be super easy for this script to go out of date. If we introduce a breaking change, it won't be until much later that we find out. At the end of the day, its code. I am always a pessimist (things break), and prefer writing tests as much as possible. Happy to back down if you feel this test is too distracting or too much work to maintain. |
@huchen2021 Since running this script will change the state on the host, we should display a warning message and take user's confirmation whether to proceed or not. We already do that in our e2e test - cluster-api-provider-bringyourownhost/Makefile Lines 140 to 157 in fb51a6d
|
@jamiemonserrate 😄 |
Signed-off-by: chen hui <[email protected]>
Signed-off-by: chen hui <[email protected]>
I totally agreed with @anusha94. We need to take care of this for every new release. It should be enough. What do you think? @jamiemonserrate |
Signed-off-by: chen hui <[email protected]>
Done. Thanks for your comment. |
This script will exit with code 1 if any error happened. It do checks on every step, and at the end of script, it also check if every node status is ok. Base on that, I add this test into github workflows, and it pass. You can know more detail by get-started-suite of pull-390. If we have to add a test for this script, @anusha94 @jamiemonserrate What do you think about this way? If you are all think this is ok, I'll merge the test code part it into this PR. |
Signed-off-by: chen hui <[email protected]>
First of all, great job! Love that the script is running in ~8mins. But as we discussed earlier, I am leaning towards not having a test for this script. It is not expected to be at the latest state all the time and will require default updates with every release. |
Co-authored-by: Anusha Hegde <[email protected]>
Co-authored-by: Anusha Hegde <[email protected]>
You are make a good point. But since this script only consume ~8mins, It wouldn't be introduce too much burden for github workflow. Anyway, I can accept both way. @jamiemonserrate What do you think? |
Signed-off-by: chen hui <[email protected]>
Signed-off-by: chen hui <[email protected]>
Signed-off-by: chen hui <[email protected]>
Signed-off-by: chen hui <[email protected]>
Happy to yield. Lets not test this with every PR then. PS - Thanks for taking the effort to get that workflow setup @huchen2021! Sorry, this was my bad you had to do extra work. |
@jamiemonserrate It's fine. I am very happy to do this. It's a study opportunity for me. Thanks for the responding. |
Signed-off-by: chen hui <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Again, huge thank you for this PR 🎉
#!/bin/bash | ||
function isCmdInstalled() { | ||
local cmd=$1 | ||
which ${cmd} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend : command -v over which -> which is external to shell and is divergent when used across platforms, command is built-in e.g
`$ which command
command: shell built-in command
$ command -v command
command
$ which docker
/usr/local/bin/docker
$ command -v docker
/usr/local/bin/docker
`
The above variability is within one platform in "which" output and hence not consistent
Minor suggest rest LGTM |
What this PR does / why we need it:
At the moment, a developer would have to manually deploy a management cluster, build images, copy files to the docker container etc. Lets improve this experience so that we can delight the developer and have them able to try out our software with just one command run, and in under 10 mins.
Signed-off-by: chen hui [email protected]
Fixes #272