12bd633c

f0cal/farm

Quick start

{% include_relative install_snippet.md %}
f0cal farm config update "api_key=${API_KEY}"
f0cal farm instance create my_pi \
  --device-type raspberry-pi/3bp \
  --image ubuntu/latest
f0cal farm instance connect my_pi \
  --ssh

{% include_relative api_key_note.md %}

About

A device farm is a collection of hardware coupled with an orchestration infrastructure. While the purpose of most device farms is basic software testing, FØCAL’s device farm provides a complete, performance-focused devops infrastructure. Think of it more like a Docker, but where you can actually touch the metal.

Using the f0cal/farm you can:

  • Spin up devices of various types.

  • Set operating system parameters on target devices.

  • Access running devices.

User-facing nouns mirror those found in typical virtual machine workflows:

  • image – The complete OS for the device given as a reference of the form {os}/{version}.

  • device-type – The model of the requested device given as a reference of the form {manfacturer}-{model}/{version}

  • instance – The association of an operating system image with a single physical device of type device-type.

Getting started

Install f0cal in your Python virtual environment and add your API key {% include_relative key.md %}:

{% include_relative install_snippet.md %}
f0cal farm config update "api_key=${API_KEY}"

Workflows

Available device types

f0cal farm device-type query
f0cal farm device-type query "manufacturer==NVidia"

Available images

f0cal farm image query
f0cal farm image query "vendor==Canonical"

Your instances

f0cal farm instance create ${INSTANCE_NAME} \
  --device-type ${DEVICE_TYPE_ID} \
  --image ${IMAGE_ID}
f0cal farm instance update ${INSTANCE_NAME} "name=foo"
f0cal farm instance stop foo
f0cal farm instance query "running==False"
f0cal farm instance start foo
f0cal farm instance connect foo
f0cal farm instance destroy foo