diff --git a/website/docs/9-cli-reference/uc.md b/website/docs/9-cli-reference/uc.md index 0f89cef0..2bd2a4f7 100644 --- a/website/docs/9-cli-reference/uc.md +++ b/website/docs/9-cli-reference/uc.md @@ -18,6 +18,8 @@ A CLI tool for managing Uncloud resources such as machines, services, and volume * [uc ctx](uc_ctx.md) - Switch between different cluster contexts. Contains subcommands to manage contexts. * [uc deploy](uc_deploy.md) - Deploy services from a Compose file. * [uc dns](uc_dns.md) - Manage cluster domain in Uncloud DNS. +* [uc image](uc_image.md) - Manage images on machines in the cluster. +* [uc images](uc_images.md) - List images on machines in the cluster. * [uc inspect](uc_inspect.md) - Display detailed information on a service. * [uc ls](uc_ls.md) - List services. * [uc machine](uc_machine.md) - Manage machines in an Uncloud cluster. diff --git a/website/docs/9-cli-reference/uc_deploy.md b/website/docs/9-cli-reference/uc_deploy.md index 86d3826d..f8c42b4b 100644 --- a/website/docs/9-cli-reference/uc_deploy.md +++ b/website/docs/9-cli-reference/uc_deploy.md @@ -15,8 +15,8 @@ uc deploy [FLAGS] [SERVICE...] [flags] -n, --no-build Do not build images before deploying services. (default false) -p, --profile strings One or more Compose profiles to enable. --recreate Recreate containers even if their configuration and image haven't changed. - -y, --yes Auto-confirm deployment plan. Enabled by default when running non-interactively, - e.g., in CI/CD pipelines. + -y, --yes Auto-confirm deployment plan. Should be explicitly set when running non-interactively, + e.g., in CI/CD pipelines. [$UNCLOUD_AUTO_CONFIRM] ``` ## Options inherited from parent commands diff --git a/website/docs/9-cli-reference/uc_image.md b/website/docs/9-cli-reference/uc_image.md new file mode 100644 index 00000000..f49116c5 --- /dev/null +++ b/website/docs/9-cli-reference/uc_image.md @@ -0,0 +1,24 @@ +# uc image + +Manage images on machines in the cluster. + +## Options + +``` + -h, --help help for image +``` + +## Options inherited from parent commands + +``` + --connect string Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT] + Format: [ssh://]user@host[:port] or tcp://host:port + --uncloud-config string Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml") +``` + +## See also + +* [uc](uc.md) - A CLI tool for managing Uncloud resources such as machines, services, and volumes. +* [uc image ls](uc_image_ls.md) - List images on machines in the cluster. +* [uc image push](uc_image_push.md) - Upload a local Docker image to the cluster. + diff --git a/website/docs/9-cli-reference/uc_image_ls.md b/website/docs/9-cli-reference/uc_image_ls.md new file mode 100644 index 00000000..4fda0021 --- /dev/null +++ b/website/docs/9-cli-reference/uc_image_ls.md @@ -0,0 +1,51 @@ +# uc image ls + +List images on machines in the cluster. + +## Synopsis + +List images on machines in the cluster. By default, on all machines. Optionally filter by image name. + +``` +uc image ls [REPO:[TAG]] [flags] +``` + +## Examples + +``` + # List all images on all machines. + uc image ls + + # List images on specific machine. + uc image ls -m machine1 + + # List images on multiple machines. + uc image ls -m machine1,machine2 + + # List images filtered by name (with any tag) on all machines. + uc image ls myapp + + # List images filtered by name pattern on specific machine. + uc image ls "myapp:1.*" -m machine1 +``` + +## Options + +``` + -c, --context string Name of the cluster context. (default is the current context) + -h, --help help for ls + -m, --machine strings Filter images by machine name or ID. Can be specified multiple times or as a comma-separated list. (default is include all machines) +``` + +## Options inherited from parent commands + +``` + --connect string Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT] + Format: [ssh://]user@host[:port] or tcp://host:port + --uncloud-config string Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml") +``` + +## See also + +* [uc image](uc_image.md) - Manage images on machines in the cluster. + diff --git a/website/docs/9-cli-reference/uc_image_push.md b/website/docs/9-cli-reference/uc_image_push.md new file mode 100644 index 00000000..386a58bc --- /dev/null +++ b/website/docs/9-cli-reference/uc_image_push.md @@ -0,0 +1,55 @@ +# uc image push + +Upload a local Docker image to the cluster. + +## Synopsis + +Upload a local Docker image to the cluster transferring only the missing layers. +The image is uploaded to the machine which CLI is connected to (default) or the specified machine(s). + +``` +uc image push IMAGE [flags] +``` + +## Examples + +``` + # Push image to the machine the CLI is connected to. + uc image push myapp:latest + + # Push image to specific machine. + uc image push myapp:latest -m machine1 + + # Push image to multiple machines. + uc image push myapp:latest -m machine1,machine2,machine3 + + # Push image to all machines in the cluster. + uc image push myapp:latest -m all + + # Push a specific platform of a multi-platform image. + uc image push myapp:latest --platform linux/amd64 +``` + +## Options + +``` + -c, --context string Name of the cluster context. (default is the current context) + -h, --help help for push + -m, --machine strings Machine names to push the image to. Can be specified multiple times or as a comma-separated list of machine names. + Use 'all' to push to all machines. (default is connected machine) + --platform string Push a specific platform of a multi-platform image (e.g., linux/amd64, linux/arm64). + Local Docker must be configured to use containerd image store to support multi-platform images. +``` + +## Options inherited from parent commands + +``` + --connect string Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT] + Format: [ssh://]user@host[:port] or tcp://host:port + --uncloud-config string Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml") +``` + +## See also + +* [uc image](uc_image.md) - Manage images on machines in the cluster. + diff --git a/website/docs/9-cli-reference/uc_images.md b/website/docs/9-cli-reference/uc_images.md new file mode 100644 index 00000000..28ea5b3b --- /dev/null +++ b/website/docs/9-cli-reference/uc_images.md @@ -0,0 +1,51 @@ +# uc images + +List images on machines in the cluster. + +## Synopsis + +List images on machines in the cluster. By default, on all machines. Optionally filter by image name. + +``` +uc images [IMAGE] [flags] +``` + +## Examples + +``` + # List all images on all machines. + uc images + + # List images on specific machine. + uc images -m machine1 + + # List images on multiple machines. + uc images -m machine1,machine2 + + # List images filtered by name (with any tag) on all machines. + uc images myapp + + # List images filtered by name pattern on specific machine. + uc images "myapp:1.*" -m machine1 +``` + +## Options + +``` + -c, --context string Name of the cluster context. (default is the current context) + -h, --help help for images + -m, --machine strings Filter images by machine name or ID. Can be specified multiple times or as a comma-separated list. (default is include all machines) +``` + +## Options inherited from parent commands + +``` + --connect string Connect to a remote cluster machine without using the Uncloud configuration file. [$UNCLOUD_CONNECT] + Format: [ssh://]user@host[:port] or tcp://host:port + --uncloud-config string Path to the Uncloud configuration file. [$UNCLOUD_CONFIG] (default "~/.config/uncloud/config.yaml") +``` + +## See also + +* [uc](uc.md) - A CLI tool for managing Uncloud resources such as machines, services, and volumes. + diff --git a/website/docs/9-cli-reference/uc_machine_init.md b/website/docs/9-cli-reference/uc_machine_init.md index 66266aeb..d99350f9 100644 --- a/website/docs/9-cli-reference/uc_machine_init.md +++ b/website/docs/9-cli-reference/uc_machine_init.md @@ -31,7 +31,7 @@ uc machine init [USER@HOST:PORT] [flags] ## Options ``` - -c, --context string Name of the new context to be created for the initialised cluster in the Uncloud config. (default "default") + -c, --context string Name of the new context to be created in the Uncloud config to manage the cluster. (default "default") --dns-endpoint string API endpoint for the Uncloud DNS service. (default "https://dns.uncloud.run/v1") -h, --help help for init -n, --name string Assign a name to the machine.