Testflinger agent configuration options¶
By default, configuration of Testflinger agents is loaded from a yaml configuration file called testflinger-agent.conf
. You can specify a different file to use for config data using the -c
option.
The following configuration options are supported by the Testflinger Agent:
Field |
Description |
---|---|
|
Unique identifier for this agent |
|
Additional identifier such as a serial number that will be sent to the server and can be used for cross-referencing with other systems |
|
Time to sleep between polling for new tests (default: 10s) |
|
Host/IP and port of the Testflinger server |
|
Base directory to use for running jobs (default: |
|
Base directory to use for agent logging (default: |
|
Base directory to use for temporary storage of test results to be transmitted to the server (default: |
|
Python log level name to use for logging (default: |
|
If enabled, logs are only written to the logfile, and not to the console (default: |
|
List of queues that can be serviced by this device |
|
List of public queue names that should be reported to the server to report to users |
|
List of images to associate with a queue name so that they can be referenced by name when using Testflinger reserve |
|
Maximum global timeout (in seconds) a job is allowed to specify for this device connector. The job will timeout during the provision or test phase if it takes longer than the requested global_timeout to run. (Default 4 hours) |
|
Maximum output timeout (in seconds) a job is allowed to specify for this device connector. The job will timeout if there has been no output in the test phase for longer than the requested output_timeout. (Default 15 min.) |
|
Command to run for the setup phase |
|
Command to run for the provision phase |
|
Command to run for the firmware_update phase |
|
Command to run for the allocate phase |
|
Command to run for the testing phase |
|
Command to run for the reserve phase - used for optionally reserving a system after provisioning and testing have completed. |
|
Command to run for the cleanup phase |
|
(Optional) type of device connector used. This is sometimes useful when templating the call to the external device-agent command, but is not required. For the list of supported provision types, see Supported device connector types. |
Example configuration¶
agent_id: rpi-example
server_address: https://testflinger.canonical.com
global_timeout: 43200
output_timeout: 8000
execution_basedir: /home/ubuntu/testflinger/rpi-example/run
logging_basedir: /home/ubuntu/testflinger/rpi-example/logs
results_basedir: /home/ubuntu/testflinger/rpi-example/results
logging_level: WARNING
job_queues:
- rpi4
- rpi4-001
setup_command: echo Nothing needed for setup
provision_command: testflinger-device-connector muxpi provision -c /path/to/default.yaml testflinger.json
firmware_update_command: testflinger-device-connector muxpi firmware_update -c /path/to/default.yaml testflinger.json
allocate_command: testflinger-device-connector muxpi allocate -c /path/to/default.yaml testflinger.json
# You may want to consider running test_command under a container
# in order to ensure a clean environment every time
test_command: testflinger-device-connector muxpi test -c /path/to/default.yaml testflinger.json
reserve_command: testflinger-device-connector muxpi reserve -c /path/to/default.yaml testflinger.json
cleanup_command: echo Consider removing containers or other necessary cleanup steps here
provision_type: muxpi