Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

docs: Add debug console to dev guide #74

Merged
merged 2 commits into from
May 17, 2018

Conversation

jodh-intel
Copy link
Contributor

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

@jodh-intel
Copy link
Contributor Author

Hi @egernst, @devimc, @klynnrif - ptal.

@jodh-intel jodh-intel force-pushed the dev-guide-debug-console branch from 5de6200 to ece746e Compare May 14, 2018 15:38
@jodh-intel
Copy link
Contributor Author

/cc @mcastelino.

Copy link

@klynnrif klynnrif left a 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!

@@ -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)

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.

@@ -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).

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.


## Setting up a debug console

By default, it is not possible to login to a virtual machine since this could

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.

Copy link
Contributor Author

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.

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 :)

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

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.


### Create a custom image containing a shell

To be able to login to a virtual machine, you must [create a custom

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...

EOT
```

**Note**: You may need to adjust the `ExecStart=` path.

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.

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

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

$ (cd /usr/share/kata-containers && sudo ln -sf "$name" kata-containers.img)
```

**Note**: You should take care to undo this change after finishing debugging

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


### Obtain details of the image

If the image was created using

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


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:

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:

@jodh-intel jodh-intel force-pushed the dev-guide-debug-console branch 2 times, most recently from 0d80e62 to 2641e50 Compare May 15, 2018 08:54
@jodh-intel
Copy link
Contributor Author

Thanks @klynnrif - branch updated.

Copy link

@klynnrif klynnrif left a comment

Choose a reason for hiding this comment

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

lgtm - thanks!

@jodh-intel
Copy link
Contributor Author

ping @kata-containers/documentation.

Copy link
Member

@caoruidong caoruidong left a 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 [

@@ -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).
Copy link
Member

Choose a reason for hiding this comment

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

lost a [ ?

Copy link
Contributor Author

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>
@jodh-intel jodh-intel force-pushed the dev-guide-debug-console branch 2 times, most recently from ab49e57 to 6d6e750 Compare May 17, 2018 10:22
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>
@jodh-intel jodh-intel force-pushed the dev-guide-debug-console branch from 6d6e750 to 36e974b Compare May 17, 2018 10:36
@jodh-intel
Copy link
Contributor Author

Hi @egernst, @bergwolf - ptal.

@egernst egernst merged commit 561fead into kata-containers:master May 17, 2018
devimc pushed a commit to devimc/kata-documentation that referenced this pull request Sep 2, 2019
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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants