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
YMapThe namne of a device.

devices.

Required. Each device must be given a unique 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..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..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..prompt

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

Example

devices:
raspberry-pi:
prompt: "$"

devices..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..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..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..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..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//