-
Notifications
You must be signed in to change notification settings - Fork 304
docs: Add debug console to dev guide #74
docs: Add debug console to dev guide #74
Conversation
5de6200
to
ece746e
Compare
/cc @mcastelino. |
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.
Scrubbed for grammar, flow, and structure. A few changes and hopefully I did not change meaning. Thanks!
Developer-Guide.md
Outdated
@@ -24,6 +24,15 @@ | |||
* [Troubleshoot Kata Containers](#troubleshoot-kata-containers) | |||
* [Appendices](#appendices) | |||
* [Checking Docker default runtime](#checking-docker-default-runtime) | |||
* [Setting up a debug console](#setting-up-a-debug-console) |
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.
Suggest changing this title to "Set up a debug console" to avoid using the gerund (ing) format.
Developer-Guide.md
Outdated
@@ -277,10 +286,131 @@ To perform analysis on Kata logs, use the | |||
[`kata-log-parser`](https://github.com/kata-containers/tests/tree/master/cmd/log-parser) | |||
tool. | |||
|
|||
See also [Setting up a debug console](#setting-up-a-debug-console). |
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.
Suggest removing "also": See Setting up a debug console.
Developer-Guide.md
Outdated
|
||
## Setting up a debug console | ||
|
||
By default, it is not possible to login to a virtual machine since this could |
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.
Lines 301-304 suggested rewrite (unless I've changed the meaning): By default you cannot login to a virtual machine since this can be sensitive from a security perspective. However a virtual machine also requires additional packages in the rootfs, which means the image used to boot each virtual machine is larger.
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.
After a coffee, that paragraph reads rather strangely in both forms :)
I've tried to reword using your suggested phrasing and come up with:
By default you cannot login to a virtual machine since this can be sensitive
from a security perspective. Also allowing logins would require additional
packages in the rootfs, which would increase the size of the image used to
boot the virtual machine.
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.
Ha! I like your phrasing. Thanks :)
Developer-Guide.md
Outdated
packages in the rootfs which means the image used to boot each virtual machine | ||
would be larger. | ||
|
||
If you wish to be able to login to a virtual machine that hosts your |
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.
Lines 306-307 suggested rewrite: If you want to login to a virtual machine that hosts your containers, complete the following steps, which assume a rootfs image.
Developer-Guide.md
Outdated
|
||
### Create a custom image containing a shell | ||
|
||
To be able to login to a virtual machine, you must [create a custom |
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.
To login to a virtual machine...
Developer-Guide.md
Outdated
EOT | ||
``` | ||
|
||
**Note**: You may need to adjust the `ExecStart=` path. |
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.
Note: You might need to adjust the ExecStart=
path.
Developer-Guide.md
Outdated
Next, modify the `image=` values in the `[hypervisor.qemu]` section of the | ||
[configuration file](https://github.com/kata-containers/runtime#configuration) | ||
to specify the full path to the image name specified in the previous code | ||
section. Alternatively, recreate the symbolic link so that it is pointing to |
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.
...Alternatively, recreate the symbolic link so it points to
Developer-Guide.md
Outdated
$ (cd /usr/share/kata-containers && sudo ln -sf "$name" kata-containers.img) | ||
``` | ||
|
||
**Note**: You should take care to undo this change after finishing debugging |
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.
Note: You should take care to undo this change after you finish debugging
Developer-Guide.md
Outdated
|
||
### Obtain details of the image | ||
|
||
If the image was created using |
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.
If the image is created using
Developer-Guide.md
Outdated
|
||
If the image was created using | ||
[osbuilder](https://github.com/kata-containers/osbuilder), the following YAML | ||
file will exist and contain details of the image and how it was created: |
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.
file exists and contains details of the image and how it was created:
0d80e62
to
2641e50
Compare
Thanks @klynnrif - branch updated. |
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 - thanks!
ping @kata-containers/documentation. |
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, just a missing [
Developer-Guide.md
Outdated
@@ -277,10 +286,132 @@ To perform analysis on Kata logs, use the | |||
[`kata-log-parser`](https://github.com/kata-containers/tests/tree/master/cmd/log-parser) | |||
tool. | |||
|
|||
See Set up a debug console](#set-up-a-debug-console). |
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.
lost a [ ?
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.
Good catch @caoruidong! ;) Branch updated.
You cannot remove an existing rootfs directory without being `root`, so use `sudo(8)` in the developer guide. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
ab49e57
to
6d6e750
Compare
Add an appendix explaining how to setup a debug console to login to the virtual machine for debugging. Fixes kata-containers#72. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
6d6e750
to
36e974b
Compare
When docker is used for building rootfs the EXTRA_PKGS should be passed as env var Fixes kata-containers#74 Signed-off-by: Harshal Patil <harshal.patil@in.ibm.com>
Add an appendix explaining how to setup a debug console to login to the
virtual machine for debugging.
Fixes #72.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com