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

install: Refactor installation instructions #264

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

marcov
Copy link
Contributor

@marcov marcov commented Oct 4, 2018

Refactor installation instruction to minimize duplicate content,
to document package source verification process, and to remove
some of the typos.

Fixes: #263

Signed-off-by: Marco Vedovati mvedovati@suse.com

@marcov
Copy link
Contributor Author

marcov commented Oct 4, 2018

I still need to figure out where to upload the signing public key.
I was thinking on the tests repo, so that the CI jobs can import it during installation with:

rpm import "$(curl -fsSL \
https://raw.githubusercontent.com/kata-containers/tests/master/key/kata-containers.pub) 

This can be added in the install instruction code block, and --no-gpg-checks should be removed...

@marcov
Copy link
Contributor Author

marcov commented Oct 4, 2018

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.

Hi @marcov - I like what you're doing here :)! A few comments...


The table below provides a list of the currently supported distributions.

- If your distribution is supported, you can easily install Kata packages [using kata-manager](...).
Copy link
Contributor

Choose a reason for hiding this comment

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


I would be tempted to turn these three bullets into sub-sections (and add those to the table of contents of course).

I like this refactor but I do think it might be slightly confusing to users to know which option is most appropriate for them to select still.

Once we have subsections for the different options, you could make it slightly clearer what type of user might want to select each option:

  • Automatic install using kata-manager (Recommended option for the impatient / quickest option to get a working system)
  • Manual installation (if you want to run each installation step by following written instructions).
  • Scripted installation (if you want to be able to install Kata automatically, but also want to review the process first).

The wording above might need a bit of rework and these options could maybe be put into a table themselves but it should be very clear to users which option is most appropriate for them I think.

It's probably also worth stating that whichever option they select, the resulting system will be the same - it's just the method itself which differs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review, I agree about this being hard to read. But I pushed it out early to gather feedbacks like yours :)

My first attempt was to have the different options available in a single document. Also, I felt it was worth documenting how to use kata-manager and not just mention that it can be used as an option.

Let's attempt to structure it with subsections.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @marcov - sure and raising PRs like this is much appreciated! Please don't misunderstand - I think this is moving in the right direction but delicate doc rework like this can take a few iterations. It's also just as difficult as code refactoring imho (but arguably more important! ;)

I think it makes a lot of sense having all the options in the top-level README - we just need to make some tweaks to make it clear to both "power users" and "newbies" which option is most appropriate for them :)

It would be good in fact to get more input on this from the rest of the team and @klynnrif and @intelkevinputnam.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hehe @jodh-intel please don't misunderstand me too 😆 I agree 100% with what you said.
What I meant is that I started with what looked like obvious to change and then this got out of hand.

install/README.md is the front page of Kata for the new users and it is important to get it right.

Maybe we can open the discussion to the ML or the next architecture call?

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcov - I think we're actually pretty close to having this done, but if we can't resolve by Monday, sure - feel free to add it to the agenda :)

/cc @grahamwhaley, @egernst for input.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jodh-intel what do you think about this structure?

I am not sure if it's better to name the section with the distributions table Supported Distribution or Manual Installation

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice - I like it.

* [OpenSuse](opensuse-installation-guide.md)
* [Ubuntu](ubuntu-installation-guide.md)
* [SLES](sles-installation-guide.md)
|Distro | Versions | Notes |
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Could you change the name of the "Distro" column to "Distro specific installation instructions" as it is not immediately obvious what this table is showing the user.
  • The "Notes" column isn't being used so I think you could remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • The "Notes" column isn't being used so I think you could remove it?

gonna use vim CTRL-V for this :D

Copy link
Contributor

Choose a reason for hiding this comment

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

<tongue-in-cheek>
Or for those readers using an editor requiring many, many fingers (and a reinforced tab key), you could use something like org-table-delete-column
</tongue-in-cheek>

|[Fedora](fedora-installation-guide.md) | 27, 28 | |
|[openSUSE](opensuse-installation-guide.md) | Leap (42.3) | |
|[Red Hat Enterprise Linux (RHEL)](rhel-installation-guide.md) | 7 | |
|[SUSE Linux Enterprise Server (SLES)](sles-installation-guide.md) | SLE 12 SP3 | |
Copy link
Contributor

Choose a reason for hiding this comment

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

"SLE" or "SLES" in column 2?

