kraft
has been modeled after many
popular package managers and build tools with the explicit aim of making it
easy to build and manage your application as a unikernel.
Before beginning, it is important to familiarize yourself with the concept of a
unikernel and how unikernels differ from other runtime
mediums, including: containers, standard VMs and OSes (e.g. Linux). At the same
time, a general understanding of how a unikernel is constructed with
Unikraft will help you understand how to use
kraft
effectively.
Please let us know if you run into any issues by reaching out through one of the main communication channels or by filing an issue on GitHub. Happy krafting! 🐒
qemu/x86_64
#Start by using the interactive installer:
curl --proto '=https' --tlsv1.2 -sSf https://get.kraftkit.sh | sh
This will install the kraft
binary executable onto your host as well as
additional dependencies necessary for building and running Unikraft unikernels.
The installer detects your OS and suggests an appropriate installation
procedure.
For more information on customizing your installation of
kraft
, please refer to the complete installation guide.
To test your installation, you can try running our pre-built "Hello, World" unikernel on your machine by simply invoking the following command:
kraft run unikraft.org/helloworld:latest
If all goes well, you should be greeted with a message and some helpful tips. If things didn't go well, please check out our troubleshooting guide for more information and for frequently asked questions.
kraft -h
./^\ Build and use highly customized and ultra-lightweight unikernels.:[ ]:| = | Version: v0.10.1/|/=\|\ Documentation: https://unikraft.org/docs/cli(_:| |:_) Issues & support: https://github.com/unikraft/kraftkit/issuesv v Platform: https://unikraft.cloud' 'USAGEkraft [FLAGS] SUBCOMMANDBUILD COMMANDSbuild Configure and build Unikraft unikernelsclean Remove the build object files of a Unikraft projectmenu Open's Unikraft configuration editor TUIPROJECT LIBRARY COMMANDSlib add Add unikraft library to the project directorylib create Initialize a library from a templatelib remove Removes a library dependency from the project directoryPACKAGING COMMANDSpkg Package and distribute Unikraft unikernels and their dependenciespkg info Show information about a packagepkg list List installed Unikraft component packagespkg pull Pull a Unikraft unikernel and/or its dependenciespkg push Push a Unikraft unikernel package to registrypkg remove Removes selected local packagespkg source Add Unikraft component manifestspkg unsource Remove Unikraft component manifestspkg update Retrieve new lists of Unikraft components, libraries and packagesLOCAL RUNTIME COMMANDSlogs Fetch the logs of a unikernelpause Pause one or more running unikernelsps List running unikernelsremove Remove one or more running unikernelsrun Run a unikernelstart Start one or more machinesstop Stop one or more running unikernelsLOCAL NETWORKING COMMANDSnet create Create a new machine networknet down Bring a network offlinenet inspect Inspect a machine networknet list List machine networksnet remove Remove a networknet up Bring a network onlineLOCAL VOLUME COMMANDSvol create Create a machine volumevol inspect Inspect a machine volumevol ls List machine volumesvol remove Remove a volumeCOMPOSE COMMANDScompose build Build or rebuild servicescompose create Create a compose projectcompose down Stop and remove a compose projectcompose logs Print the logs of services in a projectcompose ls List compose projectscompose pause Pause a compose projectcompose ps List running services of current projectcompose pull Pull images of services of current projectcompose push Push images of services of current projectcompose start Start a compose projectcompose stop Stop a compose projectcompose unpause Unpause a compose projectcompose up Run a compose projectUNIKRAFT CLOUD COMMANDScloud deploy Deploy your applicationcloud quotas View your resource quota on Unikraft Cloudcloud tunnel Forward a local port to an unexposed instanceUNIKRAFT CLOUD IMAGE COMMANDScloud img list List all images at a metro for your accountcloud img remove Remove an imageUNIKRAFT CLOUD INSTANCE COMMANDScloud instance create Create an instancecloud instance get Retrieve the state of instancescloud instance list List instancescloud instance logs Get console output of instancescloud instance remove Remove instancescloud instance start Start instancescloud instance stop Stop instancescloud instance top Show instance metricsUNIKRAFT CLOUD VOLUME COMMANDScloud vol attach Attach a persistent volume to an instancecloud vol create Create a persistent volumecloud vol detach Detach a persistent volume from an instancecloud vol get Retrieve the state of persistent volumescloud vol import Import local data to a persistent volumecloud vol list List persistent volumescloud vol remove Permanently delete persistent volume(s)UNIKRAFT CLOUD SERVICE COMMANDScloud service create Create a servicecloud service get Retrieve the state of servicescloud service list List servicescloud service remove Delete servicesUNIKRAFT CLOUD AUTOSCALE COMMANDScloud scale add Add an autoscale configuration policycloud scale get Get an autoscale configuration or policycloud scale init Initialize autoscale configuration for a servicecloud scale remove Delete an autoscale configuration policycloud scale reset Reset autoscale configuration of a serviceUNIKRAFT CLOUD CERTIFICATE COMMANDScloud cert create Create a certificatecloud cert get Retrieve the status of a certificatecloud cert list List certificatescloud cert remove Remove a certificateUNIKRAFT CLOUD COMPOSE COMMANDScloud compose build Build a compose projectcloud compose create Create a deployment from a Compose project on Unikraft Cloudcloud compose down Stop and remove the services in a Unikraft Cloud Compose project deploymentcloud compose log View logs of services in a Unikraft Cloud Compose project deploymentcloud compose ls List service deployments at a given pathcloud compose ps List the active services of Unikraft Cloud Compose projectcloud compose push Push the images services to Unikraft Cloud from a Compose projectcloud compose start Start services in a Unikraft Cloud Compose project deploymentcloud compose stop Stop services in a Unikraft Cloud Compose project deploymentcloud compose up Deploy services in a compose project to Unikraft CloudMISCELLANEOUS COMMANDSlogin Provide authorization details for a remote serviceversion Show kraft version informationcompletion Generate the autocompletion script for the specified shellhelp Help about any commandFLAGS--buildkit-host string Path to the buildkit host--config-dir string Path to KraftKit config directory--containerd-addr string Address of containerd daemon socket--editor string Set the text editor to open when prompt to edit a file--events-pid-file string Events process ID used when running multiple unikernels--git-protocol string Preferred Git protocol to use (default "https")-h, --help help for kraft--http-unix-sock string When making HTTP(S) connections, pipe requests via this shared socket--log-level string Log level verbosity. Choice of: [panic, fatal, error, warn, info, debug, trace] (default "info")--log-timestamps Enable log timestamps--log-type string Log type. Choice of: [fancy, basic, json] (default "fancy")--manifests-dir string Path to Unikraft manifest cache--no-check-updates Do not check for updates--no-color Disable color output--no-emojis Do not use emojis in any console output--no-parallel Do not run internal tasks in parallel--no-prompt Do not prompt for user interaction--no-warn-sudo Do not warn on running via sudo--pager string System pager to pipe output to--plugins-dir string Path to KraftKit plugin directory--qemu string Path to QEMU executable--runtime-dir string Directory for placing runtime files (e.g. pidfiles)--sources-dir string Path to Unikraft component cache--with-manifest strings Paths to package or component manifests--with-mirror strings Paths to mirrors of Unikraft component artifacts
Once installed and running, learn more about:
Feel free to ask questions, report issues, and meet new people.