diff --git a/pages/cli/legacy-overview.mdx b/pages/cli/legacy-overview.mdx new file mode 100644 index 0000000..dd6f1be --- /dev/null +++ b/pages/cli/legacy-overview.mdx @@ -0,0 +1,96 @@ +--- +title: Kraft cloud CLI (legacy) +description: Legacy Kraft cloud CLI installation and quick start +--- + +The **kraft cloud** CLI is part of the [KraftKit](https://github.com/unikraft/kraftkit) toolchain. +While it remains fully supported with ongoing bug fixes, it won't receive any new functionality. +New users should use the unikraft CLI instead. + +## Installation + +For Windows, KraftKit currently requires Windows Subsystem for Linux 2 (WSL2). +Please ensure you set up WSL2 on your host (for example: run `wsl --install -d ubuntu` in PowerShell). + + + +```bash title="1-liner (macOS & Linux)" +curl --proto '=https' --tlsv1.2 -sSf https://get.kraftkit.sh | sh +``` + +```bash title="macOS" +brew install unikraft/tap/kraftkit +``` + +```bash title="Debian/Ubuntu" +# Update and install dependencies +sudo apt-get update +sudo apt-get install \ + ca-certificates \ + curl \ + gnupg \ + lsb-release + +# Add Unikraft's official GPG key: +sudo mkdir -p /etc/apt/keyrings +curl -fsSL https://deb.pkg.kraftkit.sh/gpg.key | \ + sudo gpg --dearmor -o /etc/apt/keyrings/unikraft.gpg + +# Use the following command to set up the APT repository: +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/unikraft.gpg] https://deb.pkg.kraftkit.sh /" | \ + sudo tee /etc/apt/sources.list.d/unikraft.list > /dev/null + +# Update the APT package index, and install the latest version of kraftkit: +sudo apt-get update +sudo apt-get install kraftkit +``` + +```bash title="Fedora/RHEL/Rocky/Alma" +# Add the Kraftkit repository +sudo tee /etc/yum.repos.d/kraftkit.repo < + +## Quick start + +```sh +# Deploy an instance +kraft cloud deploy -p 443:8080/http+tls -M 512 . + +# List instances +kraft cloud instance list +``` + +## Choosing a CLI + +| Feature | unikraft | kraft cloud | +|---------|----------|-------------| +| Recommended for new users | Yes | No | +| Profile management | Yes | Limited | +| Scale-to-zero support | Yes | Yes | +| Compose support | No | Yes | + +If you are getting started with Unikraft Cloud, use the **unikraft** CLI. +If you need Docker Compose-style workflows use the **kraft cloud** CLI. + +[Back to CLI overview](/docs/cli/overview) diff --git a/pages/cli/overview.mdx b/pages/cli/overview.mdx index 9eecac5..89932fc 100644 --- a/pages/cli/overview.mdx +++ b/pages/cli/overview.mdx @@ -3,14 +3,10 @@ title: CLI Overview description: Command-line interfaces for Unikraft Cloud --- -Unikraft Cloud provides two command-line interfaces for managing your unikernel deployments: - -## unikraft CLI (recommended) - The **unikraft** CLI is the new, official command-line interface for [Unikraft Cloud](https://unikraft.cloud). It provides a modern, streamlined experience for deploying and managing unikernels globally. -### Features +## Features - **Deploy Instantly** - Run unikernel images as serverless instances with `unikraft run` - **Global Infrastructure** - Deploy across supported metros with automatic multi-region support @@ -20,51 +16,75 @@ It provides a modern, streamlined experience for deploying and managing unikerne - **Profile Management** - Switch between accounts and configurations - **Shell Completions** - Tab completion for Bash, Zsh, Fish, and PowerShell -### Quick start +## Installation -```sh -# Login to Unikraft Cloud -unikraft login + -# Deploy an instance -unikraft run --metro=fra -p 443:8080/http+tls nginx:latest +```bash title="1-liner (macOS & Linux)" +curl --proto '=https' --tlsv1.2 -fsSL https://unikraft.com/cli/install.sh | sh +``` -# List instances -unikraft instances list +```bash title="macOS" +brew install unikraft/cli/unikraft ``` -[View unikraft CLI documentation](/docs/cli/unikraft) +```bash title="Debian/Ubuntu" +# Update and install dependencies +sudo apt update +sudo apt install ca-certificates curl + +# Download and add the GPG key +sudo install -d -m 0755 /etc/apt/keyrings + +sudo curl -fsSL \ + -o /etc/apt/keyrings/unikraft-cli.gpg \ + https://pkg.unikraft.com/debian/cli-apt/keys/cli-apt.gpg + +sudo tee /etc/apt/sources.list.d/unikraft-cli.sources < -The **kraft cloud** CLI is part of the [KraftKit](https://github.com/unikraft/kraftkit) toolchain. -It remains fully supported, and new users should use the `unikraft` CLI above. +See [alternative installation instructions](https://github.com/unikraft/cli/?tab=readme-ov-file#installation) for other platforms. -### Quick start +## Quick start ```sh +# Login to Unikraft Cloud +unikraft login + # Deploy an instance -kraft cloud deploy -p 443:8080/http+tls -M 512 . +unikraft run --metro=fra -p 443:8080/http+tls nginx:latest # List instances -kraft cloud instance list +unikraft instances list ``` -[View kraft cloud CLI documentation](/docs/cli/kraft/overview) - ---- - -## Choosing a CLI - -| Feature | unikraft | kraft cloud | -|---------|----------|-------------| -| Recommended for new users | Yes | No | -| Profile management | Yes | Limited | -| Scale-to-zero support | Yes | Yes | -| Compose support | No | Yes | -| Build from source | No | Yes | +[View unikraft CLI documentation](/docs/cli/unikraft) -If you are getting started with Unikraft Cloud, use the **unikraft** CLI. -If you need Docker Compose-style workflows or building images from source, use the **kraft cloud** CLI. +Looking for the legacy `kraft cloud` CLI? +See the [Kraft cloud CLI (legacy)](/docs/cli/legacy-overview) page for installation instructions.