diff --git a/configs/cli.sidebar.json b/configs/cli.sidebar.json index 732d0969..e29f7689 100644 --- a/configs/cli.sidebar.json +++ b/configs/cli.sidebar.json @@ -89,6 +89,10 @@ "title": "`kraft pkg ls`", "path": "/docs/cli/reference/kraft/pkg/ls" }, + { + "title": "`kraft pkg info`", + "path": "/docs/cli/reference/kraft/pkg/info" + }, { "title": "`kraft pkg pull`", "path": "/docs/cli/reference/kraft/pkg/pull" @@ -136,6 +140,10 @@ { "title": "`kraft stop`", "path": "/docs/cli/reference/kraft/stop" + }, + { + "title": "`kraft start`", + "path": "/docs/cli/reference/kraft/start" } ] }, @@ -172,46 +180,46 @@ ] }, { - "title": "Kraft Cloud Commands", + "title": "Compose Commands", "sort": false, "open": true, "summarize": true, "routes": [ { - "title": "`kraft cloud deploy`", - "path": "/docs/cli/reference/kraft/cloud/deploy" + "title": "`kraft compose down`", + "path": "/docs/cli/reference/kraft/compose/down" }, { - "title": "`kraft cloud img ls`", - "path": "/docs/cli/reference/kraft/cloud/img/ls" + "title": "`kraft compose ls`", + "path": "/docs/cli/reference/kraft/compose/ls" }, { - "title": "`kraft cloud inst create`", - "path": "/docs/cli/reference/kraft/cloud/instance/create" + "title": "`kraft compose ps`", + "path": "/docs/cli/reference/kraft/compose/ps" }, { - "title": "`kraft cloud inst delete`", - "path": "/docs/cli/reference/kraft/cloud/instance/delete" - }, - { - "title": "`kraft cloud inst logs`", - "path": "/docs/cli/reference/kraft/cloud/instance/logs" - }, - { - "title": "`kraft cloud inst ls`", - "path": "/docs/cli/reference/kraft/cloud/instance/ls" - }, + "title": "`kraft compose up`", + "path": "/docs/cli/reference/kraft/compose/up" + } + ] + }, + { + "title": "Microlibrary Commands", + "sort": false, + "open": true, + "summarize": true, + "routes": [ { - "title": "`kraft cloud inst start`", - "path": "/docs/cli/reference/kraft/cloud/instance/start" + "title": "`kraft lib add`", + "path": "/docs/cli/reference/kraft/lib/add" }, { - "title": "`kraft cloud inst status`", - "path": "/docs/cli/reference/kraft/cloud/instance/status" + "title": "`kraft lib create`", + "path": "/docs/cli/reference/kraft/lib/create" }, { - "title": "`kraft cloud inst stop`", - "path": "/docs/cli/reference/kraft/cloud/instance/stop" + "title": "`kraft lib remove`", + "path": "/docs/cli/reference/kraft/lib/remove" } ] }, diff --git a/content/docs/cli/reference/kraft/build.mdx b/content/docs/cli/reference/kraft/build.mdx index 23e76a1d..45552e78 100644 --- a/content/docs/cli/reference/kraft/build.mdx +++ b/content/docs/cli/reference/kraft/build.mdx @@ -5,26 +5,28 @@ description: Configure and build Unikraft unikernels Build a Unikraft unikernel. -The default behaviour of `kraft build` is to build a project. -Given no arguments, you will be guided through interactive mode. +The default behaviour of `kraft build` is to build a project. Given no +arguments, you will be guided through interactive mode. -```console + +``` kraft build [FLAGS] [SUBCOMMAND|DIR] ``` ### Examples -```console +``` # Build the current project (cwd) $ kraft build # Build path to a Unikraft project $ kraft build path/to/app + ``` ## Options -```text +``` --all Build all targets -m, --arch string Filter the creation of the build by architecture of known targets --build-log string Use the specified file to save the output from the build @@ -40,10 +42,12 @@ $ kraft build path/to/app --no-fetch Do not run Unikraft's fetch step before building --no-update Do not update package index before running the build -p, --plat string Filter the creation of the build by platform of known targets + --print-stats Print build statistics --rootfs string Specify a path to use as root file system (can be volume or initramfs) -t, --target string Build a particular known target ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels + diff --git a/content/docs/cli/reference/kraft/clean.mdx b/content/docs/cli/reference/kraft/clean.mdx index 7bcaf5d9..7fe91ea5 100644 --- a/content/docs/cli/reference/kraft/clean.mdx +++ b/content/docs/cli/reference/kraft/clean.mdx @@ -5,23 +5,23 @@ description: Remove the build object files of a Unikraft project Remove the build object files of a Unikraft project -```console +``` kraft clean [DIR] ``` ### Examples -```console +``` # Clean the cwd build directory $ kraft clean -# clean a project at a path +# properclean a project at a path $ kraft clean --proper path/to/app ``` ## Options -```text +``` -m, --arch string Filter prepare based on a target's architecture -h, --help help for clean -K, --kraftfile string Set an alternative path of the Kraftfile @@ -32,5 +32,5 @@ $ kraft clean --proper path/to/app ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/cloud.mdx b/content/docs/cli/reference/kraft/cloud.mdx deleted file mode 100644 index bd821714..00000000 --- a/content/docs/cli/reference/kraft/cloud.mdx +++ /dev/null @@ -1,60 +0,0 @@ ---- -title: "kraft cloud" -description: KraftCloud ---- - -Manage resources on KraftCloud: The Millisecond Platform. - -Learn more & sign up for the beta at https://kraft.cloud - -Quickly switch between metros using the `--metro` flag or use the `KRAFTCLOUD_METRO` environmental variable. - -Set authentication by using `kraft login` or set `KRAFTCLOUD_TOKEN` environmental variable. - -```console -kraft cloud [FLAGS] [SUBCOMMAND|DIR] -``` - -### Examples - -```console -# List all images in your account -$ kraft cloud img ls - -# List all instances in Frankfurt -$ kraft cloud --metro fra0 instance ls - -# Create a new NGINX instance in Frankfurt and start it immediately -$ kraft cloud --metro fra0 instance create \ - --start \ - --port 80:443 \ - unikraft.io/$KRAFTCLOUD_USER/nginx:latest -- nginx -c /usr/local/nginx/conf/nginx.conf - -# Get the status of an instance based on its UUID and output as JSON -$ kraft cloud --metro fra0 instance status -o json UUID - -# Stop an instance based on its UUID -$ kraft cloud instance stop UUID - -# Start an instance based on its UUID -$ kraft cloud instance start UUID - -# Get logs of an instance based on its UUID -$ kraft cloud instance logs UUID - -# Delete an instance based on its UUID -$ kraft cloud instance rm UUID -``` - -## Options - -```text - -h, --help help for cloud - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels -* [kraft cloud deploy](/docs/cli/reference/kraft/cloud/deploy) - Deploy your application - diff --git a/content/docs/cli/reference/kraft/cloud/deploy.mdx b/content/docs/cli/reference/kraft/cloud/deploy.mdx deleted file mode 100644 index 2b6b8f71..00000000 --- a/content/docs/cli/reference/kraft/cloud/deploy.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "kraft cloud deploy" -description: Deploy your application ---- - -```console -kraft cloud deploy -``` - -## Options - -```text - -e, --env strings Environmental variables - -h, --help help for deploy - -K, --kraftfile string Set the Kraftfile to use - -M, --memory int Specify the amount of memory to allocate - -n, --name string Name of the deployment - -S, --no-start Do not start the instance after creation - -o, --output string Set output format (default "table") - -p, --port strings Specify the port mapping between external to internal - -R, --replicas int Number of replicas of the instance (default 1) - --strategy string When a package of the same name exists, use this strategy when applying targets. (default "prompt") - --timeout duration Set the timeout for remote procedure calls - -w, --workdir string Set an alternative working directory (default is cwd) -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud](kraft_cloud.md) - KraftCloud - diff --git a/content/docs/cli/reference/kraft/cloud/img.mdx b/content/docs/cli/reference/kraft/cloud/img.mdx deleted file mode 100644 index c009126b..00000000 --- a/content/docs/cli/reference/kraft/cloud/img.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "kraft cloud img" -description: Manage images on KraftCloud ---- - -```console -kraft cloud img -``` - -## Options - -```console - -h, --help help for img -``` - -## Options inherited from parent commands - -```console - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud](kraft_cloud.md) - KraftCloud -* [kraft cloud img ls](/docs/cli/reference/kraft/cloud/img/ls) - List all images at a metro for your account - diff --git a/content/docs/cli/reference/kraft/cloud/img/ls.mdx b/content/docs/cli/reference/kraft/cloud/img/ls.mdx deleted file mode 100644 index 93c3e735..00000000 --- a/content/docs/cli/reference/kraft/cloud/img/ls.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "kraft cloud img ls" -description: List all images at a metro for your account ---- - -List all images in your account. - - -```console -kraft cloud img ls -``` - -### Examples - -```console -# List all images in your account. -$ kraft cloud img ls -``` - -## Options - -```text - -h, --help help for ls - -o, --output string Set output format (default "table") -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud img](kraft_cloud_img.md) - Manage images on KraftCloud - diff --git a/content/docs/cli/reference/kraft/cloud/instance.mdx b/content/docs/cli/reference/kraft/cloud/instance.mdx deleted file mode 100644 index e1d6aa89..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "kraft cloud instance" -description: Manage KraftCloud instances ---- - -```console -kraft cloud instance SUBCOMMAND -``` - -## Options - -```text - -h, --help help for instance -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud](kraft_cloud.md) - KraftCloud -* [kraft cloud instance create](/docs/cli/reference/kraft/cloud/instance/create) - Create an instance -* [kraft cloud instance delete](/docs/cli/reference/kraft/cloud/instance/delete) - Delete an instance -* [kraft cloud instance logs](/docs/cli/reference/kraft/cloud/instance/logs) - Get console output of an instance -* [kraft cloud instance ls](/docs/cli/reference/kraft/cloud/instance/ls) - List instances -* [kraft cloud instance start](/docs/cli/reference/kraft/cloud/instance/start) - Start an instance -* [kraft cloud instance status](/docs/cli/reference/kraft/cloud/instance/status) - Retrieve the status of an instance -* [kraft cloud instance stop](/docs/cli/reference/kraft/cloud/instance/stop) - Stop an instance - diff --git a/content/docs/cli/reference/kraft/cloud/instance/create.mdx b/content/docs/cli/reference/kraft/cloud/instance/create.mdx deleted file mode 100644 index a380eb38..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/create.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: "kraft cloud instance create" -description: Create an instance ---- - -```console -kraft cloud instance create [FLAGS] IMAGE [-- ARGS] -``` - -### Examples - -```console -# Create a hello world instance -$ kraft cloud instance create -M 64 unikraft.org/helloworld:latest - -# Create a new NGINX instance in Frankfurt and start it immediately. Map the external -# port 443 to the internal port 80 which the application listens on. -$ kraft cloud --metro fra0 instance create \ - --start \ - --port 443:80 \ - unikraft.io/official/nginx:latest - -# This command is the same as above, however using the more elaborate port expression. -# This is because in fact we need need to accept TLS and HTTP connections and redirect -# port 80 to port 443. The above example exists only as a shortcut for what is written -# below: -$ kraft cloud --metro fra0 instance create \ - --start \ - --port 443:80/http+tls \ - --port 80:443/http+redirect \ - unikraft.io/official/nginx:latest -``` - -## Options - -```text - -e, --env strings Environmental variables - -h, --help help for create - -M, --memory int Specify the amount of memory to allocate - -n, --name string Specify the name of the package - -o, --output string Set output format (default "table") - -p, --port strings Specify the port mapping between external to internal - -R, --replicas int Number of replicas of the instance (default 1) - -S, --start Immediately start the instance after creation -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances diff --git a/content/docs/cli/reference/kraft/cloud/instance/delete.mdx b/content/docs/cli/reference/kraft/cloud/instance/delete.mdx deleted file mode 100644 index f242b0ea..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/delete.mdx +++ /dev/null @@ -1,36 +0,0 @@ ---- -title: "kraft cloud instance delete" -description: Delete an instance ---- - -Delete a KraftCloud instance. - -```console -kraft cloud instance delete UUID -``` - -### Examples - -```console -# Delete a KraftCloud instance -$ kraft cloud instance delete fd1684ea-7970-4994-92d6-61dcc7905f2b - -``` - -## Options - -```text - --all Stop all instances - -h, --help help for delete - -o, --output string Set output format (default "table") -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances diff --git a/content/docs/cli/reference/kraft/cloud/instance/logs.mdx b/content/docs/cli/reference/kraft/cloud/instance/logs.mdx deleted file mode 100644 index 1b61e486..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/logs.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "kraft cloud instance logs" -description: Get console output of an instance ---- - -```console -kraft cloud instance logs [UUID] -``` - -### Examples - -```console -# Get console output of a kraftcloud instance -$ kraft cloud inst logs 77d0316a-fbbe-488d-8618-5bf7a612477a -``` - -## Options - -```text - -h, --help help for logs - -n, --tail int Lines of recent logs to display (default -1) -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances diff --git a/content/docs/cli/reference/kraft/cloud/instance/ls.mdx b/content/docs/cli/reference/kraft/cloud/instance/ls.mdx deleted file mode 100644 index 1bc841d4..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/ls.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "kraft cloud instance ls" -description: List instances ---- - -```console -kraft cloud instance ls [FLAGS] -``` - -### Examples - -```console -# List all instances in your account. -$ kraft cloud instances list -``` - -## Options - -```text - -h, --help help for ls - -o, --output string Set output format (default "table") -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances - diff --git a/content/docs/cli/reference/kraft/cloud/instance/start.mdx b/content/docs/cli/reference/kraft/cloud/instance/start.mdx deleted file mode 100644 index 2f00ba32..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/start.mdx +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "kraft cloud instance start" -description: Start an instance ---- - -```console -kraft cloud instance start [FLAGS] [PACKAGE] -``` - -### Examples - -```console -# Start a KraftCloud instance -$ kraft cloud instance start 77d0316a-fbbe-488d-8618-5bf7a612477a -``` - -## Options - -```text - -h, --help help for start - -o, --output string Set output format (default "table") - -w, --wait_timeout_ms int Timeout to wait for the instance to start in milliseconds -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances - diff --git a/content/docs/cli/reference/kraft/cloud/instance/status.mdx b/content/docs/cli/reference/kraft/cloud/instance/status.mdx deleted file mode 100644 index 7bd5378d..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/status.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: "kraft cloud instance status" -description: Retrieve the status of an instance ---- - -```console -kraft cloud instance status [FLAGS] UUID -``` - -### Examples - -```console -# Retrieve information about a kraftcloud instance -$ kraft cloud instance status fd1684ea-7970-4994-92d6-61dcc7905f2b -``` - -## Options - -```text - -h, --help help for status - -o, --output string Set output format (default "table") -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances - diff --git a/content/docs/cli/reference/kraft/cloud/instance/stop.mdx b/content/docs/cli/reference/kraft/cloud/instance/stop.mdx deleted file mode 100644 index 5b8a82aa..00000000 --- a/content/docs/cli/reference/kraft/cloud/instance/stop.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "kraft cloud instance stop" -description: Stop an instance ---- - -```console -kraft cloud instance stop [FLAGS] [UUID] -``` - -### Examples - -```console -# Stop a KraftCloud instance -$ kraft cloud instance stop 77d0316a-fbbe-488d-8618-5bf7a612477a -``` - -## Options - -```text - --all Stop all instances - -h, --help help for stop - -o, --output string Set output format (default "table") - -w, --wait_timeout_ms int Timeout to wait for the instance to start in milliseconds -``` - -## Options inherited from parent commands - -```text - --metro string Set the KraftCloud metro. -``` - -## See Also - -* [kraft cloud instance](kraft_cloud_instance.md) - Manage KraftCloud instances - diff --git a/content/docs/cli/reference/kraft/compose/down.mdx b/content/docs/cli/reference/kraft/compose/down.mdx new file mode 100644 index 00000000..c4458408 --- /dev/null +++ b/content/docs/cli/reference/kraft/compose/down.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft compose down" +description: Stop and remove a compose project. +--- + +Stop and remove a compose project. + +``` +kraft compose down [FLAGS] +``` + +### Examples + +``` +# Stop and remove a compose project +$ kraft compose down + +``` + +## Options + +``` + -h, --help help for down +``` + +## Options inherited from parent commands + +``` + -f, --file string Set the Compose file. +``` + +## See Also + +* [`kraft compose`](/docs/cli/reference/kraft/compose): compose + diff --git a/content/docs/cli/reference/kraft/compose/index.mdx b/content/docs/cli/reference/kraft/compose/index.mdx new file mode 100644 index 00000000..fe933f11 --- /dev/null +++ b/content/docs/cli/reference/kraft/compose/index.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft compose" +description: compose +--- + +Build and run compose projects with Unikraft. + + +``` +kraft compose [FLAGS] [SUBCOMMAND|DIR] +``` + +### Examples + +``` +# Start a compose project +$ kraft compose up + +``` + +## Options + +``` + -f, --file string Set the Compose file. + -h, --help help for compose +``` + +## See Also + +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels +* [`kraft compose down`](/docs/cli/reference/kraft/compose/down): Stop and remove a compose project. +* [`kraft compose ls`](/docs/cli/reference/kraft/compose/ls): List compose projects. +* [`kraft compose ps`](/docs/cli/reference/kraft/compose/ps): List running services of current project +* [`kraft compose up`](/docs/cli/reference/kraft/compose/up): Run a compose project. + diff --git a/content/docs/cli/reference/kraft/compose/ls.mdx b/content/docs/cli/reference/kraft/compose/ls.mdx new file mode 100644 index 00000000..1bd52366 --- /dev/null +++ b/content/docs/cli/reference/kraft/compose/ls.mdx @@ -0,0 +1,37 @@ +--- +title: "kraft compose ls" +description: List compose projects. +--- + +List compose projects. + +``` +kraft compose ls [FLAGS] +``` + +### Examples + +``` +# List all compose projects +$ kraft compose ls + +``` + +## Options + +``` + -a, --all Show all projects (default shows just running) + -h, --help help for ls + -o, --output string Set output format (default "table") +``` + +## Options inherited from parent commands + +``` + -f, --file string Set the Compose file. +``` + +## See Also + +* [`kraft compose`](/docs/cli/reference/kraft/compose): compose + diff --git a/content/docs/cli/reference/kraft/compose/ps.mdx b/content/docs/cli/reference/kraft/compose/ps.mdx new file mode 100644 index 00000000..99172255 --- /dev/null +++ b/content/docs/cli/reference/kraft/compose/ps.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft compose ps" +description: List running services of current project +--- + +List running services of current project. + +``` +kraft compose ps [FLAGS] +``` + +### Examples + +``` +# List running services of current project +$ kraft compose ps + +``` + +## Options + +``` + -h, --help help for ps +``` + +## Options inherited from parent commands + +``` + -f, --file string Set the Compose file. +``` + +## See Also + +* [`kraft compose`](/docs/cli/reference/kraft/compose): compose + diff --git a/content/docs/cli/reference/kraft/compose/up.mdx b/content/docs/cli/reference/kraft/compose/up.mdx new file mode 100644 index 00000000..8ee943e0 --- /dev/null +++ b/content/docs/cli/reference/kraft/compose/up.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft compose up" +description: Run a compose project. +--- + +Run a compose project. + +``` +kraft compose up [FLAGS] +``` + +### Examples + +``` +# Run a compose project +$ kraft compose up + +``` + +## Options + +``` + -h, --help help for up +``` + +## Options inherited from parent commands + +``` + -f, --file string Set the Compose file. +``` + +## See Also + +* [`kraft compose`](/docs/cli/reference/kraft/compose): compose + diff --git a/content/docs/cli/reference/kraft/index.mdx b/content/docs/cli/reference/kraft/index.mdx index 489d15d9..a33ad4c2 100644 --- a/content/docs/cli/reference/kraft/index.mdx +++ b/content/docs/cli/reference/kraft/index.mdx @@ -3,38 +3,39 @@ title: "kraft" description: Build and use highly customized and ultra-lightweight unikernels --- -```text +``` . /^\ Build and use highly customized and ultra-lightweight unikernels. :[ ]: - | = | Version: No version provided + | = | Version: v0.7.7 /|/=\|\ Documentation: https://kraftkit.sh/ (_:| |:_) Issues & support: https://github.com/unikraft/kraftkit/issues v v Platform: https://kraft.cloud/ (Join the beta!) ' ' -``` -```console +``` +``` kraft [FLAGS] SUBCOMMAND ``` ## Options -```text +``` -h, --help help for kraft ``` ## See Also -* [kraft build](/docs/cli/reference/kraft/build) - Configure and build Unikraft unikernels -* [kraft clean](/docs/cli/reference/kraft/clean) - Remove the build object files of a Unikraft project -* [kraft login](/docs/cli/reference/kraft/login) - Provide authorization details for a remote service -* [kraft logs](/docs/cli/reference/kraft/logs) - Fetch the logs of a unikernel. -* [kraft menu](/docs/cli/reference/kraft/menu) - Open's Unikraft configuration editor TUI -* [kraft pkg](/docs/cli/reference/kraft/pkg) - Package and distribute Unikraft unikernels and their dependencies -* [kraft ps](/docs/cli/reference/kraft/ps) - List running unikernels -* [kraft rm](/docs/cli/reference/kraft/rm) - Remove one or more running unikernels -* [kraft run](/docs/cli/reference/kraft/run) - Run a unikernel -* [kraft stop](/docs/cli/reference/kraft/stop) - Stop one or more running unikernels -* [kraft version](/docs/cli/reference/kraft/version) - Show kraft version information +* [`kraft build`](/docs/cli/reference/kraft/build): Configure and build Unikraft unikernels +* [`kraft clean`](/docs/cli/reference/kraft/clean): Remove the build object files of a Unikraft project +* [`kraft login`](/docs/cli/reference/kraft/login): Provide authorization details for a remote service +* [`kraft logs`](/docs/cli/reference/kraft/logs): Fetch the logs of a unikernel. +* [`kraft menu`](/docs/cli/reference/kraft/menu): Open's Unikraft configuration editor TUI +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies +* [`kraft ps`](/docs/cli/reference/kraft/ps): List running unikernels +* [`kraft remove`](/docs/cli/reference/kraft/remove): Remove one or more running unikernels +* [`kraft run`](/docs/cli/reference/kraft/run): Run a unikernel +* [`kraft start`](/docs/cli/reference/kraft/start): Start one or more machines +* [`kraft stop`](/docs/cli/reference/kraft/stop): Stop one or more running unikernels +* [`kraft version`](/docs/cli/reference/kraft/version): Show kraft version information diff --git a/content/docs/cli/reference/kraft/lib/add.mdx b/content/docs/cli/reference/kraft/lib/add.mdx new file mode 100644 index 00000000..fc8129e5 --- /dev/null +++ b/content/docs/cli/reference/kraft/lib/add.mdx @@ -0,0 +1,43 @@ +--- +title: "kraft lib add" +description: Add unikraft library to the project directory +--- + +Pull a Unikraft component microlibrary from a remote location +and add to the project directory + + +``` +kraft lib add [FLAGS] [PACKAGE|DIR] +``` + +### Examples + +``` +# Add a local library to the project +$ kraft lib add path/to/library + +# Add a library from a source repository +$ kraft lib add github.com/unikraft/lib-nginx.git + +# Add from a manifest +$ kraft lib add nginx:staging + +# Add a library from a registry +$ kraft lib add unikraft.org/nginx:stable + +``` + +## Options + +``` + -h, --help help for add + -K, --kraftfile string Set an alternative path of the Kraftfile + --no-update Do not update package index before running the build + -w, --workdir string workdir to add the package to +``` + +## See Also + +* [`kraft lib`](/docs/cli/reference/kraft/lib): Manage and maintain Unikraft microlibraries + diff --git a/content/docs/cli/reference/kraft/lib/create.mdx b/content/docs/cli/reference/kraft/lib/create.mdx new file mode 100644 index 00000000..bd43c7ef --- /dev/null +++ b/content/docs/cli/reference/kraft/lib/create.mdx @@ -0,0 +1,48 @@ +--- +title: "kraft lib create" +description: Initialize a library from a template +--- + +Creates a library template + + +``` +kraft lib create [FLAGS] [NAME] +``` + +### Examples + +``` +# Create a library template +$ kraft lib create + +# Create a library template with a name +$ kraft lib create sample-project + +``` + +## Options + +``` + --author-email string Set the author email to the template + --author-name string Set the author name to the template + --copyright-holder string Set the copyright holder name to the template + --description string Set the description to the template + --git-init Init git through the creating library + -h, --help help for create + --initial-branch string Set the initial branch name to the template + --library-kname string Set the library kname to the template + --library-name string Set the library name to the template + --no-provide-c-main Do not provide C main to the template + --origin string Source code origin URL + --patch-dir provide patch directory to the template + --project-name string Set the project name to the template + --project-path string Where to create library + --update-refs Softly pack the component so that it is available via kraft list + -v, --version string Set the library version to the template +``` + +## See Also + +* [`kraft lib`](/docs/cli/reference/kraft/lib): Manage and maintain Unikraft microlibraries + diff --git a/content/docs/cli/reference/kraft/lib/index.mdx b/content/docs/cli/reference/kraft/lib/index.mdx new file mode 100644 index 00000000..640bb707 --- /dev/null +++ b/content/docs/cli/reference/kraft/lib/index.mdx @@ -0,0 +1,32 @@ +--- +title: "kraft lib" +description: Manage and maintain Unikraft microlibraries +--- + +Manage and maintain Unikraft microlibraries. + +``` +kraft lib SUBCOMMAND +``` + +### Examples + +``` +# Add a new microlibrary to your project. +$ kraft lib add + +``` + +## Options + +``` + -h, --help help for lib +``` + +## See Also + +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels +* [`kraft lib add`](/docs/cli/reference/kraft/lib/add): Add unikraft library to the project directory +* [`kraft lib create`](/docs/cli/reference/kraft/lib/create): Initialize a library from a template +* [`kraft lib remove`](/docs/cli/reference/kraft/lib/remove): Removes a library dependency from the project directory + diff --git a/content/docs/cli/reference/kraft/lib/remove.mdx b/content/docs/cli/reference/kraft/lib/remove.mdx new file mode 100644 index 00000000..ba8891c6 --- /dev/null +++ b/content/docs/cli/reference/kraft/lib/remove.mdx @@ -0,0 +1,32 @@ +--- +title: "kraft lib remove" +description: Removes a library dependency from the project directory +--- + +Remove a Unikraft library from the project directory. + + +``` +kraft lib remove [FLAGS] LIB +``` + +### Examples + +``` +# Remove a library from the project +$ kraft lib remove libfoo + +``` + +## Options + +``` + -h, --help help for remove + -K, --kraftfile string Set an alternative path of the Kraftfile + -w, --workdir string workdir to remove lib from +``` + +## See Also + +* [`kraft lib`](/docs/cli/reference/kraft/lib): Manage and maintain Unikraft microlibraries + diff --git a/content/docs/cli/reference/kraft/login.mdx b/content/docs/cli/reference/kraft/login.mdx index 36143b67..b5ec26fe 100644 --- a/content/docs/cli/reference/kraft/login.mdx +++ b/content/docs/cli/reference/kraft/login.mdx @@ -3,10 +3,21 @@ title: "kraft login" description: Provide authorization details for a remote service --- +Provide authorization details for a remote service. + + ``` kraft login [FLAGS] HOST ``` +### Examples + +``` +# Login to a remote service +$ kraft login https://github.com + +``` + ## Options ``` @@ -17,5 +28,5 @@ kraft login [FLAGS] HOST ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/logs.mdx b/content/docs/cli/reference/kraft/logs.mdx index a4df0e08..c9228a8d 100644 --- a/content/docs/cli/reference/kraft/logs.mdx +++ b/content/docs/cli/reference/kraft/logs.mdx @@ -3,19 +3,41 @@ title: "kraft logs" description: Fetch the logs of a unikernel. --- +Fetch the logs of a unikernel. + + ``` kraft logs [FLAGS] MACHINE ``` +### Examples + +``` +# Fetch the logs of a unikernel +$ kraft logs my-machine + +# Fetch the logs of a unikernel and follow the output +$ kraft logs --follow my-machine + +# Fetch the logs of a unikernel and prefix each line with the machine name +$ kraft logs --prefix-name + +# Fetch the logs of a unikernel and prefix each line with the given string +$ kraft logs --prefix "log: " + +``` + ## Options ``` - -f, --follow Follow log output - -h, --help help for logs - -p, --plat string Set the platform virtual machine monitor driver. Set to 'auto' to detect the guest's platform and 'host' to use the host platform. (default "auto") + -f, --follow Follow log output + -h, --help help for logs + -p, --plat string Set the platform virtual machine monitor driver. Set to 'auto' to detect the guest's platform and 'host' to use the host platform. (default "auto") + --prefix string Prefix each log line with the given string + --prefix-name Prefix each log line with the machine name ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/menu.mdx b/content/docs/cli/reference/kraft/menu.mdx index edfa9210..abae1a51 100644 --- a/content/docs/cli/reference/kraft/menu.mdx +++ b/content/docs/cli/reference/kraft/menu.mdx @@ -5,13 +5,13 @@ description: Open's Unikraft configuration editor TUI Open Unikraft's configuration editor TUI. -```console +``` kraft menu [FLAGS] [DIR] ``` ### Examples -```console +``` # Open configuration editor in the cwd project $ kraft menu @@ -21,19 +21,19 @@ $ kraft menu path/to/app ## Options -```text +``` -m, --arch string Filter the creation of the build by architecture of known targets + --force-pull Force pulling components before opening the menu -f, --frontend string Alternative frontend to use for the configuration editor (default "menuconfig") -h, --help help for menu -K, --kraftfile string Set an alternative path of the Kraftfile --no-cache Do not use the cache when pulling dependencies --no-configure Do not run Unikraft's configure step before building - --no-pull Do not pull the dependencies of the project -p, --plat string Filter the creation of the build by platform of known targets -t, --target string Build a particular known target ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/net.mdx b/content/docs/cli/reference/kraft/net.mdx deleted file mode 100644 index 637ce257..00000000 --- a/content/docs/cli/reference/kraft/net.mdx +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "kraft net" -description: Manage machine networks ---- - -```console -kraft net SUBCOMMAND -``` - -## Options - -```text - -d, --driver string Set the network driver. (default "bridge") - -h, --help help for net -``` - -## See Also - -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels -* [kraft net create](/docs/cli/reference/kraft/net/create) - Create a new machine network -* [kraft net down](/docs/cli/reference/kraft/net/down) - Bring a network offline -* [kraft net inspect](/docs/cli/reference/kraft/net/inspect) - Inspect a machine network -* [kraft net ls](/docs/cli/reference/kraft/net/ls) - List machine networks -* [kraft net rm](/docs/cli/reference/kraft/net/rm) - Remove a network -* [kraft net up](/docs/cli/reference/kraft/net/up) - Bring a network online - diff --git a/content/docs/cli/reference/kraft/net/create.mdx b/content/docs/cli/reference/kraft/net/create.mdx index 59c48f2a..0dafa264 100644 --- a/content/docs/cli/reference/kraft/net/create.mdx +++ b/content/docs/cli/reference/kraft/net/create.mdx @@ -3,24 +3,34 @@ title: "kraft net create" description: Create a new machine network --- -```console +Create a new machine network. + +``` kraft net create [FLAGS] NETWORK ``` +### Examples + +``` +# Create a new machine network +$ kraft network create my-network --network 133.37.0.1/12 + +``` + ## Options -```text +``` -h, --help help for create -n, --network string Set the gateway IP address and the subnet of the network in CIDR format. ``` ## Options inherited from parent commands -```text +``` -d, --driver string Set the network driver. (default "bridge") ``` ## See Also -* [kraft net](kraft_net.md) - Manage machine networks +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks diff --git a/content/docs/cli/reference/kraft/net/down.mdx b/content/docs/cli/reference/kraft/net/down.mdx index ffb2ee4d..f9abaa18 100644 --- a/content/docs/cli/reference/kraft/net/down.mdx +++ b/content/docs/cli/reference/kraft/net/down.mdx @@ -3,23 +3,33 @@ title: "kraft net down" description: Bring a network offline --- -```console +Bring a network offline. + +``` kraft net down ``` +### Examples + +``` +# Bring a network offline +$ kraft network down my-network + +``` + ## Options -```text +``` -h, --help help for down ``` ## Options inherited from parent commands -```text +``` -d, --driver string Set the network driver. (default "bridge") ``` ## See Also -* [kraft net](kraft_net.md) - Manage machine networks +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks diff --git a/content/docs/cli/reference/kraft/net/index.mdx b/content/docs/cli/reference/kraft/net/index.mdx new file mode 100644 index 00000000..ddd62512 --- /dev/null +++ b/content/docs/cli/reference/kraft/net/index.mdx @@ -0,0 +1,36 @@ +--- +title: "kraft net" +description: Manage machine networks +--- + +Manage machine networks. + +``` +kraft net SUBCOMMAND +``` + +### Examples + +``` +# Create a new network +$ kraft network create my-network + +``` + +## Options + +``` + -d, --driver string Set the network driver. (default "bridge") + -h, --help help for net +``` + +## See Also + +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels +* [`kraft net create`](/docs/cli/reference/kraft/net/create): Create a new machine network +* [`kraft net down`](/docs/cli/reference/kraft/net/down): Bring a network offline +* [`kraft net inspect`](/docs/cli/reference/kraft/net/inspect): Inspect a machine network +* [`kraft net list`](/docs/cli/reference/kraft/net/list): List machine networks +* [`kraft net remove`](/docs/cli/reference/kraft/net/remove): Remove a network +* [`kraft net up`](/docs/cli/reference/kraft/net/up): Bring a network online + diff --git a/content/docs/cli/reference/kraft/net/inspect.mdx b/content/docs/cli/reference/kraft/net/inspect.mdx index 9cab043a..b5320abf 100644 --- a/content/docs/cli/reference/kraft/net/inspect.mdx +++ b/content/docs/cli/reference/kraft/net/inspect.mdx @@ -3,23 +3,33 @@ title: "kraft net inspect" description: Inspect a machine network --- -```console +Inspect a machine network. + +``` kraft net inspect NETWORK ``` +### Examples + +``` +# Inspect a machine network +$ kraft network inspect my-network + +``` + ## Options -```text +``` -h, --help help for inspect ``` ## Options inherited from parent commands -```text +``` -d, --driver string Set the network driver. (default "bridge") ``` ## See Also -* [kraft net](kraft_net.md) - Manage machine networks +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks diff --git a/content/docs/cli/reference/kraft/net/list.mdx b/content/docs/cli/reference/kraft/net/list.mdx new file mode 100644 index 00000000..b23b1310 --- /dev/null +++ b/content/docs/cli/reference/kraft/net/list.mdx @@ -0,0 +1,44 @@ +--- +title: "kraft net list" +description: List machine networks +--- + +List machine networks. + + +``` +kraft net list [FLAGS] +``` + +### Examples + +``` +# List all machine networks +$ kraft network list + +# List all machine networks in JSON format +$ kraft network list -o json + +# List all machine networks with all information +$ kraft network list -l + +``` + +## Options + +``` + -h, --help help for list + -l, --long Show more information + -o, --output string Set output format. Options: table,yaml,json,full (default "table") +``` + +## Options inherited from parent commands + +``` + -d, --driver string Set the network driver. (default "bridge") +``` + +## See Also + +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks + diff --git a/content/docs/cli/reference/kraft/net/ls.mdx b/content/docs/cli/reference/kraft/net/ls.mdx deleted file mode 100644 index 3255c16b..00000000 --- a/content/docs/cli/reference/kraft/net/ls.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "kraft net ls" -description: List machine networks ---- - -```console -kraft net ls [FLAGS] -``` - -## Options - -```text - -h, --help help for ls - -l, --long Show more information - -o, --output string Set output format (default "table") -``` - -## Options inherited from parent commands - -```text - -d, --driver string Set the network driver. (default "bridge") -``` - -## See Also - -* [kraft net](kraft_net.md) - Manage machine networks - diff --git a/content/docs/cli/reference/kraft/net/remove.mdx b/content/docs/cli/reference/kraft/net/remove.mdx new file mode 100644 index 00000000..c47518fa --- /dev/null +++ b/content/docs/cli/reference/kraft/net/remove.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft net remove" +description: Remove a network +--- + +Remove a network. + +``` +kraft net remove +``` + +### Examples + +``` +# Remove a network +$ kraft network remove my-network + +``` + +## Options + +``` + -h, --help help for remove +``` + +## Options inherited from parent commands + +``` + -d, --driver string Set the network driver. (default "bridge") +``` + +## See Also + +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks + diff --git a/content/docs/cli/reference/kraft/net/rm.mdx b/content/docs/cli/reference/kraft/net/rm.mdx deleted file mode 100644 index 66b4f056..00000000 --- a/content/docs/cli/reference/kraft/net/rm.mdx +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "kraft net rm" -description: Remove a network ---- - -```console -kraft net rm -``` - -## Options - -```text - -h, --help help for rm -``` - -## Options inherited from parent commands - -```text - -d, --driver string Set the network driver. (default "bridge") -``` - -## See Also - -* [kraft net](kraft_net.md) - Manage machine networks - diff --git a/content/docs/cli/reference/kraft/net/up.mdx b/content/docs/cli/reference/kraft/net/up.mdx index 8ad5a38e..a405abc5 100644 --- a/content/docs/cli/reference/kraft/net/up.mdx +++ b/content/docs/cli/reference/kraft/net/up.mdx @@ -3,23 +3,33 @@ title: "kraft net up" description: Bring a network online --- -```console +Bring a network online. + +``` kraft net up ``` +### Examples + +``` +# Bring a network online +$ kraft network up my-network + +``` + ## Options -```text +``` -h, --help help for up ``` ## Options inherited from parent commands -```text +``` -d, --driver string Set the network driver. (default "bridge") ``` ## See Also -* [kraft net](kraft_net.md) - Manage machine networks +* [`kraft net`](/docs/cli/reference/kraft/net): Manage machine networks diff --git a/content/docs/cli/reference/kraft/pkg.mdx b/content/docs/cli/reference/kraft/pkg/index.mdx similarity index 59% rename from content/docs/cli/reference/kraft/pkg.mdx rename to content/docs/cli/reference/kraft/pkg/index.mdx index cfe00418..9eb8fea9 100644 --- a/content/docs/cli/reference/kraft/pkg.mdx +++ b/content/docs/cli/reference/kraft/pkg/index.mdx @@ -5,26 +5,30 @@ description: Package and distribute Unikraft unikernels and their dependencies Package and distribute Unikraft unikernels and their dependencies. -With `kraft pkg` you are able to turn output artifacts from `kraft build` into a distributable archive ready for deployment. -At the same time, `kraft pkg` allows you to manage these archives: pulling, pushing, or adding them to a project. +With `kraft pkg` you are able to turn output artifacts from `kraft build` +into a distributable archive ready for deployment. At the same time, +`kraft pkg` allows you to manage these archives: pulling, pushing, or +adding them to a project. -The default behaviour of `kraft pkg` is to package a project. -Given no arguments, you will be guided through interactive mode. +The default behaviour of `kraft pkg` is to package a project. Given no +arguments, you will be guided through interactive mode. -```console + +``` kraft pkg [FLAGS] [SUBCOMMAND|DIR] ``` ### Examples -```console +``` # Package a project as an OCI archive and embed the target's KConfig. -$ kraft pkg --as oci --name unikraft.org/nginx:latest +$ kraft pkg --as oci --name unikraft.org/nginx:latest + ``` ## Options -```text +``` -m, --arch string Filter the creation of the package by architecture of known targets -a, --args strings Pass arguments that will be part of the running kernel's command line -M, --as string Force the packaging despite possible conflicts (default "oci") @@ -35,23 +39,25 @@ $ kraft pkg --as oci --name unikraft.org/nginx:latest -K, --kraftfile string Set an alternative path of the Kraftfile -n, --name string Specify the name of the package --no-kconfig Do not include target .config as metadata + --no-pull Do not pull package dependencies before packaging -o, --output string Save the package at the following output -p, --plat string Filter the creation of the package by platform of known targets -P, --push Push the package on if successfully packaged --rootfs string Specify a path to use as root file system (can be volume or initramfs) - --strategy string When a package of the same name exists, use this strategy when applying targets. (default "prompt") + --strategy string When a package of the same name exists, use this strategy when applying targets. (default "overwrite") -t, --target string Package a particular known target -w, --workdir string Set an alternative working directory (default is cwd) ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels -* [kraft pkg ls](/docs/cli/reference/kraft/pkg/ls) - List installed Unikraft component packages -* [kraft pkg pull](/docs/cli/reference/kraft/pkg/pull) - Pull a Unikraft unikernel and/or its dependencies -* [kraft pkg push](/docs/cli/reference/kraft/pkg/push) - Push a Unikraft unikernel package to registry -* [kraft pkg rm](/docs/cli/reference/kraft/pkg/rm) - Removes selected local packages -* [kraft pkg source](/docs/cli/reference/kraft/pkg/source) - Add Unikraft component manifests -* [kraft pkg unsource](/docs/cli/reference/kraft/pkg/unsource) - Remove Unikraft component manifests -* [kraft pkg update](/docs/cli/reference/kraft/pkg/update) - Retrieve new lists of Unikraft components, libraries and packages +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels +* [`kraft pkg info`](/docs/cli/reference/kraft/pkg/info): Show information about a package +* [`kraft pkg list`](/docs/cli/reference/kraft/pkg/list): List installed Unikraft component packages +* [`kraft pkg pull`](/docs/cli/reference/kraft/pkg/pull): Pull a Unikraft unikernel and/or its dependencies +* [`kraft pkg push`](/docs/cli/reference/kraft/pkg/push): Push a Unikraft unikernel package to registry +* [`kraft pkg remove`](/docs/cli/reference/kraft/pkg/remove): Removes selected local packages +* [`kraft pkg source`](/docs/cli/reference/kraft/pkg/source): Add Unikraft component manifests +* [`kraft pkg unsource`](/docs/cli/reference/kraft/pkg/unsource): Remove Unikraft component manifests +* [`kraft pkg update`](/docs/cli/reference/kraft/pkg/update): Retrieve new lists of Unikraft components, libraries and packages diff --git a/content/docs/cli/reference/kraft/pkg/info.mdx b/content/docs/cli/reference/kraft/pkg/info.mdx new file mode 100644 index 00000000..8a7c3a3b --- /dev/null +++ b/content/docs/cli/reference/kraft/pkg/info.mdx @@ -0,0 +1,38 @@ +--- +title: "kraft pkg info" +description: Show information about a package +--- + +Shows a Unikraft package like library, core, etc. + + +``` +kraft pkg info [FLAGS] [PACKAGE|DIR] +``` + +### Examples + +``` +# Shows details for the library nginx +$ kraft pkg info nginx + +``` + +## Options + +``` + -h, --help help for info + -o, --output string Set output format. Options: table,yaml,json,full (default "table") + -u, --update Get latest information about components before listing results +``` + +## Options inherited from parent commands + +``` + -K, --kraftfile string Set an alternative path of the Kraftfile +``` + +## See Also + +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/pkg/ls.mdx b/content/docs/cli/reference/kraft/pkg/list.mdx similarity index 68% rename from content/docs/cli/reference/kraft/pkg/ls.mdx rename to content/docs/cli/reference/kraft/pkg/list.mdx index 43faf1ac..58c2ecab 100644 --- a/content/docs/cli/reference/kraft/pkg/ls.mdx +++ b/content/docs/cli/reference/kraft/pkg/list.mdx @@ -1,34 +1,40 @@ --- -title: "kraft pkg ls" +title: "kraft pkg list" description: List installed Unikraft component packages --- List installed Unikraft component packages. -```console -kraft pkg ls [FLAGS] [DIR] + +``` +kraft pkg list [FLAGS] [DIR] ``` ### Examples -```console -$ kraft pkg ls +``` +# List packages +$ kraft pkg list + +# List all packages +$ kraft pkg list --all + ``` ## Options -```text +``` --all Show everything --apps Show applications --arch string Set a specific arhitecture to list for -M, --archs Show architectures -C, --core Show Unikraft core versions - -h, --help help for ls + -h, --help help for list -K, --kraftfile string Set an alternative path of the Kraftfile -L, --libs Show libraries -l, --limit int Set the maximum number of results (default 50) --no-limit Do not limit the number of items to print - -o, --output string Set output format (default "table") + -o, --output string Set output format. Options: table,yaml,json,full (default "table") --plat string Set a specific platform to list for -P, --plats Show platforms -u, --update Get latest information about components before listing results @@ -36,5 +42,5 @@ $ kraft pkg ls ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies diff --git a/content/docs/cli/reference/kraft/pkg/pull.mdx b/content/docs/cli/reference/kraft/pkg/pull.mdx index e03bef62..b260cb25 100644 --- a/content/docs/cli/reference/kraft/pkg/pull.mdx +++ b/content/docs/cli/reference/kraft/pkg/pull.mdx @@ -5,13 +5,14 @@ description: Pull a Unikraft unikernel and/or its dependencies Pull a Unikraft unikernel, component microlibrary from a remote location -```console + +``` kraft pkg pull [FLAGS] [PACKAGE|DIR] ``` ### Examples -```console +``` # Pull the dependencies for a project in the current working directory $ kraft pkg pull @@ -26,26 +27,26 @@ $ kraft pkg pull nginx:1.21.6 # Pull from a registry $ kraft pkg pull unikraft.org/nginx:1.21.6 + ``` ## Options -```text +``` -A, --all Pull all versions -m, --arch string Specify the desired architecture - -M, --as string Force the handler type (Omitting it will attempt auto-detect) (default "auto") - -Z, --force-cache Force using cache and pull directly from source + -f, --as string Set the package format (default "auto") -h, --help help for pull -k, --kconfig strings Request a package with specific KConfig options. -K, --kraftfile string Set an alternative path of the Kraftfile -C, --no-checksum Do not verify package checksum (if available) - -D, --no-deps Do not pull dependencies + -o, --output string Save the package contents to the provided directory -p, --plat string Specify the desired platform - -d, --with-deps Pull dependencies + -u, --update Perform an update which gathers remote sources -w, --workdir string Set a path to working directory to pull components to ``` ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies diff --git a/content/docs/cli/reference/kraft/pkg/push.mdx b/content/docs/cli/reference/kraft/pkg/push.mdx index 257a9da8..7d2ffe58 100644 --- a/content/docs/cli/reference/kraft/pkg/push.mdx +++ b/content/docs/cli/reference/kraft/pkg/push.mdx @@ -5,13 +5,14 @@ description: Push a Unikraft unikernel package to registry Push a Unikraft unikernel, component microlibrary to a remote location -```console + +``` kraft pkg push [FLAGS] [PACKAGE] ``` ### Examples -```console +``` # Push the image for a project in the current directory $ kraft pkg push @@ -20,11 +21,12 @@ $ kraft pkg push /path/to/app # Push the image with a given name $ kraft pkg push unikraft.org/helloworld:latest + ``` ## Options -```text +``` -M, --as string Force the packaging despite possible conflicts (default "auto") -h, --help help for push -K, --kraftfile string Set an alternative path of the Kraftfile @@ -32,4 +34,5 @@ $ kraft pkg push unikraft.org/helloworld:latest ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/pkg/rm.mdx b/content/docs/cli/reference/kraft/pkg/remove.mdx similarity index 59% rename from content/docs/cli/reference/kraft/pkg/rm.mdx rename to content/docs/cli/reference/kraft/pkg/remove.mdx index 73a6b726..34e3f37f 100644 --- a/content/docs/cli/reference/kraft/pkg/rm.mdx +++ b/content/docs/cli/reference/kraft/pkg/remove.mdx @@ -1,37 +1,41 @@ --- -title: "kraft pkg rm" +title: "kraft pkg remove" description: Removes selected local packages --- -```console -kraft pkg rm [FLAGS] [PACKAGE] +Remove a Unikraft component. + +``` +kraft pkg remove [FLAGS] [PACKAGE] ``` ### Examples -```console +``` # Remove all packages -kraft pkg rm --all +kraft pkg remove --all # Remove only select OCI index packages -kraft pkg rm --format=oci unikraft.org/nginx:latest +kraft pkg remove --format=oci unikraft.org/nginx:latest + ``` ## Options -```text +``` -a, --all Prunes all the packages available on the host machine -f, --format string Set the package format. (default "any") - -h, --help help for rm + -h, --help help for remove -n, --name string Specify the package name that has to be pruned ``` ## Options inherited from parent commands -```text +``` -K, --kraftfile string Set an alternative path of the Kraftfile ``` ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/pkg/source.mdx b/content/docs/cli/reference/kraft/pkg/source.mdx index 4119130c..ee7c986d 100644 --- a/content/docs/cli/reference/kraft/pkg/source.mdx +++ b/content/docs/cli/reference/kraft/pkg/source.mdx @@ -3,13 +3,16 @@ title: "kraft pkg source" description: Add Unikraft component manifests --- -```console +Add a remote location for discovering one-or-many Unikraft components. + + +``` kraft pkg source [FLAGS] [SOURCE] ``` ### Examples -```console +``` # Add a single component as a Git repository $ kraft pkg source https://github.com/unikraft/unikraft.git @@ -18,21 +21,23 @@ $ kraft pkg source https://manifests.kraftkit.sh/index.yaml # Add a Unikraft-compatible OCI compatible registry $ kraft pkg source unikraft.org + ``` ## Options -```text +``` -F, --force Do not run a compatibility test before sourcing. -h, --help help for source ``` ## Options inherited from parent commands -```text +``` -K, --kraftfile string Set an alternative path of the Kraftfile ``` ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/pkg/unsource.mdx b/content/docs/cli/reference/kraft/pkg/unsource.mdx index 886b70bf..4d77cb14 100644 --- a/content/docs/cli/reference/kraft/pkg/unsource.mdx +++ b/content/docs/cli/reference/kraft/pkg/unsource.mdx @@ -3,13 +3,16 @@ title: "kraft pkg unsource" description: Remove Unikraft component manifests --- -```console +Remove a remote location for discovering one-or-many Unikraft components. + + +``` kraft pkg unsource [FLAGS] [SOURCE] ``` ### Examples -```console +``` # Remove a single component as a Git repository or manifest $ kraft pkg unsource https://github.com/unikraft/unikraft.git $ kraft pkg unsource https://manifests.kraftkit.sh/index.yaml @@ -18,16 +21,17 @@ $ kraft pkg unsource https://manifests.kraftkit.sh/index.yaml ## Options -```text +``` -h, --help help for unsource ``` ## Options inherited from parent commands -```text +``` -K, --kraftfile string Set an alternative path of the Kraftfile ``` ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/pkg/update.mdx b/content/docs/cli/reference/kraft/pkg/update.mdx index df1bb78a..23fe7cf1 100644 --- a/content/docs/cli/reference/kraft/pkg/update.mdx +++ b/content/docs/cli/reference/kraft/pkg/update.mdx @@ -5,29 +5,33 @@ description: Retrieve new lists of Unikraft components, libraries and packages Retrieve new lists of Unikraft components, libraries and packages. -```console + +``` kraft pkg update [FLAGS] ``` ### Examples -```console +``` +# Update the local index of known locations for remote Unikraft components $ kraft pkg update + ``` ## Options -```text +``` -h, --help help for update - -m, --manager string Force the handler type (default "manifest") + -m, --manager string Force the handler type (default "all") ``` ## Options inherited from parent commands -```text +``` -K, --kraftfile string Set an alternative path of the Kraftfile ``` ## See Also -* [kraft pkg](kraft_pkg.md) - Package and distribute Unikraft unikernels and their dependencies +* [`kraft pkg`](/docs/cli/reference/kraft/pkg): Package and distribute Unikraft unikernels and their dependencies + diff --git a/content/docs/cli/reference/kraft/ps.mdx b/content/docs/cli/reference/kraft/ps.mdx index 768a43a2..f31091d4 100644 --- a/content/docs/cli/reference/kraft/ps.mdx +++ b/content/docs/cli/reference/kraft/ps.mdx @@ -9,6 +9,20 @@ List running unikernels kraft ps [FLAGS] ``` +### Examples + +``` +# List all running unikernels +$ kraft ps + +# List all unikernels +$ kraft ps --all + +# List all running unikernels with more information +$ kraft ps --long + +``` + ## Options ``` @@ -16,12 +30,12 @@ kraft ps [FLAGS] -m, --arch string Filter the list by architecture -h, --help help for ps -l, --long Show more information - -o, --output string Set output format (default "table") + -o, --output string Set output format. Options: table,yaml,json,full (default "table") -p, --plat string Set the platform virtual machine monitor driver. (default "all") -q, --quiet Only display machine IDs ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/rm.mdx b/content/docs/cli/reference/kraft/remove.mdx similarity index 55% rename from content/docs/cli/reference/kraft/rm.mdx rename to content/docs/cli/reference/kraft/remove.mdx index d547c88e..affcdb34 100644 --- a/content/docs/cli/reference/kraft/rm.mdx +++ b/content/docs/cli/reference/kraft/remove.mdx @@ -1,23 +1,32 @@ --- -title: "kraft rm" +title: "kraft remove" description: Remove one or more running unikernels --- Remove one or more running unikernels + +``` +kraft remove [FLAGS] MACHINE [MACHINE [...]] +``` + +### Examples + ``` -kraft rm [FLAGS] MACHINE [MACHINE [...]] +# Remove a running unikernel +$ kraft rm my-machine + ``` ## Options ``` --all Remove all machines - -h, --help help for rm + -h, --help help for remove -p, --plat string Set the platform virtual machine monitor driver. Set to 'auto' to detect the guest's platform and 'host' to use the host platform. (default "auto") ``` ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/run.mdx b/content/docs/cli/reference/kraft/run.mdx index a6e58861..520b9769 100644 --- a/content/docs/cli/reference/kraft/run.mdx +++ b/content/docs/cli/reference/kraft/run.mdx @@ -5,13 +5,14 @@ description: Run a unikernel Run a unikernel virtual machine -```console + +``` kraft run [FLAGS] PROJECT|PACKAGE|BINARY -- [APP ARGS] ``` ### Examples -```console +``` Run a built target in the current working directory project: $ kraft run @@ -30,8 +31,8 @@ $ kraft run --arch x86_64 --plat qemu --memory 1Gi path/to/kernel-x86_64-qemu Run an OCI-compatible unikernel, mapping port 8080 on the host to port 80 in the unikernel: $ kraft run -p 8080:80 unikraft.org/nginx:latest -Attach the unikernel to an existing network kraft0 backed by the bridge driver: -$ kraft run --network bridge:kraft0 +Attach the unikernel to an existing network kraft0: +$ kraft run --network kraft0 Run a Linux userspace binary in POSIX-/binary-compatibility mode: $ kraft run a.out @@ -50,11 +51,12 @@ $ kraft run --rootfs ./initramfs.cpio --volume ./path/to/dir:/dir Customize the default content directory of the official Unikraft NGINX OCI-compatible unikernel and map port 8080 to localhost: $ kraft run -v ./path/to/html:/nginx/html -p 8080:80 unikraft.org/nginx:latest + ``` ## Options -```text +``` -m, --arch string Set the architecture --as string Force a specific runner -d, --detach Run unikernel in background @@ -66,9 +68,12 @@ $ kraft run -v ./path/to/html:/nginx/html -p 8080:80 unikraft.org/nginx:latest --mac string Assign the provided MAC address -M, --memory string Assign memory to the unikernel (K/Ki, M/Mi, G/Gi) (default "64Mi") -n, --name string Name of the instance - --network string Attach instance to the provided network in the format :, e.g. bridge:kraft0 + --network strings Attach instance to the provided network, in the format [:ip[/mask][:gw[:dns0[:dns1[:hostname[:domain]]]]]], e.g. kraft0:172.100.0.2 + --no-start Do not start the machine --plat string Set the platform virtual machine monitor driver. (default "auto") -p, --port stringArray Publish a machine's port(s) to the host + --prefix string Prefix each log line with the given string + --prefix-name Prefix each log line with the machine name --rm Automatically remove the unikernel when it shutsdown --rootfs string Specify a path to use as root file system (can be volume or initramfs) --symbolic Use the debuggable (symbolic) unikernel @@ -78,4 +83,5 @@ $ kraft run -v ./path/to/html:/nginx/html -p 8080:80 unikraft.org/nginx:latest ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels + diff --git a/content/docs/cli/reference/kraft/start.mdx b/content/docs/cli/reference/kraft/start.mdx new file mode 100644 index 00000000..ab889c04 --- /dev/null +++ b/content/docs/cli/reference/kraft/start.mdx @@ -0,0 +1,35 @@ +--- +title: "kraft start" +description: Start one or more machines +--- + +Start one or more machines + +``` +kraft start [FLAGS] MACHINE [MACHINE [...]] +``` + +### Examples + +``` +# Start a machine +$ kraft start my-machine + +``` + +## Options + +``` + --all Start all machines + -d, --detach Run in background + -h, --help help for start + -p, --plat string Set the platform virtual machine monitor driver. Set to 'auto' to detect the guest's platform and 'host' to use the host platform. (default "auto") + --prefix string Prefix each log line with the given string + --prefix-name Prefix each log line with the machine name + --rm Automatically remove the unikernel when it shutsdown +``` + +## See Also + +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels + diff --git a/content/docs/cli/reference/kraft/stop.mdx b/content/docs/cli/reference/kraft/stop.mdx index 2eac31ee..30e612e1 100644 --- a/content/docs/cli/reference/kraft/stop.mdx +++ b/content/docs/cli/reference/kraft/stop.mdx @@ -5,10 +5,19 @@ description: Stop one or more running unikernels Stop one or more running unikernels + ``` kraft stop [FLAGS] MACHINE [MACHINE [...]] ``` +### Examples + +``` +# Stop a running unikernel +$ kraft stop my-machine + +``` + ## Options ``` @@ -19,5 +28,5 @@ kraft stop [FLAGS] MACHINE [MACHINE [...]] ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels diff --git a/content/docs/cli/reference/kraft/version.mdx b/content/docs/cli/reference/kraft/version.mdx index 7fa764ad..3098833a 100644 --- a/content/docs/cli/reference/kraft/version.mdx +++ b/content/docs/cli/reference/kraft/version.mdx @@ -3,10 +3,20 @@ title: "kraft version" description: Show kraft version information --- +Show kraft version information. + ``` kraft version ``` +### Examples + +``` +# Show kraft version information +$ kraft version + +``` + ## Options ``` @@ -15,5 +25,5 @@ kraft version ## See Also -* [kraft](kraft.md) - Build and use highly customized and ultra-lightweight unikernels +* [`kraft`](/docs/cli/reference/kraft): Build and use highly customized and ultra-lightweight unikernels