install: clean instructions for kata-manager#279
install: clean instructions for kata-manager#279grahamwhaley merged 1 commit intokata-containers:masterfrom
Conversation
| $ bash -c "$(curl -fsSL \ | ||
| $ https://raw.githubusercontent.com/kata-containers/tests/master/cmd/kata-manager/kata-manager.sh) \ | ||
| install-packages" | ||
| ```bash |
There was a problem hiding this comment.
I guess this is fine to keep as a ```bash block, but when we test this doc, this block will effectively be a nop (since we've already installed the packages in the section above. But atleast we will be running this code I guess.
How about this though - create a new section between the two existing sections:
To remove the Kata Packages
$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/tests/master/cmd/kata-manager/kata-manager.sh) remove-packages"
That way, when we test this doc by executing the code blocks from top to bottom we'll:
- Install a docker system (with Kata packages).
- Remove the Kata packages.
- Re-install the Kata packages.
😄
There was a problem hiding this comment.
That's a smart idea, but the doc should be made for humans and not for the tests to pass. What about adding the remove-packages in the CI script? Or have a CI job dedicated to installing with kata manager.
There was a problem hiding this comment.
That's a smart idea, but the doc should be made for humans and not for the tests to pass.
Unless, of course, our target users are AI monsters 😛
There was a problem hiding this comment.
I agree. The problem is that to avoid completely reworking the CI, the docs are executed as scripts from top to bottom. So if we don't want to add the new section, I'd suggest we leave this document as it is, knowing that the "Install the Kata packages only" section will be executed (but do nothing). Or, we could split the doc into two so that the CI can execute both docs in clean environments.
There was a problem hiding this comment.
Kind of a compromise, we could add a html comment with the code to execute?
<!---
Code needed for CI purposes, ignore this comment.
```bash
$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/kata-containers/tests/master/cmd/kata-manager/kata-manager.sh) remove-packages"
```
--->
ps: could you point me to the shell script running all the code blocks in md files?
There was a problem hiding this comment.
wfm - atleast we'll be testing the docs!
The script that converts the docs to shell scripts is:
(btw, have you seen https://github.com/kata-containers/tests/blob/master/.ci/README.md ?)
That script is what https://github.com/kata-containers/tests/tree/master/cmd/kata-manager calls too to avoid duplication.
There was a problem hiding this comment.
Just to be sure I am understanding correctly
static-checks.shwill callkata-doc-to-script.shto syntax check the content of```bashcode blocks withbash -n..ci/test-install-docs.shcallskata-manager install-docker-systemwhenever an update toinstall/.*mdis detected.
No one however will try to install kata using the content of install/installing-with-kata-manager.md.
So adding the extra code in the comment makes sense only if we setup an additional step to install kata using this doc. Am I right?
There was a problem hiding this comment.
Yes. But I'm working on improving the CI scripts in this repo to test the remaining install docs (installing-with-kata-manager.md and installing-with-kata-doc-to-script.md) on #278.
bcedf33 to
7b8b969
Compare
|
Hi @marcov - I think that until we can resolve kata-containers/tests#828, this doc is going to have to state in a note that you need |
Use a one-line code block for the installation command, and document the dry run option. Fixes: kata-containers#275 Signed-off-by: Marco Vedovati <mvedovati@suse.com>
7b8b969 to
08d233e
Compare
|
@jodh-intel if maybe kata-containers/tests#829 lands shortly 🤞, we can avoid doing that and then opening another PR just to remove the extra deps Otherwise, no problem adding the extra text :) |
| This command does the following: | ||
| 1. Installs Kata Containers packages | ||
| 2. Installs Docker | ||
| 3. Configure Docker to use the Kata OCI runtime by default |
There was a problem hiding this comment.
Not strictly part of this PR, but this should say "Configures".
grahamwhaley
left a comment
There was a problem hiding this comment.
As a pragmatic fix, and to get the install directions actually working...
lgtm
| install-docker-system" | ||
| ``` | ||
|
|
||
| <!-- |
There was a problem hiding this comment.
bleh, the first time we have buried HTML in our mardown documents I believe.....
docs: Fix markdown
Use a one-line code block for the installation command, and document the
dry run option.
Fixes: #275
Signed-off-by: Marco Vedovati mvedovati@suse.com