Skip to main content

Provider Binaries

The binaries section can be used to specify helper binaries DevPod should download that help the provider to accomplish its tasks.

An example of this type of provider are:

Each binary that is required is declared through:

binaries:
NAME:
- os: # Which OS is this specific binary
arch: # Binary arch
path: # Remote (URL) or local path to binary
checksum: # sha sum of the binary
archivePath: # If its an archive, the relative path to the binary. Supported archives are .tgz, .tar, .tar.gz, .zip

When Adding a provider, DevPod will match the binary for your OS and Arch and download the specific one for it.

Example of the binary section in a provider.yaml:

binaries:
AWS_PROVIDER:
- os: linux
arch: amd64
path: https://github.com/loft-sh/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-linux-amd64
checksum: d1e774419d90c3ed399963d9322d57bfdcee189767eabb076a2c2e926bfd9b8b
- os: linux
arch: arm64
path: https://github.com/loft-sh/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-linux-arm64
checksum: fa15c13e3f0619170d002f9dae3ef41c9949a4595a71c5efe364d89ada604cec
- os: darwin
arch: amd64
path: https://github.com/loft-sh/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-darwin-amd64
checksum: fb89d41f6ce3e01e953f3ffd18f85bd5a42dd633abafd5d586dc9d9b1322166c
- os: darwin
arch: arm64
path: https://github.com/loft-sh/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-darwin-arm64
checksum: 82b6713069fa061ea59941600ed32a15f73806a9af3074d67a20ed367d18b2aa
- os: windows
arch: amd64
path: https://github.com/loft-sh/devpod-provider-aws/releases/download/v0.0.1-alpha.15/devpod-provider-aws-windows-amd64.exe
checksum: 49bd899d439f38d4e8647102db1c18b7a0d5242b3c09c89071b20a5444e20a81

Binary Checksum

Each binary is also verified over an expected checksum. This is important to ensure that whatever binary is declared in provider.yaml is indeed executed on the machine.

Use binaries in commands

DevPod will make the binary path available through an environment variable within the exec section. For example:

binaries:
MY_BINARY:
....

exec:
init: ${MY_BINARY} init
....

Use binaries in options

You can also use binaries within the option command attribute. For example:

binaries:
MY_BINARY:
....

options:
MY_OPTION:
command: ${MY_BINARY} retrieve-option

Use binaries on the agent side

You can also define binaries DevPod should install on the agent side through agent.binaries. These binaries can then be used within the agent.exec section to automatically stop a virtual machine if inactive. For example:

agent:
path: ${AGENT_PATH}
binaries:
GCLOUD_PROVIDER:
- os: linux
arch: amd64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-amd64
checksum: 38f92457507563ee56ea40a2ec40196d12ac2bbd50a924d76f55827e96e5f831
- os: linux
arch: arm64
path: https://github.com/loft-sh/devpod-provider-gcloud/releases/download/v0.0.1-alpha.10/devpod-provider-gcloud-linux-arm64
checksum: 48e8dfa20962f1c3eb1e3da17d57842a0e26155df2b94377bcdf5b8070d7b17e
exec:
shutdown: |-
${GCLOUD_PROVIDER} stop --raw