Deployment

rio deployment

Deployed instances of a Package.

rio deployment [OPTIONS] COMMAND [ARGS]...

delete

Delete one or more deployments with a name or a regex pattern.

You can specify a deployment name or a regex pattern to delete one or more deployment.

If you want to delete all the deployments, then simply use the --all flag.

If you want to delete deployments without confirmation, then use the --force or --silent or -f

Usage Examples:

Delete a deployment by name

$ rio deployment delete DEPLOYMENT_NAME

Delete a deployment without confirmation

$ rio deployment delete DEPLOYMENT_NAME –force

Delete all deployments in the project

$ rio deployment delete –all

Delete deployments using regex pattern

$ rio deployment delete “DEPLOYMENT.*”

rio deployment delete [OPTIONS] [DEPLOYMENT_NAME_OR_REGEX]

Options

-f, --force, --silent

Skip confirmation

-a, --all

Deletes all deployments in the project

-w, --workers <workers>

Number of parallel workers while running delete deployment command. Defaults to 10.

Arguments

DEPLOYMENT_NAME_OR_REGEX

Optional argument

execute

Execute a command on a device deployment

You can execute a command on a deployment running on a device. In case there are more than one executable in the deployment, you can specify the executable name using the --exec option. If you do not specify the executable name, you will be prompted to select one from the list of executables. If the deployment only has one executable, it will be selected automatically.

You can specify the shell using the --shell option. The default shell is /bin/bash. You can also specify the user using the --user option. The default user is root.

To run the command asynchronously, set the –async flag to true. The default value is false.

To specify the timeout, use the –timeout flag, providing the duration in seconds. The default value is 300.

Please ensure that you enclose the command in quotes to avoid any issues with the command parsing.

Usage Examples:

Execute a command on a device deployment with one executable

$ rio deployment execute DEPLOYMENT_NAME ‘ls -l’

Execute a command on a device deployment with multiple executables

$ rio deployment execute DEPLOYMENT_NAME –exec EXECUTABLE_NAME ‘ls -l’

rio deployment execute [OPTIONS] DEPLOYMENT_NAME [COMMAND]...

Options

--user <user>
--shell <shell>
--timeout <timeout>
--async

Run the command asynchronously.

--exec <exec_name>

Name of a executable in the component

Arguments

DEPLOYMENT_NAME

Required argument

COMMAND

Optional argument(s)

inspect

Inspect the deployment resource

Prints the deployment resource in the specified format. The supported formats are json and yaml. Default is yaml.

rio deployment inspect [OPTIONS] DEPLOYMENT_NAME

Options

-f, --format <format_type>
Options:

json | yaml

Arguments

DEPLOYMENT_NAME

Required argument

list

List the deployments in the current project

You can filter the deployments by phase and labels.

The -w or –wide flag prints more details about the deployments.

Usage Examples:

Filter by phase

$ rio deployment list –phase InProgress –phase Stopped

Filter by labels

$ rio deployment list –label key1=value1 –label key2=value2

rio deployment list [OPTIONS]

Options

--device <device>

Filter the Deployment list by Device name

--phase <phase>

Filter the Deployment list by Phases

Options:

InProgress | Provisioning | Succeeded | FailedToStart | Stopped

-l, --label <labels>

Filter the deployment list by labels

-w, --wide

Print more details

logs

Stream live logs from cloud deployments.

You can stream logs from a deployment running on the cloud. In case there are more than one executable in the deployment, you can specify the executable name using the –exec option.

If there are multiple replicas of the deployment, you can specify the replica number using the –replica option. The default replica number is 0.

Note: The logs are streamed in real-time. Press Ctrl+C to stop the log streaming. Also, device deployments do not support log streaming.

rio deployment logs [OPTIONS] DEPLOYMENT_NAME

Options

--replica <replica>

Replica identifier of the deployment

--exec <exec_name>

Name of a executable in the component

Arguments

DEPLOYMENT_NAME

Required argument

restart

Restarts one or more deployments by name or regex.

Usage Examples:

Restart a specific deployment

$ rio deployment restart amr01

Restart all deployments in the project

$ rio deployment restart –all

Restart deployments matching a regex.

$ rio deployment restart amr.*

rio deployment restart [OPTIONS] [DEPLOYMENT_NAME_OR_REGEX]

Options

-f, --force, --silent

Skip confirmation

-a, --all

Deletes all deployments in the project

-w, --workers <workers>

number of parallel workers while running update deployment command. defaults to 10.

Arguments

DEPLOYMENT_NAME_OR_REGEX

Optional argument

status

Print the current status of a deployment.

The command simply prints the current status of the deployment. This is useful in scripts and automation where you need to check the status of a deployment.

rio deployment status [OPTIONS] DEPLOYMENT_NAME

Arguments

DEPLOYMENT_NAME

Required argument

update

Use the restart command instead

rio deployment update [OPTIONS] [DEPLOYMENT_NAME_OR_REGEX]

Options

-f, --force, --silent

Skip confirmation

-a, --all

Deletes all deployments in the project

-w, --workers <workers>

number of parallel workers while running update deployment command. defaults to 10.

Arguments

DEPLOYMENT_NAME_OR_REGEX

Optional argument

wait

Wait until the deployment succeeds/fails

This command is useful in scripts or automation when you explicitly want to wait for the deployment to succeed.

rio deployment wait [OPTIONS] DEPLOYMENT_NAME

Arguments

DEPLOYMENT_NAME

Required argument