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

[Spike] Investigate solutions for kairos-init alternatives #3045

Open
Tracked by #2127
jimmykarily opened this issue Dec 3, 2024 · 5 comments
Open
Tracked by #2127

[Spike] Investigate solutions for kairos-init alternatives #3045

jimmykarily opened this issue Dec 3, 2024 · 5 comments

Comments

@jimmykarily
Copy link
Contributor

jimmykarily commented Dec 3, 2024

Before we jump into implementing our own solution, let's first do some research for tools that could satisfy our needs.

We are looking for tools that:

  • can install software on different distributions
  • leave not traces behind after they are done
  • Don't bring a lot of dependencies (ideally should be just one binary + recipe)
  • have a "good" licence (so we can use)
  • have a good community (so they don't go out of business soon)
  • Can run in a container build step
  • Can bundle binary/static files in a single binary, and be self-extracting
@jimmykarily jimmykarily converted this from a draft issue Dec 3, 2024
@mauromorales
Copy link
Member

@Itxaka
Copy link
Member

Itxaka commented Dec 3, 2024

Here are some tools to check:
* purpleidea/mgmt

this looks good 👀
EDIT: but doesnt fit :(

Want to add as well chef-solo, which is chef-infra but without any remote servers or anything.

Pros:

  • deps are minimal
  • most flavours have packages for chef so its easy to remove and cleanup afterwards
  • should cover our use case properly
  • Lots of community cookbooks, so not much to invent

Cons:

  • ruby
  • Cookbooks are a bit of a mess
  • Databags, yikeeeees, I hate them
  • It requires some config, not sure how to bundle it/handle it (ruby frontend wiht config incrusted that calls chef-solo internally?)

Also Ansible on the same way
Pros:

  • Covers everything we want and more
  • Lots of community recipes/roles, so not much to invent
  • Some distros may have packages available

Cons:

  • I dont think deps are minimal, its python so it may be a mess if we dont have the same install process for all.
  • We have to install ansible and run it with a config, which can be messy.
  • Probably need to download the recipes on the fly?

@Itxaka
Copy link
Member

Itxaka commented Dec 3, 2024

I wonder if we can just leverage yip to do this with just simple plugin for package installs.

will have a quick look and maybe poc

@tbrasser
Copy link

tbrasser commented Dec 3, 2024

not sure if these fit the bill/are worth considering, if not please ignore me 😅

@Itxaka
Copy link
Member

Itxaka commented Dec 4, 2024

I had a look at yip and indeed is doable:

Would looks like this, quick and dirty example:
https://gist.github.com/Itxaka/350ea3a28363761907f13f40e5e4b21d

This shows:

  • yip running packages install, systemctl services, files being clean and validation
  • shows how we can use the stages to declare the system state in code directly
  • how we can create custom stages and custom plugins easily

this:

  • does not use the DAG, as I wanted to show custom plugins and stages 😛
  • shows also that the IfConditional available is not good enough for us
  • shows that we should be able to create our own and easily change it so we can do ifs based on whatever we want (IfOS, IfArch, IfVersion, etc...)
  • any plugins only needed for the init stuff could be in the init repo, we used to do something similar in the agent for the partitioner: https://github.com/kairos-io/kairos-agent/blob/main/pkg/cloudinit/cloudinit.go
  • and I think the main issue is that we may need to change yip to add a new method to accept and generate the dag via bytes directly or stages, instead of via files as its pretty hardcoded currently to read files in the system always

@jimmykarily jimmykarily moved this from Todo 🖊 to In Progress 🏃 in 🧙Issue tracking board Dec 9, 2024
@jimmykarily jimmykarily moved this from In Progress 🏃 to Todo 🖊 in 🧙Issue tracking board Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo 🖊
Development

No branches or pull requests

4 participants