Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Create command reference topics for AMC (#319)
Browse files Browse the repository at this point in the history
Create command reference topics for `amc`
  • Loading branch information
keirthana authored Dec 4, 2023
1 parent 54520c4 commit 9c0ff50
Show file tree
Hide file tree
Showing 25 changed files with 768 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Coturn
CPUs
crashdump
Crashpad
CSV
CTS
CUDA
customisable
Expand Down Expand Up @@ -151,6 +152,7 @@ LTS
LXC
LXD
MAAS
macOS
middleware
Minetest
mutex
Expand Down Expand Up @@ -189,6 +191,7 @@ PKI
playout
Plex
PLI
powershell
pre
preselected
Quadro
Expand Down
41 changes: 32 additions & 9 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Thinking about using Anbox Cloud for your next project? [Get in touch!](https://
| 3 | ref/component-versions | [Component versions](https://discourse.ubuntu.com/t/component-versions/21413)|
| 2 | ref/requirements | [Requirements](https://discourse.ubuntu.com/t/installation-requirements/17734) |
| 2 | ref/appliance-command-reference/landing | [Appliance command reference](https://discourse.ubuntu.com/t/39525)|
| 2 | ref/amc-command-reference/landing | [AMC command reference](https://discourse.ubuntu.com/t/40797) |
| 2 | ref/provided-images | [Provided images](https://discourse.ubuntu.com/t/provided-images/24185)|
| 2 | ref/supported-rendering-resources | [Supported rendering resources](https://discourse.ubuntu.com/t/supported-rendering-resources/37322) |
| 2 | ref/supported-codecs | [Supported codecs](https://discourse.ubuntu.com/t/37323)|
Expand Down Expand Up @@ -233,15 +234,37 @@ Thinking about using Anbox Cloud for your next project? [Get in touch!](https://
| | release-notes/1.7.3 | [Release notes-Anbox Cloud 1.7.3](https://discourse.ubuntu.com/t/18458)|
| | release-notes/1.7.2 | [Release notes-Anbox Cloud 1.7.2](https://discourse.ubuntu.com/t/18265)|
| | release-notes/1.7.1 | [Release notes-Anbox Cloud 1.7.1](https://discourse.ubuntu.com/t/17977)|
| | ref/command-reference/ams | [Command reference - ams](https://discourse.ubuntu.com/t/39517)|
| | ref/command-reference/cluster | [Command reference - cluster](https://discourse.ubuntu.com/t/39519)|
| | ref/command-reference/dashboard | [Command reference - dashboard](https://discourse.ubuntu.com/t/39520)|
| | ref/command-reference/destroy | [Command reference - destroy](https://discourse.ubuntu.com/t/39521)|
| | ref/command-reference/gateway | [Command reference - gateway](https://discourse.ubuntu.com/t/39522)|
| | ref/command-reference/help | [Command reference - help](https://discourse.ubuntu.com/t/39523)|
| | ref/command-reference/init | [Command reference - init](https://discourse.ubuntu.com/t/39524)|
| | ref/command-reference/status | [Command reference - status](https://discourse.ubuntu.com/t/39527)|
| | ref/command-reference/upgrade | [Command reference - upgrade](https://discourse.ubuntu.com/t/39528)|
| | ref/appliance-command-reference/ams | [Appliance command reference - ams](https://discourse.ubuntu.com/t/39517)|
| | ref/appliance-command-reference/cluster | [Appliance command reference - cluster](https://discourse.ubuntu.com/t/39519)|
| | ref/appliance-command-reference/dashboard | [Appliance command reference - dashboard](https://discourse.ubuntu.com/t/39520)|
| | ref/appliance-command-reference/destroy | [Appliance command reference - destroy](https://discourse.ubuntu.com/t/39521)|
| | ref/appliance-command-reference/gateway | [Appliance command reference - gateway](https://discourse.ubuntu.com/t/39522)|
| | ref/appliance-command-reference/help | [Appliance command reference - help](https://discourse.ubuntu.com/t/39523)|
| | ref/appliance-command-reference/init | [Appliance command reference - init](https://discourse.ubuntu.com/t/39524)|
| | ref/appliance-command-reference/status | [Appliance command reference - status](https://discourse.ubuntu.com/t/39527)|
| | ref/appliance-command-reference/upgrade | [Appliance command reference - upgrade](https://discourse.ubuntu.com/t/39528)|
| | ref/amc-command-reference/addon | [AMC command reference - addon](https://discourse.ubuntu.com/t/40775) |
| | ref/amc-command-reference/application | [AMC command reference - application](https://discourse.ubuntu.com/t/40776) |
| | ref/amc-command-reference/benchmark | [AMC command reference - benchmark](https://discourse.ubuntu.com/t/40777) |
| | ref/amc-command-reference/completion | [AMC command reference - completion](https://discourse.ubuntu.com/t/40778) |
| | ref/amc-command-reference/config | [AMC command reference - config](https://discourse.ubuntu.com/t/40779) |
| | ref/amc-command-reference/delete | [AMC command reference - delete](https://discourse.ubuntu.com/t/40780) |
| | ref/amc-command-reference/exec | [AMC command reference - exec](https://discourse.ubuntu.com/t/40781) |
| | ref/amc-command-reference/help | [AMC command reference - help](https://discourse.ubuntu.com/t/40782) |
| | ref/amc-command-reference/image | [AMC command reference - image](https://discourse.ubuntu.com/t/40783) |
| | ref/amc-command-reference/info | [AMC command reference - info](https://discourse.ubuntu.com/t/40784) |
| | ref/amc-command-reference/init | [AMC command reference - init](https://discourse.ubuntu.com/t/40785) |
| | ref/amc-command-reference/launch | [AMC command reference - launch](https://discourse.ubuntu.com/t/40786) |
| | ref/amc-command-reference/list | [AMC command reference - list](https://discourse.ubuntu.com/t/40787) |
| | ref/amc-command-reference/logs | [AMC command reference - logs](https://discourse.ubuntu.com/t/40788) |
| | ref/amc-command-reference/node | [AMC command reference - node](https://discourse.ubuntu.com/t/40789) |
| | ref/amc-command-reference/remote | [AMC command reference - remote](https://discourse.ubuntu.com/t/40790) |
| | ref/amc-command-reference/shell | [AMC command reference - shell](https://discourse.ubuntu.com/t/40791) |
| | ref/amc-command-reference/show-log | [AMC command reference - show-log](https://discourse.ubuntu.com/t/40792) |
| | ref/amc-command-reference/show | [AMC command reference - show](https://discourse.ubuntu.com/t/40793) |
| | ref/amc-command-reference/start | [AMC command reference - start](https://discourse.ubuntu.com/t/40794) |
| | ref/amc-command-reference/stop | [AMC command reference - stop](https://discourse.ubuntu.com/t/40795) |
| | ref/amc-command-reference/wait | [AMC command reference - wait](https://discourse.ubuntu.com/t/40796) |
[/details]

## Redirects
Expand Down
47 changes: 47 additions & 0 deletions ref/amc-command-reference/addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
The `addon` command allows you to manage addons that are necessary for customising images.

amc addon <subcommand>

## Subcommands

### `add`
Create an addon from the contents of the provided directory, tarball or zip archive. See how to [create an addon](https://discourse.ubuntu.com/t/40632) or [create an addon tutorial](https://discourse.ubuntu.com/t/create-an-addon/25284) for more information.

amc addon add <addon_name> (<directory> | <tarball> | <zip archive>) --timeout=3m

where `-t` or --`timeout` is a string value to denote the maximum wait time for the operation to complete. The default is `5m`.

### `delete`
Delete the specified addon.

amc addon delete <addon_name> [options]

The following options are available:

|Option|Description|
|------|-----------|
|`-h`, `--help`| Display help information for the command. |
|`-t`, `--timeout`| String value to denote the maximum wait time for the operation to complete. The default is `5m`. |
|`-v`, `--version`| Indicates the version of the application for which the addon needs to be deleted. If a version is not mentioned, the addon is deleted for all versions of an application. |
|`-y`, `--yes`| Option for non interactive deletion, assuming 'yes' as an answer to all prompt. |

### `list`
List available addons along with its application details.

amc addon list --format=(table | json |csv)

where `--format` option controls the output format which can be in the form of a table, JSON or CSV. The default value is `table`.

### `show`
Display information about a specific addon, including its size and created timestamp.

amc addon show <addon_name> --format=(json | yaml)

where `--format` option controls the output format which can be either JSON or YAML. The default value is `yaml`.

### `update`
Update an existing addon

amc addon update <addon_name> <addon_path> --timeout=3m

where `-t` or `--timeout` is a string value to denote the maximum wait time for the operation to complete. The default is `5m`.
123 changes: 123 additions & 0 deletions ref/amc-command-reference/application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
The `application` command allows you to manage applications using the Anbox Management Client (AMC).

amc application <subcommand>

You can also use the alias `app` instead of `application`.

## Subcommands

### `create`
Create an application from the contents of the directory, tarball or zip archive.

amc application create <app_name> (<directory> | <tarball> | <zip archive>) [options]

The following options are available:

|Option|Description|
|------|-----------|
|`-h`, `--help`| Display help information for the command. |
|`-t`, `--timeout`| String value to denote the maximum wait time for the operation to complete. The default is `5m`. |
|`--vm`| Create an application using virtual machines instead of containers. |

### `delete`
Delete the specified application.

amc application delete <app_name> [options]

The following options are available:

|Option|Description|
|------|-----------|
|`-a`, `--all`| Delete all existing applications. |
|`-f`, `--force`| Force deletes of the application even if it is immutable. Applications downloaded from the registry cannot be deleted unless this flag is used. |
|`-h`, `--help`| Displays help information for the `delete` command. |
|`--no-wait`| Indicates not to wait for the delete operation to finish. |
| `-t`, `--timeout`| String value that denotes the maximum wait time for the operation to complete. The default is `5m`. |
| `-v`, `--version`| Displays the version of the application that needs to be deleted. If a version is not mentioned, the addon is deleted for all versions of an application. |
|`-y`, `--yes`| Option for non interactive deletion, assuming 'yes' as an answer to all prompt. |

### `list`
List all available applications. You can apply filters to see a specific list of applications.

amc application list [options]

You can use the alias `ls` instead of `list`.

The following options are available:

|Option|Description|
|------|-----------|
|`-f`, `--filter` | Filters the output based on specified attributes. The attributes can be one of these: <br/>* `instance-type=(comma-separated list)` <br/>* `addons=(comma-separated list)` <br/>* `tags=(comma-separated list)` <br/>* `published=(true/false)` <br/>* `immutable=(true/false)` <br/>* `status=(string)` <br/>* `vm=(true/false)`|
|`--format`| String value that controls the output format which can either be in a table form, JSON, YAML or CSV. The default value is `table`. |
|`-h`, `--help`| Displays help information for the `list` command. |

### `publish`
Publish a version of the application. When an application is launched, AMS always uses the published version of the application unless otherwise mentioned.

amc application publish <app_name> <version> --timeout=3m

where `-t` or --`timeout` is a string value to denote the maximum wait time for the operation to complete. The default is `5m`.

### `revoke`
Revoke a published application version.

amc application revoke <app_name> <version> --timeout=3m

where `-t` or --`timeout` is a string value to denote the maximum wait time for the operation to complete. The default is `5m`.

### `set`
Update specific attributes of an application's manifest without creating a new version of the application.

amc application set <app_name> <field> <field_value>

You can update the following fields:

* `image`
* `addons`
* `tags`
* `inhibit-auto-updates`
* `resources.cpus`
* `resources.memory`
* `resources.disk-size`
* `resources.gpu-slots`
* `resources.vpu-slots`
* `boot-activity`
* `features`
* `hooks.timeout`
* `bootstrap.keep`
* `node-selector`
* `watchdog.disabled`
* `watchdog.allowed-packages`

### `show`
Display information about an application and its versions.

amc application show <app_name> --format=json

where `--format` controls the output formatting. The values for `--format` can be `json` or `yaml`. The output displays in YAML format by default if a format is not specified.

### `unset`
Reset an attribute of an application's manifest to its default value.

amc application unset <app_name> <field>

You can reset the following attributes:

* `tags`
* `addons`
* `features`

For resetting any other attribute, use the `amc application set` command and specify the attribute value.

### `update`
Update an existing application. Updating an application creates a new version.

amc application update <app_name> <package_path> --timeout=10m

where `-t` or --`timeout` is a string value to denote the maximum wait time for the operation to complete. The default is `5m`.

If you don't provide a package for the update, AMS checks all possible updates by verifying the application against newer images and addons and applies pending changes as necessary.

If you prefer specific updates to your application, use the `amc application set` command instead as it allows you to update specific fields of the application without updating the application.


22 changes: 22 additions & 0 deletions ref/amc-command-reference/benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The `benchmark` command allows you to benchmark your Anbox Cloud deployment. Benchmarking your deployment helps in evaluating the performance of Anbox Cloud for a well-defined workload.

amc benchmark (<app_id> | <image_id>) [options]

Define the workload with the following options:

|Option|Input type|Description| Default value|
|------|-----------|-----------|-------------|
|`-d`, `--dump-data` | | Dump data collected during the benchmark, the file name containing the data is printed | |
| `-c`, `--force` | | Force remove instances | |
| `-f`, `--fps` | | Measure Frames Per Second (FPS) for all instances | |
| `--fps-threshold` | Integer | FPS threshold below which an instance will be considered slow | 30 |
| `-h`, `--help` | | Displays help information for `amc benchmark` command| |
| `-s`, `--instances-per-second` | Float | Number of instances to launch per second | 0.1 |
| `--measure-time` | String | Time spent measuring instance statistics| 1 minute |
| `--network-address` | String | Outbound network address on which the instances can reach the benchmark executor. For example: 127.0.0.1 | |
| `-n`, `--num-instances` | Integer | Number of instances to launch | 1 |
| `-p`, `--platform` | String | Anbox platform to use for the instances | `null` |
| `-r`, `--raw` | | If specified, the instance is created for the specified image instead of an application | |
|`--settle-time` | String | Settling time allowed for the instance performance measurement starts | 30 seconds |
| `--userdata` | String | Additional user data to be sent to the created instance | |

80 changes: 80 additions & 0 deletions ref/amc-command-reference/completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
The `completion` command allows you to generate the auto completion script for the specified shell.

amc completion <subcommand>

## Subcommands

### `bash`
Generate the auto completion script for `bash`. This script depends on and requires the `bash-completion` package to be installed.

amc completion bash --no-descriptions

where `--no-descriptions` disables completion descriptions.

To load completions in your current shell session, use:

source <(amc completion bash)

To load completions for every new session, execute the following once and start a new shell for the setup to take effect:

For Linux,

amc completion bash > /etc/bash_completion.d/amc

For macOS,

amc completion bash > $(brew --prefix)/etc/bash_completion.d/amc

### `fish`
Generate the auto completion script for `fish`.

amc completion fish --no-descriptions

where `--no-descriptions` disables completion descriptions.

To load completions in your current shell session, use:

amc completion fish | source

To load completions for every new session, execute the following once and start a new shell for the set to take effect:

amc completion fish > ~/.config/fish/completions/amc.fish

### `powershell`
Generate the auto completion script for `powershell`.

amc completion powershell --no-descriptions

where `--no-descriptions` disables completion descriptions.

To load completions in your current shell session, use:

amc completion powershell | Out-String | Invoke-Expression

To load completions for every new session, add the output of the above command
to your powershell profile.

### `zsh`
Generate the auto completion script for `zsh`.

amc completion zsh --no-descriptions

where `--no-descriptions` disables completion descriptions.

If shell completion is not already enabled in your environment, enable it by running the following command:

echo "autoload -U compinit; compinit" >> ~/.zshrc

To load completions in your current shell session:

source <(amc completion zsh)

To load completions for every new session, execute the following once and start a new shell for the setup to take effect:

For Linux,

amc completion zsh > "${fpath[1]}/_amc"

For macOS,

amc completion zsh > $(brew --prefix)/share/zsh/site-functions/_amc
36 changes: 36 additions & 0 deletions ref/amc-command-reference/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
The `config` command helps manage the global configuration for the Anbox Management Service (AMS). See [AMS configuration](https://discourse.ubuntu.com/t/20872) for a list of
available configuration items.

amc config <subcommand>

## Subcommands

### `set`
Update a single configuration of the AMS.

amc config set <config_name> <config_value>

### `show`
Display all configuration of the AMS.

amc config show

### `trust`
Manage trusted clients that can communicate with AMS. You can add or remove client certificates as needed to allow or block communication with AMS.

The `amc config trust` command can be used with three subcommands - `add`, `list` and `remove`.

The `add` command adds a new trusted client that can communicate with the AMS:

amc config trust add <certificate_path>

The `list` command displays a list of trusted clients:

amc config trust list --format=table

where `--format` controls the output formatting. `table`, `json` and `yaml` are allowed values while `table` is the default value.

The `remove` command removes a client from the list of trusted clients. You can also use `rm` as an alias.

amc config trust remove <client_name>

Loading

0 comments on commit 9c0ff50

Please sign in to comment.