balena-io / open-balena-api

The core API of openBalena
https://balena.io/open
GNU Affero General Public License v3.0
58 stars 29 forks source link

Support for custom device types #474

Open floion opened 3 years ago

floion commented 3 years ago

Will collect here the PRs / remaining issues / resources (as I find them) for allowing users to have custom device types in openBalena

  1. https://github.com/balena-io/open-balena-api/pull/473
jellyfish-bot commented 3 years ago

[dfunckt] This issue has attached support thread https://jel.ly.fish/878f58e5-976d-4097-bb99-af5078f046da

markdegrootnl commented 2 years ago

Most commands on custom devices like balena config generate --fleet FleetWithCustomDevice --version 2.98.12 --dev --debug fail when calling SDK function config.ts: getDeviceTypeManifestBySlug() which executes an api call to /device-types/v1.

Looking at /device-types/v1 in the api it builds a list of device type slugs in device-types-list.ts: getDeviceTypes() which downloads a list of all folders in the S3 bucket configured in IMAGE_STORAGE_BUCKET/IMAGE_STORAGE_PREFIX where all public device images are stored.

Obviously our custom device image is not available in this S3 bucket. I don't know if the balena-sdk repo should be updated to not use v1 endpoints any more or the v1 endpoint in open-balena-api should be fixed.

edit: The command balena-dev os configure ./myimge.img --fleet FleetWithCustomDevice --debug results in a call to api route /download-config which calls device-types.ts: findBySlug() that also utilizes the device-types from the S3 bucket.

Razikus commented 1 year ago

Any updates on this?

markdegrootnl commented 1 year ago

See: https://forums.balena.io/t/supported-devices-in-open-balena/357665/20