Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elemental cli to embed statically snapshots of the framework in releases #1305

Closed
Tracked by #108
mudler opened this issue May 9, 2022 · 3 comments
Closed
Tracked by #108
Labels
area/elemental-cli need/discussion Issues that needs reviewed and are still untriaged by the team

Comments

@mudler
Copy link
Contributor

mudler commented May 9, 2022

This card is about having an "extended" version of the compiled elemental-cli binary with profile bundles that can be installed.

In this way, we can release elemental-cli binary which includes a set of profiles that can be installed while building a derivative for example with (airgap-install here is completely made up, looking for improvement) elemental airgap-install <profile> .

While building the "extended" elemental-cli, we create the profiles with the not-extended-elemental cli, which then are embedded into the extended version with the golang embed native feature. e.g. We could just use go generate tags for this.

This allows then whoever is building a derivative to do something like the following in the Dockerfiles (applies to sandboxed builds as well):

FROM <base image>
FROM <elemental_extended_image_cosigned> as tool

...

RUN elemental airgap-install <profile>

...
RUN mkinitrd 

See also rancher/elemental@048ab0b for a quick sketch up of the above (missing CLI hooks, that's just a basic skeleton/draft).

This mechanism ideally would replace static framework assets included in the Dockerfile currently used for sandboxed builds. For example, in os2 since we switched to teal we bundle the framework statically in the source to help on sandboxed builds (OBS). But this approach is rather difficult to sustain.

@mudler mudler mentioned this issue May 9, 2022
16 tasks
@mudler mudler changed the title <code class="notranslate">elemental` cli to embed statically cos-toolkit package definitions - or either allow to build the packages without having to clone the cos-toolkit github repository. If we let the CLI have specfile statically bundled inside, we can have one repo only (elemental) with the packages definition living inside the same source code. This also allows to just "download" the binary also for building specific versions. elemental cli to embed statically snapshots of the framework May 9, 2022
@mudler mudler changed the title elemental cli to embed statically snapshots of the framework elemental cli to embed statically snapshots of the framework in releases May 9, 2022
@Itxaka
Copy link
Contributor

Itxaka commented May 9, 2022

hey this sounds cool, let me read more abo

We could just use go generate tags for this.

🏃 🗡️ 💀 🗡️ 💀 🗡️ 💀

@mudler
Copy link
Contributor Author

mudler commented May 9, 2022

hey this sounds cool, let me read more abo

We could just use go generate tags for this.

runner dagger skull dagger skull dagger skull

🤣 no need to use go generate, everything else to prepare the assets would work as well. go generate just make it tight to the code so what it does is more obvious in the code context, but that's just one way of doing this

@mudler mudler added the need/discussion Issues that needs reviewed and are still untriaged by the team label May 9, 2022
@mudler mudler moved this to 💡 Untriaged in Elemental Jun 1, 2022
@mudler mudler added this to Elemental Jun 1, 2022
@mudler
Copy link
Contributor Author

mudler commented Jun 10, 2022

Closing. While this is not needed, it is a tempting and interesting idea for other aspects. Although there is no specific interest/requirement bound to this feature for the moment.

Outcome from discussion in #1349

@mudler mudler closed this as completed Jun 10, 2022
Repository owner moved this from 💡 Untriaged to ✅ Done in Elemental Jun 10, 2022
@Itxaka Itxaka moved this from ✅ Done to Archive in Elemental Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/elemental-cli need/discussion Issues that needs reviewed and are still untriaged by the team
Projects
Archived in project
Development

No branches or pull requests

2 participants