install/installing-with-kata-manager.md Show resolved Hide resolved

## Install the Kata packages
```
bash -c "$(curl -fsSL \
Copy link
Contributor

Choose a reason for hiding this comment

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

install-packages"
```

## Install Docker
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth mentioning that kubernetes support is not available with this tool. Also, you could mention that the user can run kata-manager.sh -h for full details.

```
bash -c "$(curl -fsSL \
https://raw.githubusercontent.com/kata-containers/tests/master/cmd/kata-manager/kata-manager.sh) \
install-docker-system"
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that install-docker-system implies install-packages. To get a fully working system, you only need to run install-docker-system so you could drop the install-packages section, or move it after the "Install Docker" section to say that if your chosen container manager is not Docker, you can install the Kata packages but need to also install k8s, etc.

@marcov marcov force-pushed the refactor-install branch 5 times, most recently from 4607ebf to 60f6f99 Compare October 5, 2018 16:39
@marcov
Copy link
Contributor Author

marcov commented Oct 5, 2018

Ok, I pushed a new version based on @jodh-intel suggestions. I can see some improvements but feel free to give some more feedbacks :)

Installing Kata Containers on your system is a three step procedure:
1. Install the Kata Container packages.
2. Install a supported container runtime manager.
3. Configure the container manager to use `kata-runtime` as OCI runtime.
Copy link
Member

Choose a reason for hiding this comment

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

correct me if I am wrong but we should update to use https? And probably add a comment that suggest add/verify gpg key with a secure channel?

curl -sL  http://download.opensuse.org/repositories/home:/katacontainers:/releases:/${ARCH}:/master/xUbuntu_$(lsb_release -rs)/Release.key | sudo apt-key add -
$ sudo -E apt-get update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My idea was to include the key import procedure in the installation instruction for each distribution, and to do this in a separate PR.

HTTPS will be used when importing the public key as secure channel, but it's not needed when downloading packages from OBS.

I am not sure if it's better to download the key from OBS, or have it uploaded on GitHub somewhere. Do you think it makes a difference for the tests infrastructure?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

having the key import done in the instructions means that this will also be run with tests,
and we can drop the --no-gpg-checks flags used now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. It's one extra step, but having the key import step clearly stated will make it clearer to users what is happening from a security perspective.

> **Notes on package source verification**:
> - The Kata packages hosted on the download server are signed with GPG to ensure integrity and authenticity.
>
> - [This is the public key](....) used for signing the packages and [this is its fingerprint](...).
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to fill in these blanks 😄

@marcov marcov force-pushed the refactor-install branch 5 times, most recently from 972d7dd to b778a82 Compare October 8, 2018 08:56
@marcov
Copy link
Contributor Author

marcov commented Oct 8, 2018

I hope this is getting closer to a final version.

I thought that the reference packages signing key can be uploaded at this location, given that that it will be used to automate packages installation when running CI tests: https://github.com/kata-containers/tests/data/rpm-signkey.pub

@jodh-intel
Copy link
Contributor

jodh-intel commented Oct 10, 2018

lgtm

ping @kata-containers/documentation.

Approved with PullApprove Approved with PullApprove

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, structure, and flow. Most of the suggested rewrites are to keep things in an active voice. Thanks!

Kata Containers requires nested virtualization or bare metal.
See the
[hardware requirements](https://github.com/kata-containers/runtime/blob/master/README.md#hardware-requirements)
to see if your system is capable of running Kata Containers.

## Installing Kata Containers
## Installing on a Linux System
Here's an overview of the different installation methods available. All of these will equally result in a system

Choose a reason for hiding this comment

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

Suggested rewrite: The following is an overview of the different installation methods available. All of these methods equally result in a system

|[Build from sources](#../Developer-Guide.md#initial-setup) |Developers and hackers |any distro |

### Automatic Installation
You can easily install Kata packages [using kata-manager](installing-with-kata-manager.md).

Choose a reason for hiding this comment

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

Suggested rewrite: Use kata-manager to automatically install Kata packages.

You can easily install Kata packages [using kata-manager](installing-with-kata-manager.md).

### Scripted Installation
You can generate installation scripts [using kata-doc-to-script](installing-with-kata-doc-to-script.md).

Choose a reason for hiding this comment

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

Suggested rewrite: Use kata-doc-to-script to generate installation scripts.

>
> - The public key used to sign packages is available [at this link](https://github.com/kata-containers/tests/data/rpm-signkey.pub); the fingerprint is `9FDC0CB6 3708CF80 3696E2DC D0B37B82 6063F3ED`.
>
> - Only trust these signing key and fingerprint and don't disable GPG checks, otherwise packages

Choose a reason for hiding this comment

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

Lines 62-63 suggested rewrite: Only trust the signing key and fingerprint listed in the previous bullet point. Do not disable GPG checks, otherwise package source and authenticity is not guaranteed.

install/installing-with-kata-doc-to-script.md Show resolved Hide resolved
${ID}-install.sh"
```

