Skip to main content

Device YAML Reference

This is the reference for the device configuration data. The configuration data is written in YAML format and the record is stored within the BeetleboxCI application in its device registry. If you are not familiar with YAML, please see this guide.

devices

Required. The devices that are defined in this config code. At present, BeetleboxCI only supports one device being stored in each record.

KeyRequiredTypeDescription
<device_name>YMapThe namne of a device.

devices.<device_name>

Required. Each device must be given a unique name. <device_name> must start with a letter and only contain alphanumeric characters.

KeyRequiredTypeDescription
transferNStringThe command used to transfer files to/from the device.
connectionYStringThe command used to issue commands to the device.
promptYStringThe string used to monitor the terminal within the device.
statusNMapContains information for monitoring the status of the device.

devices.<device_name>.transfer

The command used to transfer files to/from the device.

Example

devices:
raspberry-pi:
transfer: bash -c "sshpass -p raspberry scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -r $SOURCE $DESTINATION"

devices.<device_name>.connection

Required. The command used to issue commands to the device.

Example

devices:
raspberry-pi:
connection: sshpass -p raspberry ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" pi@192.168.1.92

devices.<device_name>.prompt

Required. The string used to monitor the terminal within the device.

Example

devices:
raspberry-pi:
prompt: "$"

devices.<device_name>.status

Contains information for monitoring the status of the device. The status of a device is monitored by creating a runner (container) that communicates with the device and runs some simple commands to test whether or not the device responds.

KeyRequiredTypeDescription
setupNStringOptional field that may be used to prepare the runner to communicate with the device.
commandYStringThe actual command(s) that are executed on the device.
passYStringThe string that must be detected in the terminal output to confirm that the device has given the expected response.
intervalNStringOptional cron string that could be set to periodically check the status of the device.
devices.<device_name>.status.setup

Optional field that may be used to prepare the runner to communicate with the device. This would often be used to install device-specific software or drivers that are needed to communicate with the device.

Example

devices:
raspberry-pi:
status:
setup: |
apt-get install sshpass -y >/dev/null 2>&1
devices.<device_name>.status.command

Required. The actual command(s) that are executed on the device.

Example

devices:
raspberry-pi:
status:
command:
bash -c 'echo Hello World'
devices.<device_name>.status.pass

Required. The string that must be detected in the terminal output to confirm that the device has given the expected response.

Example

devices:
raspberry-pi:
status:
pass:
"Hello World"
devices.<device_name>.status.interval

Optional cron string that could be set to periodically check the status of the device.

Example

devices:
raspberry-pi:
transfer: bash -c "sshpass -p raspberry scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -r $SOURCE $DESTINATION"
connection: sshpass -p raspberry ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" pi@192.168.1.92
prompt: "$"
status:
interval:
0 * * * *

Reserved keywords

There are certain strings that should not be used in a BeetleboxCI config file, as these are used internally by BeetleboxCI. Using these keywords in your config file may cause errors or unpredictable behaviour. The keywords are listed in the table below:

Key
__line__