Files
kata-containers/src/tools/kata-ctl/README.md
Narendra Patel 593840e075 kata-ctl: Allow INSTALL_PATH= to be specified
Update the kata-ctl install rule to allow it to be installed to a given directory

The Makefile was updated to use an INSTALL_PATH variable to track where the
kata-ctl binary should be installed.  If the user doesn't specify anything,
then it uses the default path that cargo uses.  Otherwise, it will install it
in the directory that the user specified.  The README.md file was also updated
to show how to use the new option.

Fixes #5403

Co-authored-by: Cesar Tamayo <cesar.tamayo@intel.com>
Co-authored-by: Kevin Mora Jimenez <kevin.mora.jimenez@intel.com>
Co-authored-by: Narendra Patel <narendra.g.patel@intel.com>
Co-authored-by: Ray Karrenbauer <ray.karrenbauer@intel.com>
Co-authored-by: Srinath Duraisamy <srinath.duraisamy@intel.com>
Signed-off-by: Narendra Patel <narendra.g.patel@intel.com>
2023-05-15 17:21:49 -04:00

2.1 KiB

Kata Containers control tool

Overview

The kata-ctl tool is a rust rewrite of the kata-runtime utility program.

The program provides a number of utility commands for:

  • Using advanced Kata Containers features.
  • Problem determination and debugging.

Audience and environment

Users and administrators.

Build the tool

$ make

Install the tool

$ make install

If you would like to install the tool to a specific directory, then you can provide it through the INSTALL_PATH variable.

$ make install INSTALL_PATH=/path/to/your/custom/install/directory

Run the tool

$ kata-ctl ...

For example, to determine if your system is capable of running Kata Containers, run:

$ kata-ctl check all

Full details

For a usage statement, run:

$ kata-ctl --help

Cross-builds

For developers that want to build and test the kata-ctl tool on various architectures, the makefile included does have support for that. This would however, require installing the cross compile toolchain for the target architecture on the host along with required libraries.

Cross is an open source tool that offers zero setup cross compile and requires no changes to the system installation for cross-compiling rust binaries. It makes use of docker containers for cross-compilation.

You can install cross with:

cargo install -f cross

cross relies on docker or podman. For dependencies take a look at: https://github.com/cross-rs/cross#dependencies

There is an included cross configuration file Cross.yaml that can be used to compile kata-ctl for various targets. This configuration helps install required dependencies inside a docker container.

For example, to compile for target s390x-unknown-linux-gnu included in Cross.yaml simple run:

cross build --target=s390x-unknown-linux-gnu

You may also need to add the target on your host system prior to the above step as:

rustup target add s390x-unknown-linux-gnu