gitee.com/leisunstar/runtime@v0.0.0-20200521203717-5cef3e7b53f9/README.md (about)

     1  [![Build Status](https://travis-ci.org/kata-containers/runtime.svg?branch=master)](https://travis-ci.org/kata-containers/runtime)
     2  [![Build Status](http://jenkins.katacontainers.io/job/kata-containers-runtime-ubuntu-18-04-master/badge/icon)](http://jenkins.katacontainers.io/job/kata-containers-runtime-ubuntu-18-04-master/)
     3  [![Go Report Card](https://goreportcard.com/badge/github.com/kata-containers/runtime)](https://goreportcard.com/report/github.com/kata-containers/runtime)
     4  [![GoDoc](https://godoc.org/github.com/kata-containers/runtime?status.svg)](https://godoc.org/github.com/kata-containers/runtime)
     5  
     6  # Runtime
     7  
     8  This repository contains the runtime for the
     9  [Kata Containers](https://github.com/kata-containers) project.
    10  
    11  For details of the other Kata Containers repositories, see the
    12  [repository summary](https://github.com/kata-containers/kata-containers).
    13  
    14  * [Introduction](#introduction)
    15  * [License](#license)
    16  * [Platform support](#platform-support)
    17      * [Hardware requirements](#hardware-requirements)
    18  * [Download and install](#download-and-install)
    19  * [Quick start for developers](#quick-start-for-developers)
    20  * [Architecture overview](#architecture-overview)
    21  * [Configuration](#configuration)
    22  * [Logging](#logging)
    23      * [Kata OCI](#kata-oci)
    24      * [Kata containerd shimv2](#kata-containerd-shimv2)
    25  * [Debugging](#debugging)
    26  * [Limitations](#limitations)
    27  * [Community](#community)
    28      * [Contact](#contact)
    29  * [Further information](#further-information)
    30  * [Additional packages](#additional-packages)
    31  
    32  ## Introduction
    33  
    34  `kata-runtime`, referred to as "the runtime", is the Command-Line Interface
    35  (CLI) part of the Kata Containers runtime component. It leverages the
    36  [virtcontainers](virtcontainers)
    37  package to provide a high-performance standards-compliant runtime that creates
    38  hardware-virtualized [Linux](https://www.kernel.org/) containers running on Linux hosts.
    39  
    40  The runtime is
    41  [OCI](https://github.com/opencontainers/runtime-spec)-compatible,
    42  [CRI-O](https://github.com/cri-o/cri-o)-compatible, and
    43  [Containerd](https://github.com/containerd/containerd)-compatible,
    44   allowing it
    45  to work seamlessly with both Docker and Kubernetes respectively.
    46  
    47  ## License
    48  
    49  The code is licensed under an Apache 2.0 license.
    50  
    51  See [the license file](LICENSE) for further details.
    52  
    53  ## Platform support
    54  
    55  Kata Containers currently works on systems supporting the following
    56  technologies:
    57  
    58  - [Intel](https://www.intel.com) VT-x technology.
    59  - [ARM](https://www.arm.com) Hyp mode (virtualization extension).
    60  - [IBM](https://www.ibm.com) Power Systems.
    61  - [IBM](https://www.ibm.com) Z mainframes.
    62  ### Hardware requirements
    63  
    64  The runtime has a built-in command to determine if your host system is capable
    65  of running and creating a Kata Container:
    66  
    67  ```bash
    68  $ kata-runtime kata-check
    69  ```
    70  
    71  > **Note:**
    72  >
    73  > - By default, only a brief success / failure message is printed.
    74  > If more details are needed, the `--verbose` flag can be used to display the
    75  > list of all the checks performed.
    76  >
    77  > - `root` permission is needed to check if the system is capable of running
    78  > Kata containers. In this case, additional checks are performed (e.g., if another
    79  > incompatible hypervisor is running).
    80  
    81  ## Download and install
    82  
    83  [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/kata-containers)
    84  
    85  See the [installation guides](https://github.com/kata-containers/documentation/tree/master/install/README.md)
    86  available for various operating systems.
    87  
    88  ## Quick start for developers
    89  
    90  See the
    91  [developer guide](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md).
    92  
    93  ## Architecture overview
    94  
    95  See the [architecture overview](https://github.com/kata-containers/documentation/blob/master/design/architecture.md)
    96  for details on the Kata Containers design.
    97  
    98  ## Configuration
    99  
   100  The runtime uses a TOML format configuration file called `configuration.toml`.
   101  The file contains comments explaining all options.
   102  
   103  > **Note:**
   104  >
   105  > The initial values in the configuration file provide a good default configuration.
   106  > You may need to modify this file to optimise or tailor your system, or if you have
   107  > specific requirements.
   108  
   109  Since the runtime supports a
   110  [stateless system](https://clearlinux.org/about),
   111  it checks for this configuration file in multiple locations, two of which are
   112  built in to the runtime. The default location is
   113  `/usr/share/defaults/kata-containers/configuration.toml` for a standard
   114  system. However, if `/etc/kata-containers/configuration.toml` exists, this
   115  takes priority.
   116  
   117  The below command lists the full paths to the configuration files that the
   118  runtime attempts to load. The first path that exists will be used:
   119  
   120  ```bash
   121  $ kata-runtime --kata-show-default-config-paths
   122  ```
   123  
   124  Aside from the built-in locations, it is possible to specify the path to a
   125  custom configuration file using the `--kata-config` option:
   126  
   127  ```bash
   128  $ kata-runtime --kata-config=/some/where/configuration.toml ...
   129  ```
   130  
   131  The runtime will log the full path to the configuration file it is using. See
   132  the [logging](#logging) section for further details.
   133  
   134  To see details of your systems runtime environment (including the location of
   135  the configuration file being used), run:
   136  
   137  ```bash
   138  $ kata-runtime kata-env
   139  ```
   140  
   141  ## Logging
   142  
   143  For detailed information and analysis on obtaining logs for other system
   144  components, see the documentation for the
   145  [`kata-log-parser`](https://github.com/kata-containers/tests/tree/master/cmd/log-parser)
   146  tool.
   147  
   148  For runtime logs, see the following sections for the CRI-O and containerd shimv2 based runtimes.
   149  
   150  ### Kata OCI
   151  
   152  The Kata OCI runtime (including when used with CRI-O), provides `--log=` and `--log-format=` options.
   153  However, the runtime also always logs to the system log (`syslog` or `journald`).
   154  
   155  To view runtime log output:
   156  
   157  ```bash
   158  $ sudo journalctl -t kata-runtime
   159  ```
   160  
   161  ### Kata containerd shimv2
   162  
   163  The Kata containerd shimv2 runtime logs through `containerd`, and its logs will be sent
   164  to wherever the `containerd` logs are directed. However, the
   165  shimv2 runtime also always logs to the system log (`syslog` or `journald`) under the
   166  identifier name of `kata`.
   167  
   168  To view the `shimv2` runtime log output:
   169  
   170  ```bash
   171  $ sudo journalctl -t kata
   172  ```
   173  
   174  ## Debugging
   175  
   176  See the
   177  [debugging section of the developer guide](https://github.com/kata-containers/documentation/blob/master/Developer-Guide.md#troubleshoot-kata-containers).
   178  
   179  ## Limitations
   180  
   181  See the
   182  [limitations file](https://github.com/kata-containers/documentation/blob/master/Limitations.md)
   183  for further details.
   184  
   185  ## Community
   186  
   187  See [the community repository](https://github.com/kata-containers/community).
   188  
   189  ### Contact
   190  
   191  See [how to reach the community](https://github.com/kata-containers/community/blob/master/CONTRIBUTING.md#contact).
   192  
   193  ## Further information
   194  
   195  See the
   196  [project table of contents](https://github.com/kata-containers/kata-containers)
   197  and the
   198  [documentation repository](https://github.com/kata-containers/documentation).
   199  
   200  ## Additional packages
   201  
   202  For details of the other packages contained in this repository, see the
   203  [package documentation](pkg).