Skip to content

Commit

Permalink
chore: Update kraft CLI commands
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung committed Jan 29, 2025
1 parent 8e5e243 commit 3f1ad7e
Show file tree
Hide file tree
Showing 85 changed files with 3,431 additions and 131 deletions.
348 changes: 326 additions & 22 deletions configs/cli.sidebar.json

Large diffs are not rendered by default.

197 changes: 145 additions & 52 deletions content/docs/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,72 +54,165 @@ kraft -h
.
/^\ Build and use highly customized and ultra-lightweight unikernels.
:[ ]:
| = |
/|/=\|\ Documentation: https://kraftkit.sh/
| = | Version: v0.10.1
/|/=\|\ Documentation: https://unikraft.org/docs/cli
(_:| |:_) Issues & support: https://github.com/unikraft/kraftkit/issues
v v
v v Platform: https://unikraft.cloud
' '
USAGE
kraft [SUBCOMMAND] [FLAGS]
kraft [FLAGS] SUBCOMMAND
BUILD COMMANDS
build Configure and build Unikraft unikernels
clean Remove the build object files of a Unikraft project
fetch Fetch a Unikraft unikernel's dependencies
menu Open's Unikraft configuration editor TUI
prepare Prepare a Unikraft unikernel
properclean Completely remove the build artifacts of a Unikraft project
build Configure and build Unikraft unikernels
clean Remove the build object files of a Unikraft project
menu Open's Unikraft configuration editor TUI
PROJECT LIBRARY COMMANDS
lib add Add unikraft library to the project directory
lib create Initialize a library from a template
lib remove Removes a library dependency from the project directory
PACKAGING COMMANDS
pkg Package and distribute Unikraft unikernels and their dependencies
pkg ls List installed Unikraft component packages
pkg pull Pull a Unikraft unikernel and/or its dependencies
pkg push Push a Unikraft unikernel package to registry
pkg source Add Unikraft component manifests
pkg unsource Remove Unikraft component manifests
pkg update Retrieve new lists of Unikraft components, libraries and packages
RUNTIME COMMANDS
ps List running unikernels
rm Remove one or more running unikernels
run Run a unikernel
stop Stop one or more running unikernels
pkg Package and distribute Unikraft unikernels and their dependencies
pkg info Show information about a package
pkg list List installed Unikraft component packages
pkg pull Pull a Unikraft unikernel and/or its dependencies
pkg push Push a Unikraft unikernel package to registry
pkg remove Removes selected local packages
pkg source Add Unikraft component manifests
pkg unsource Remove Unikraft component manifests
pkg update Retrieve new lists of Unikraft components, libraries and packages
LOCAL RUNTIME COMMANDS
logs Fetch the logs of a unikernel
pause Pause one or more running unikernels
ps List running unikernels
remove Remove one or more running unikernels
run Run a unikernel
start Start one or more machines
stop Stop one or more running unikernels
LOCAL NETWORKING COMMANDS
net create Create a new machine network
net down Bring a network offline
net inspect Inspect a machine network
net ls List machine networks
net rm Remove a network
net up Bring a network online
net create Create a new machine network
net down Bring a network offline
net inspect Inspect a machine network
net list List machine networks
net remove Remove a network
net up Bring a network online
LOCAL VOLUME COMMANDS
vol create Create a machine volume
vol inspect Inspect a machine volume
vol ls List machine volumes
vol remove Remove a volume
COMPOSE COMMANDS
compose build Build or rebuild services
compose create Create a compose project
compose down Stop and remove a compose project
compose logs Print the logs of services in a project
compose ls List compose projects
compose pause Pause a compose project
compose ps List running services of current project
compose pull Pull images of services of current project
compose push Push images of services of current project
compose start Start a compose project
compose stop Stop a compose project
compose unpause Unpause a compose project
compose up Run a compose project
UNIKRAFT CLOUD COMMANDS
cloud deploy Deploy your application
cloud quotas View your resource quota on Unikraft Cloud
cloud tunnel Forward a local port to an unexposed instance
UNIKRAFT CLOUD IMAGE COMMANDS
cloud img list List all images at a metro for your account
cloud img remove Remove an image
UNIKRAFT CLOUD INSTANCE COMMANDS
cloud instance create Create an instance
cloud instance get Retrieve the state of instances
cloud instance list List instances
cloud instance logs Get console output of instances
cloud instance remove Remove instances
cloud instance start Start instances
cloud instance stop Stop instances
cloud instance top Show instance metrics
UNIKRAFT CLOUD VOLUME COMMANDS
cloud vol attach Attach a persistent volume to an instance
cloud vol create Create a persistent volume
cloud vol detach Detach a persistent volume from an instance
cloud vol get Retrieve the state of persistent volumes
cloud vol import Import local data to a persistent volume
cloud vol list List persistent volumes
cloud vol remove Permanently delete persistent volume(s)
UNIKRAFT CLOUD SERVICE COMMANDS
cloud service create Create a service
cloud service get Retrieve the state of services
cloud service list List services
cloud service remove Delete services
UNIKRAFT CLOUD AUTOSCALE COMMANDS
cloud scale add Add an autoscale configuration policy
cloud scale get Get an autoscale configuration or policy
cloud scale init Initialize autoscale configuration for a service
cloud scale remove Delete an autoscale configuration policy
cloud scale reset Reset autoscale configuration of a service
UNIKRAFT CLOUD CERTIFICATE COMMANDS
cloud cert create Create a certificate
cloud cert get Retrieve the status of a certificate
cloud cert list List certificates
cloud cert remove Remove a certificate
UNIKRAFT CLOUD COMPOSE COMMANDS
cloud compose build Build a compose project
cloud compose create Create a deployment from a Compose project on Unikraft Cloud
cloud compose down Stop and remove the services in a Unikraft Cloud Compose project deployment
cloud compose log View logs of services in a Unikraft Cloud Compose project deployment
cloud compose ls List service deployments at a given path
cloud compose ps List the active services of Unikraft Cloud Compose project
cloud compose push Push the images services to Unikraft Cloud from a Compose project
cloud compose start Start services in a Unikraft Cloud Compose project deployment
cloud compose stop Stop services in a Unikraft Cloud Compose project deployment
cloud compose up Deploy services in a compose project to Unikraft Cloud
MISCELLANEOUS COMMANDS
login Provide authorization details for a remote service
version Show kraft version information
login Provide authorization details for a remote service
version Show kraft version information
completion Generate the autocompletion script for the specified shell
help Help about any command
FLAGS
--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 (default "/var/kraftkit/events.pid")
--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 (default "info")
--log-timestamps Enable log timestamps
--log-type string Log type (default "fancy")
--manifests-dir string Path to Unikraft manifest cache
--no-check-updates Do not check for updates
--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
--pager string System pager to pipe output to
--plugins-dir string Path to KraftKit plugin directory
--runtime-dir string Directory for placing runtime files (e.g. pidfiles) (default "/var/kraftkit")
--sources-dir string Path to Unikraft component cache
--with-manifest strings Paths to package or component manifests (default [https://manifests.kraftkit.sh/index.yaml])
--with-mirror strings Paths to mirrors of Unikraft component artifacts
--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
```

Check failure on line 216 in content/docs/cli/index.mdx

View workflow job for this annotation

GitHub Actions / Markdown Linter

Fenced code blocks should be surrounded by blank lines [Context: "```"]
## Next steps

Check failure on line 217 in content/docs/cli/index.mdx

View workflow job for this annotation

GitHub Actions / Markdown Linter

Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "## Next steps"]

Expand Down
7 changes: 5 additions & 2 deletions content/docs/cli/reference/kraft/build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ $ kraft build path/to/app

```
--all Build all targets
-m, --arch string Filter the creation of the build by architecture of known targets
-m, --arch string Filter the creation of the build by architecture of known targets (x86_64/arm64/arm)
--build-log string Use the specified file to save the output from the build
-c, --config string Override the path to the KConfig .config file
--dbg Build the debuggable (symbolic) kernel image instead of the stripped image
-e, --env stringArray Set environment variables to be built in the unikernel
--force-pull Force pulling packages before building
-h, --help help for build
-j, --jobs int Allow N jobs at once
Expand All @@ -40,8 +41,10 @@ $ kraft build path/to/app
--no-configure Do not run Unikraft's configure step before building
--no-fast Do not use maximum parallelization when performing the build
--no-fetch Do not run Unikraft's fetch step before building
--no-rootfs Do not build the root file system (initramfs)
--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
-o, --output string Set the output directory for the build artifacts
-p, --plat string Filter the creation of the build by platform of known targets (fc/qemu/xen)
--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
Expand Down
41 changes: 41 additions & 0 deletions content/docs/cli/reference/kraft/cloud/cert/create.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "kraft cloud cert create"
description: Create a certificate
---

Create a new certificate.


```
kraft cloud cert create [FLAGS]
```

### Examples

```
# Create a new certificate with a given common name, private key file and chain.
$ kraft cloud certificate create --name my-cert --cn '*.example.com' --pkey 'private-key.pem' --chain 'chain.pem'
```

## Options

```
-C, --chain string The chain of the certificate
-c, --cn string The common name of the certificate
-h, --help help for create
-n, --name string The name of the certificate
-p, --pkey string The private key of the certificate in PEM format
```

## Options inherited from parent commands

```
--metro string Unikraft Cloud metro location
--token string Unikraft Cloud access token
```

## See Also

* [`kraft cloud cert`](/docs/cli/reference/kraft/cloud/cert): Manage TLS certificates

41 changes: 41 additions & 0 deletions content/docs/cli/reference/kraft/cloud/cert/get.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "kraft cloud cert get"
description: Retrieve the status of a certificate
---

Retrieve the status of a certificate.


```
kraft cloud cert get [FLAGS] UUID|NAME
```

### Examples

```
# Retrieve information about a certificate by UUID
$ kraft cloud certificate get fd1684ea-7970-4994-92d6-61dcc7905f2b
# Retrieve information about a certificate by name
$ kraft cloud certificate get my-certificate-431342
```

## Options

```
-h, --help help for get
-o, --output string Set output format. Options: table,yaml,json,list,raw (default "list")
```

## Options inherited from parent commands

```
--metro string Unikraft Cloud metro location
--token string Unikraft Cloud access token
```

## See Also

* [`kraft cloud cert`](/docs/cli/reference/kraft/cloud/cert): Manage TLS certificates

30 changes: 30 additions & 0 deletions content/docs/cli/reference/kraft/cloud/cert/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: "kraft cloud cert"
description: Manage TLS certificates
---

```
kraft cloud cert SUBCOMMAND
```

## Options

```
-h, --help help for cert
```

## Options inherited from parent commands

```
--metro string Unikraft Cloud metro location
--token string Unikraft Cloud access token
```

## See Also

* [`kraft cloud`](/docs/cli/reference/kraft/cloud): Manage resources on Unikraft Cloud
* [`kraft cloud cert create`](/docs/cli/reference/kraft/cloud/cert/create): Create a certificate
* [`kraft cloud cert get`](/docs/cli/reference/kraft/cloud/cert/get): Retrieve the status of a certificate
* [`kraft cloud cert list`](/docs/cli/reference/kraft/cloud/cert/list): List certificates
* [`kraft cloud cert remove`](/docs/cli/reference/kraft/cloud/cert/remove): Remove a certificate

38 changes: 38 additions & 0 deletions content/docs/cli/reference/kraft/cloud/cert/list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: "kraft cloud cert list"
description: List certificates
---

List all TLS certificates in your account.


```
kraft cloud cert list [FLAGS]
```

### Examples

```
# List all TLS certificates in your account.
$ kraft cloud certificate list
```

## Options

```
-h, --help help for list
-o, --output string Set output format. Options: table,yaml,json,list,raw (default "table")
```

## Options inherited from parent commands

```
--metro string Unikraft Cloud metro location
--token string Unikraft Cloud access token
```

## See Also

* [`kraft cloud cert`](/docs/cli/reference/kraft/cloud/cert): Manage TLS certificates

Loading

0 comments on commit 3f1ad7e

Please sign in to comment.