Open jellyfish-bot opened 3 years ago
[rahul-thakoor] This issue has attached support thread https://jel.ly.fish/fd47d0d2-9a53-43c8-9453-e906d7791e46
[pdcastro] This issue has attached support thread https://jel.ly.fish/ce70c1de-e821-4f10-8912-d55af99bbcab
Re balena fleet create
, I gather that the balena CLI uses the balena SDK's models.application.create() method, and that SDK method retrieves the device manifest from S3 (regardless of the --type
flag being used) as coded in the following lines:
const deviceTypeIdPromise = deviceModel()
.getManifestBySlug(deviceType)
const deviceTypes = await configModel().getDeviceTypes();
const { body: deviceTypes } = await request.send({
method: 'GET',
url: '/device-types/v1',
baseUrl: apiUrl,
});
I understand that the SDK retrieves the device type manifest with 2 purposes:
In turn, the SDK queries the /device-types/v1
endpoint from openbalena-api
:
Where the S3 bucket URL / hostname comes from environment variable IMAGE_STORAGE_BUCKET
, which open-balena
hardcodes as s3.amazonaws.com
:
IMAGE_STORAGE_ENDPOINT: s3.amazonaws.com
Hence accessing the internet.
I don't think it is a case of documenting how to run balena fleet create
(the balena CLI) in an air-gapped environment, as I understand open-balena
relies on the AWS S3 endpoint (s3.amazonaws.com
) as per configuration above. Rather, it is a case of recording that this scenario is required by some users and not currently offered by balena. Accordingly, I am changing this issue's title, I have created open-balena
issue balena-io/open-balena/issues/129 and will also record the feature request in balena's support system (JF pattern) for discussion in the product improvement loop.
[rahul-thakoor] There may be cases where users have an openBalena instance or balena on prem instance in an air-gapped network. There are commands that error in such cases since they require contacting services external to the instance. One example is
balena fleet create
command which calls our s3 repo to get a list of supported devices if the--type
option is not specified.