DocsReleasesCommunityGuidesBlog

Options

Learn how to configure kraft to your preferences. In this document, we outline where configuration is stored and what the options mean, including possible values and best practices.

When you install kraft, it will create a number of directories and files on your host that are used for configuration purposes and to store cache information.

Overview of configuration options#

The default location for user configuration for kraft is stored at: ~/.config/kraftkit/config.yaml. This file can be edited to your liking or to suite your needs. Below is an overview of each configuration option, how to set its value, their default value and purpose.

OptionEnvironmental VariableGlobal CLI flagDefault Value
no_promptKRAFTKIT_NO_PROMPT--no-promptfalse
Do not prompt for user interaction
no_parallelKRAFTKIT_NO_PARALLEL--no-parallelfalse
Do not run internal tasks in parallel
no_check_updatesKRAFTKIT_NO_CHECK_UPDATES--no-check-updatesfalse
Do not check for updates
pagerKRAFTKIT_PAGER--pager
System pager to pipe output to
runtime_dirKRAFTKIT_RUNTIME_DIR--runtime-dir/var/kraftkit
Directory for placing runtime files (e.g. pidfiles)
containerd_addrKRAFTKIT_CONTAINERD_ADDR--containerd-addr
Address of containerd daemon socket
buildkit_hostKRAFTKIT_BUILDKIT_HOST--buildkit-host
Address of BuildKit daemon socket
paths.configKRAFTKIT_PATHS_CONFIG--paths-config~/.config/kraftkit
Path to KraftKit config directory
paths.manifestsKRAFTKIT_PATHS_MANIFESTS--paths-manifests~/.local/share/kraftkit/manifests
Path to Unikraft manifest cache
paths.sourcesKRAFTKIT_PATHS_SOURCES--paths-sources~/.local/share/kraftkit/sources
Path to Unikraft component cache
log.levelKRAFTKIT_LOG_LEVEL--log-levelinfo
Log level verbosity
log.timestampsKRAFTKIT_LOG_TIMESTAMPS--log-timestampsfalse
Enable log timestamps
log.typeKRAFTKIT_LOG_TYPE--log-typefancy
Log type (choice of fancy, basic and json)
unikraft.mirrorsKRAFTKIT_UNIKRAFT_MIRRORS--unikraft-mirrors
Paths to mirrors of Unikraft component artifacts
unikraft.manifestsKRAFTKIT_UNIKRAFT_MANIFESTS--unikraft-manifestshttps://manifests.kraftkit.sh/index.yaml
Paths to package or component manifests

Additional influential environmental variables#

To increase compatibility across systems and to respect to pre-defined user environments, kraft recognizes the following additional environmental variables:

VariableAffects
PAGERHow the output is rendered in some commands. Can be set to cat or less.
NO_COLORDo not use any ANSI or true color output in any log messaging.
CLICOLORSame as NO_COLOR.
XDG_CONFIG_HOMEPath to the general configuration directory. Affects the default value of paths.config.
XDG_STATE_HOMEPath to the generate state directory.
XDG_DATA_HOMEPath to the general data directory. Affects the default value of unikraft.manifests and others.

Best practice recommendations#

The following are a few additional recommendations for global configuration values given certain contexts, environments or scenarios:

  • In CI/CD contexts, it is best to switch the log type from its default option of fancy to either basic or json to allow for better readability. KraftKit should recognize pseudo TTY environments and dynamically adjust.
  • If you are experiencing a build error from Unikraft's build system, it is best to switch to basic log type and to set the log level to debug to get a better understanding of what's being run underneath by KraftKit.
Edit this page on GitHub

Connect with the community

Feel free to ask questions, report issues, and meet new people.

Join us on Discord!
®

Getting Started

What is a unikernel?Install CLI companion toolUnikraft InternalsRoadmap

© 2024  The Unikraft Authors. All rights reserved. Documentation distributed under CC BY-NC 4.0.