Device¶
rio device¶
Devices on Rapyuta.io
rio device [OPTIONS] COMMAND [ARGS]...
config¶
Device Configuration Variables
rio device config [OPTIONS] COMMAND [ARGS]...
create¶
Create a new config variable on the device
rio device config create [OPTIONS] DEVICE_NAME KEY VALUE
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
- VALUE¶
Required argument
delete¶
Delete the config variable on the device
rio device config delete [OPTIONS] DEVICE_NAME KEY
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
list¶
List all the config variables on the Device
rio device config list [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
update¶
Update the config variable on the device
rio device config update [OPTIONS] DEVICE_NAME KEY VALUE
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
- VALUE¶
Required argument
delete¶
Delete one or more devices with a name or a regex pattern.
You can specify a name or a regex pattern to delete one or more devices.
If you want to delete all the device, then simply use the –all flag.
If you want to delete devices without confirmation, then use the –force or –silent or -f
Usage Examples:
Delete a device by name
$ rio device delete DEVICE_NAME
Delete a device without confirmation
$ rio device delete DEVICE_NAME –force
Delete all device in the project
$ rio device delete –all
Delete devices using regex pattern
$ rio device delete “DEVICE.*”
rio device delete [OPTIONS] [DEVICE_NAME_OR_REGEX]
Options
- -f, --force, --silent¶
Skip confirmation
- -a, --all¶
Delete all devices
- -w, --workers <workers>¶
Number of parallel workers for deleting devices. Defaults to 10.
Arguments
- DEVICE_NAME_OR_REGEX¶
Optional argument
deployments¶
Lists all the deployments running on the device.
rio device deployments [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
execute¶
Execute commands on a device.
You can specify the user, shell, run-async, and timeout options to customize the command execution. To specify the user, use the –user flag. The default is ‘root’. To specify the shell, use the –shell flag. The default shell is ‘/bin/bash’. 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.
Make sure you put your command in quotes to avoid any issues.
Usage Examples:
$ rio device execute DEVICE_NAME “ls -l”
rio device execute [OPTIONS] DEVICE_NAME [COMMAND]...
Options
- --user <user>¶
- --timeout <timeout>¶
- --shell <shell>¶
- --async¶
Run the command asynchronously.
Arguments
- DEVICE_NAME¶
Required argument
- COMMAND¶
Optional argument(s)
inspect¶
Print the details of a device.
You can specify the format of the output using the –format flag. The default format is yaml. You can choose between json and yaml.
rio device inspect [OPTIONS] DEVICE_NAME
Options
- -f, --format <format_type>¶
- Options:
json | yaml
Arguments
- DEVICE_NAME¶
Required argument
labels¶
Manage device labels.
Labels a key-value pair that you can attach to a device.
rio device labels [OPTIONS] COMMAND [ARGS]...
create¶
Create a new label on a device
rio device labels create [OPTIONS] DEVICE_NAME KEY VALUE
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
- VALUE¶
Required argument
delete¶
Delete a label on a device.
rio device labels delete [OPTIONS] DEVICE_NAME KEY
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
list¶
List all the labels for a device.
rio device labels list [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
update¶
Update a label on a device
rio device labels update [OPTIONS] DEVICE_NAME KEY VALUE
Arguments
- DEVICE_NAME¶
Required argument
- KEY¶
Required argument
- VALUE¶
Required argument
list¶
List all the devices in the current project.
rio device list [OPTIONS]
migrate¶
Migrate a device from current project to the target project.
This process may take some time since it involves multiple steps.
Optionally, you can enable VPN on the device after migration. Use the –enable-vpn flag to enable VPN on the device.
If you want to advertise the subnets configured in the project to VPN peers, use the –advertise-routes flag. This is usually applicable for edge devices that are configured as subnet routers.
rio device migrate [OPTIONS] DEVICE_NAME PROJECT_NAME
Options
- --enable-vpn¶
Enable VPN after migrating to the destination project.
- --advertise-routes¶
Advertise subnets configured in project to VPN peers
Arguments
- DEVICE_NAME¶
Required argument
- PROJECT_NAME¶
Required argument
onboard¶
Generates the on-boarding script for a device.
You need to run the script on the device to onboard it. Copy the script to the device and run it. The device will be onboarded to the rapyuta.io in the selected project.
rio device onboard [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
report¶
Uploads device debug logs.
Usage Examples:
Report a device with confirmation prompt.
$ rio device report DEVICE_NAME
Report a device without confirmation prompt.
$ rio device report -f DEVICE_NAME
Report a device and generate a public URL for sharing.
$ rio device report -s DEVICE_NAME
Report a device with a custom expiry time for the shared URL.
$ rio device report -s -e 10 DEVICE_NAME
rio device report [OPTIONS] DEVICE_NAME
Options
- -f, --force, --silent¶
Skip confirmation
- -s, --share¶
Generate a public URL for sharing
- -e, --expiry <expiry>¶
Expiry time for the shared URL in days
- Default:
7
Arguments
- DEVICE_NAME¶
Required argument
tools¶
Tools for managing devices.
A collection of commands that provide a way to conveniently interact with devices and services running on them. The commands also enable you to script and automate tasks on devices.
rio device tools [OPTIONS] COMMAND [ARGS]...
init¶
Initialize a device for use with device tools.
This is required to be executed first before all tools sub-commands. The command will install the necessary tools on the device and locally on the machine you are running this command on.
rio device tools init [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
port-forward¶
Forwards a port on the device to local machine.
rio device tools port-forward [OPTIONS] DEVICE_NAME REMOTE_PORT [LOCAL_PORT]
Arguments
- DEVICE_NAME¶
Required argument
- REMOTE_PORT¶
Required argument
- LOCAL_PORT¶
Optional argument
scp¶
SCP like interface to copy files to and from a device.
Usage Examples:
Copy a file from local filesystem to the device
$ rio device tools scp /path/to/local/file <device-id|device-name>:/path/to/remote/file
Copy a file from the device to the local filesystem
$ rio device tools scp <device-id|device-name>:/path/to/remote/file /path/to/local/file
rio device tools scp [OPTIONS] SOURCE DESTINATION
Arguments
- SOURCE¶
Required argument
- DESTINATION¶
Required argument
ssh¶
SSH into a device.
Note: Make sure that you have executed the rio device tools init command before trying to SSH.
You can select the user to SSH into the device with the –user flag. The default user is root.
You can also specify the local port to forward the SSH connection to using the –local-port flag. If not specified, a random port will be selected.
You can also specify the remote port on the device on which the SSH server is listening using the –remote-port flag. The default port is 22.
You can enable X Forwarding over SSH using the –x-forward flag.
rio device tools ssh [OPTIONS] DEVICE_NAME
Options
- -u, --user <user>¶
Username for the SSH
- -L, --local-port <local_port>¶
Port number on the local machine for forwarding SSH
- -R, --remote-port <remote_port>¶
Port number on the Device on which SSH Server is listening
- -X, --x-forward, --no-x-forward¶
Flag to enable X Forwarding over SSH
Arguments
- DEVICE_NAME¶
Required argument
topics¶
ROS Topics on the Device
rio device topics [OPTIONS] COMMAND [ARGS]...
list¶
Lists all the available topics for the Device
rio device topics list [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
subscribe¶
Subscribes the topics to start collecting it
rio device topics subscribe [OPTIONS] DEVICE_NAME TOPIC {metric|log}
Arguments
- DEVICE_NAME¶
Required argument
- TOPIC¶
Required argument
- KIND¶
Required argument
unsubscribe¶
Un-subscribes the topics to stop collecting it
rio device topics unsubscribe [OPTIONS] DEVICE_NAME TOPIC {metric|log}
Arguments
- DEVICE_NAME¶
Required argument
- TOPIC¶
Required argument
- KIND¶
Required argument
uploads¶
Manage file uploads from a device.
Provides a convenient way to upload from a device to the cloud and later download, share and perform operations on the uploaded files.
rio device uploads [OPTIONS] COMMAND [ARGS]...
cancel¶
Cancel an ongoing upload operation.
rio device uploads cancel [OPTIONS] DEVICE_NAME FILE_NAME
Arguments
- DEVICE_NAME¶
Required argument
- FILE_NAME¶
Required argument
create¶
Upload a file from a device to the cloud.
You can set the maximum upload rate for the upload operation –max-upload-rate flag. The default rate is 1MB/s.
If there already exists a file upload with the same name, you can override it using the –override flag. The default is set to false.
Setting the –purge flag will delete the file from the device once it is uploaded. The default is set to false. This option is useful when you want to free up space on the device after uploading the file.
Usage Examples:
Upload a file from a device with a max upload rate of 2MB/s
$ rio device uploads create DEVICE_NAME FILE_NAME FILE_PATH –max-upload-rate 2097152
Upload a file from the device and delete it after it uploads
$ rio device uploads create DEVICE_NAME FILE_NAME FILE_PATH –purge
Upload a file from the device and override the existing file on the cloud
$ rio device uploads create DEVICE_NAME FILE_NAME FILE_PATH –override
rio device uploads create [OPTIONS] DEVICE_NAME UPLOAD_NAME FILE_PATH
Options
- --max-upload-rate <max_upload_rate>¶
Network bandwidth limit to be used for upload (Bytes per second)
- --override¶
Flag to override destination file
- --purge¶
Flag to enable purging the file, after it is uploaded
Arguments
- DEVICE_NAME¶
Required argument
- UPLOAD_NAME¶
Required argument
- FILE_PATH¶
Required argument
delete¶
Delete an uploaded file.
rio device uploads delete [OPTIONS] DEVICE_NAME FILE_NAME
Arguments
- DEVICE_NAME¶
Required argument
- FILE_NAME¶
Required argument
download¶
Download a file from the device.
rio device uploads download [OPTIONS] DEVICE_NAME FILE_NAME
Arguments
- DEVICE_NAME¶
Required argument
- FILE_NAME¶
Required argument
list¶
List all files uploaded from a device.
Lists all the files uploaded from a device along with their size and status.
rio device uploads list [OPTIONS] DEVICE_NAME
Arguments
- DEVICE_NAME¶
Required argument
status¶
Check the status of a file upload.
rio device uploads status [OPTIONS] DEVICE_NAME FILE_NAME
Arguments
- DEVICE_NAME¶
Required argument
- FILE_NAME¶
Required argument
vpn¶
Enable or disable VPN client on the device.
Optionally, you can configure the device to advertise a subnet if the project is configured with a subnet range. Please note that –advertise-routes is only a flag and does not provide you an option to specify the subnet range.
You can specify the devices using their names or UUIDs using the –devices flag. If you do not specify any devices, the state will be applied to all online devices in the project.
If you want to skip the confirmation prompt, use the –silent or –force or -f flag.
Examples:
Enable VPN on specific devices
rio device vpn true –devices=amr01 –devices=edge01
Enable VPN on all devices in the project
rio device vpn true
Disable VPN
rio device vpn false
Skip confirmation
rio device vpn false –silent true
rio device vpn [OPTIONS] ENABLE
Options
- --devices <devices>¶
Device names to toggle VPN client
- -f, --force, --silent¶
Skip confirmation
- --advertise-routes¶
Advertise subnets configured in project to VPN peers
Arguments
- ENABLE¶
Required argument