Devsy
Developing Providers

Provider Binaries

The binaries section lists helper binaries Devsy downloads for a provider, such as a cloud CLI.

Each entry is a name with one item per platform:

binaries:
  MY_BINARY:
    - os: linux
      arch: amd64
      path: https://example.com/my-binary-linux-amd64  # URL or local path
      checksum: <sha256 of the file>
      archivePath: bin/my-binary  # only if path is an archive
      name: my-binary             # optional, defaults to the file name
    - os: darwin
      arch: arm64
      path: https://example.com/my-binary-darwin-arm64
      checksum: <sha256 of the file>

Supported archives are .tgz, .tar, .tar.gz and .zip. When a user adds the provider, Devsy picks the item that matches their OS and architecture, downloads it and verifies the checksum.

See the official providers, such as devsy-provider-aws, for complete examples.

Not every provider needs binaries. Built-in providers that wrap a CLI the user already has, such as docker, expose an option like DOCKER_PATH instead of downloading one.

Use a binary

Devsy exposes each binary's path as an environment variable with the same name.

In exec:

exec:
  init: ${MY_BINARY} init

In an option command:

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

On the agent side, declare the binary under agent.binaries and use it in agent.exec:

agent:
  binaries:
    MY_BINARY:
      - os: linux
        arch: amd64
        path: https://example.com/my-binary-linux-amd64
        checksum: <sha256 of the file>
  exec:
    shutdown: ${MY_BINARY} stop

On this page