If for example your distribution is CentOS, this will generate a runnable shell script called `centos-install.sh`.

Choose a reason for hiding this comment

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

Suggested rewrite: For example, if your distribution is CentOS, the previous example will generate a runnable shell script called centos-install.sh.

${ID}-docker-install.sh"
```

If for example your distribution is CentOS, this will generate a runnable shell script called `centos-docker-install.sh`.

Choose a reason for hiding this comment

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

Suggested rewrite: For example, if your distribution is CentOS, the previous example will generate a runnable shell script called centos-docker-install.sh.

> can still use `kata-manager` to [install Kata package](#install-kata-packages-only), and then setup your container manager manually.

## Full Installation
This command will:

Choose a reason for hiding this comment

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

Lines 16-19 suggested rewrite:
This command does the following:

  1. Installs Kata Containers packages
  2. Installs Docker
  3. Configures Docker to use the kata OCI runtime by default

```

## Install the Kata packages only
This command will only install Kata Containers packages.

Choose a reason for hiding this comment

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

Suggested rewrite: Use the following command to only install Kata Containers packages:

```

## Further Information
`kata-manager` can do much more; refer to [`kata-manager` page](https://github.com/kata-containers/tests/blob/master/cmd/kata-manager) for more information.

Choose a reason for hiding this comment

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

Suggested rewrite: For more information on what kata-manager can do, refer to the kata-manager page.

Refactor installation instruction to minimize duplicate content,
to document package source verification process, and to remove
some of the typos.

Fixes: kata-containers#263

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
@marcov
Copy link
Contributor Author

marcov commented Oct 12, 2018

Thanks @klynnrif, I integrated all your suggestions.

@marcov marcov changed the title WIP: install: Refactor installation instructions install: Refactor installation instructions Oct 16, 2018
@marcov
Copy link
Contributor Author

marcov commented Oct 16, 2018

Removed the WIP tag, and waiting for an extra review :)

@jodh-intel
Copy link
Contributor

Re-ping @kata-containers/documentation - it would be great to get this landed today... 😄

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

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

Nice re-org, de-dup and cleanup :-)
lgtm
One small note - does not have to be a blocker - your call @marcov if you want to add ClearLinux to the distro list right now?

|[openSUSE](opensuse-installation-guide.md) | Leap (42.3) |
|[Red Hat Enterprise Linux (RHEL)](rhel-installation-guide.md) | 7 |
|[SUSE Linux Enterprise Server (SLES)](sles-installation-guide.md) | SLES 12 SP3 |
|[Ubuntu](ubuntu-installation-guide.md) | 16.04, 18.04 |
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to add a Clear Linux entry here as well - we don't package for it on OBS, but Clear Linux packages Kata directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@grahamwhaley I could add ClearLinux, but that table was made with the assumption that kata-manager or kata-doc-to-script can use the linked installation instructions.

So there are 2 possibilities:

  • Add ClearLinux, and a note column, saying that installation cannot be scripted / automated for it
  • Have a new PR with a dedicated installation instructions pages, as done for other distros. However this would duplicate the information, something that @jodh-intel does not like :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Although I think @grahamwhaley has a good point about mentioning Clear Linux here, since that distro isn't actually mentioned at all, I think it's just about out of scope of this PR.

Let's land this and update for CLR on #270.

@caoruidong
Copy link
Member

caoruidong commented Oct 16, 2018

lgtm

Approved with PullApprove Approved with PullApprove

@jodh-intel jodh-intel merged commit eee4f44 into kata-containers:master Oct 16, 2018
devimc pushed a commit to devimc/kata-documentation that referenced this pull request Sep 2, 2019
image-builder: re-implement image builder script
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.

6 participants