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

docs: documentation for running rootless kata-runtime #553

Closed
wants to merge 1 commit into from

Conversation

gabibeyer
Copy link

The documentation was created assuming that the podman changes and kata changes have been merged into a release. At this time, this is not the case. In order to test/follow the documentation (if someone wants to do that prior to that) you will have to checkout my forks of podman and the kata-runtime. Additionally, they will need to be build from source with their dependencies. I also created a script/gist that may be helpful to set up this kind of pre-release environment: https://gist.github.com/gabibeyer/ca61f433eca00dd3123d3f70efbe7614

Documentation for running Kata Containers with Podman as a non
privileged user

Signed-off-by: gabi beyer [email protected]

@gabibeyer gabibeyer requested a review from a team as a code owner September 4, 2019 22:45
@gabibeyer gabibeyer force-pushed the podmanDocs branch 5 times, most recently from 9b975e1 to 3cbb6b6 Compare September 5, 2019 00:07
Copy link
Contributor

@marcov marcov left a comment

Choose a reason for hiding this comment

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

Thanks @gabibeyer for the doc, and for the all work you did to have this working in Kata / Podman!
I really appreciate the ability to run kata / podman rootless.

Take a look at the comments and suggested rewrite I left. To recap:

  • the way to write notes should follow this
  • the way to write code blocks should follow this
  • <br> are usually not needed, the markdown will render just fine without them!
  • Between a sentence and a code block, better to put some punctuation, otherwise it looks like the sentence is not typed out completely.

Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks @gabibeyer! This is going to be an increasingly useful doc I suspect.

A few comments to align this into the "standard form" ;)

@gabibeyer
Copy link
Author

@marcov @jodh-intel Thank you both so much for the detailed PR review; it was extremely helpful and I learned a lot about markdown! I made the first run of changes, but anticipated I missed a few things. I will look it over again in the morning :) Thank you again!

@gabibeyer gabibeyer force-pushed the podmanDocs branch 6 times, most recently from 9adc162 to dd69695 Compare September 6, 2019 03:50
Copy link
Contributor

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks @gabibeyer.

@klynnrif - ptal.

Copy link
Contributor

@marcov marcov left a comment

Choose a reason for hiding this comment

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

I did another review round @gabibeyer, sorry if I am overwhelming you with comments.

Overall, I am satisfied with how this document is turning out!

@gabibeyer
Copy link
Author

@marcov Not overwhelming at all! I really appreciate the thoroughness of both your reviews, thank you!

@gabibeyer
Copy link
Author

I don't have permission for labeling this, but should be DNM until the Podman and Kata releases, so that the versions can be updated in the table

Documentation for running Kata Containers with Podman as a non
privileged user

Fixes: kata-containers#540

Signed-off-by: gabi beyer <[email protected]>
@caoruidong caoruidong added the do-not-merge PR has problems or depends on another label Sep 9, 2019
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 spelling, grammar, and voice. Some suggested rewrites here to keep an active voice. Thanks!


## Requirements
- A Linux system, see [supported distributions](https://github.com/kata-containers/documentation/blob/master/install/README.md#supported-distributions) for an updated list.
- If using CentOS 7, `newuidmap` and `newgidmap` do not exist, and can be installed with:

Choose a reason for hiding this comment

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

Suggested rewrite:
If using CentOS 7, newuidmap and newgidmap do not exist. Install them with:

> If installing Podman with a package manager, there is usually no need to install slirp4netns separately.

## Configuration
Now that Kata Containers and Podman have been installed, they need to be configured for rootless execution.

Choose a reason for hiding this comment

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

Suggested rewrite:
Now that you have installed Kata Containers and Podman, you need to configure them for rootless execution.

If SELinux is installed and enabled, it needs to be disabled with the following command (Kata Containers [does not support SELinux](https://github.com/kata-containers/documentation/blob/master/Limitations.md#selinux-support)).

> **Warning:**
> The following command may differ depending on the distro being used:

Choose a reason for hiding this comment

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

Suggested rewrite:
The following command might differ depending on the distro you use:

```

#### 2. Add user to KVM group
If running a KVM based hypervisor, the user running the workload needs to be added to the KVM group:

Choose a reason for hiding this comment

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

Suggested rewrite:
If running a KVM based hypervisor, add the user running the workload to the KVM group:

```

#### 3. Reboot
Reboot the system for the changes to take effect (a reboot is required when disabling SELinux, while logging out and back in is enough to have that user joining the `KVM` group).

Choose a reason for hiding this comment

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

Suggested rewrite:
... (when you disable SELinux you must reboot, while logging out and back in is enough to have that user joining the ‘KVM’ group).


> **NOTE:**
> To obtain debug logs you can:
> - Enable [debug](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#enable-full-debug) in Kata (logs are added to journald).

Choose a reason for hiding this comment

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

Suggested rewrite:
… (this adds the logs to journald).

> **NOTE:**
> To obtain debug logs you can:
> - Enable [debug](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#enable-full-debug) in Kata (logs are added to journald).
> - Pass `--log-level=debug` to Podman (logs are printed to stderr).

Choose a reason for hiding this comment

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

Suggested rewrite:
… (this prints the logs to stderr).

> - Pass `--log-level=debug` to Podman (logs are printed to stderr).

## Appendix: Possible Errors
If you are building from source you may encounter the following errors.

Choose a reason for hiding this comment

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

may => might
If you are building from source you might encounter the following errors.

rpc error: code = Internal desc = Could not add route dest()/gw(10.0.2.2)/dev(tap0): network is unreachable: OCI runtime error
```
Solution:
You may need to [rebuild the agent](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#add-a-custom-agent-to-the-image---optional); there was a change in both the [agent](https://github.com/kata-containers/agent/commit/a78e8cfda627cc350dc9d9ca9b969ebb642030c3) and [runtime](https://github.com/kata-containers/runtime/commit/cfedb06a19135e2ab4f18203a4f3147cdc3a4980) code. This would probably only occur if building latest from source, since the runtime version would have the change and the released agent does not.

Choose a reason for hiding this comment

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

may => might
You might need to...


### Missing registry file
```
Error: unable to pull alpine: image name provided is a short name and no search registries are defined in the registries config file.

Choose a reason for hiding this comment

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

Suggested rewrite:
Error: unable to pull alpine: image name provided is a short name. The registries config file does not define the search registries.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @klynnrif - alas, we can't change this here as the doc is simply reporting an error (verbatim) coming from the runtime itself. The PR is now over at #565.

Copy link
Contributor

Choose a reason for hiding this comment

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

(but all other review feedback has been applied to the new PR).


| Component | Version | Install Instructions|
| ----------------|:-------:|---------------------|
| Podman | WIP | [see here](https://github.com/containers/libpod/blob/master/install.md)

Choose a reason for hiding this comment

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

Does it work with Rootless Docker as well?

@jodh-intel jodh-intel mentioned this pull request Oct 11, 2019
@jodh-intel
Copy link
Contributor

Closing this PR in favour of #565.

@jodh-intel jodh-intel closed this Oct 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do-not-merge PR has problems or depends on another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants