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

Move elemental-cli to kairos as a pkg and archive the repo #1210

Closed
Tracked by #1454
jimmykarily opened this issue Mar 29, 2023 · 8 comments · Fixed by kairos-io/kairos-agent#13
Closed
Tracked by #1454

Move elemental-cli to kairos as a pkg and archive the repo #1210

jimmykarily opened this issue Mar 29, 2023 · 8 comments · Fixed by kairos-io/kairos-agent#13
Assignees

Comments

@jimmykarily
Copy link
Contributor

jimmykarily commented Mar 29, 2023

Plan:

-We will create a new binary called kairos-register which is the only thing the user should ever have to install on their workstation. It’s the binary that will be used to register a node (e.g. using QR code). kairos-agent will become simply kairos with all the subcommands it currently has plus the functionality that will be moved from elemental-cli. Additionally, it’s going to have a new lifecycle subcommand which is going to be what elemental-cli used to be (just the low level functionality). Optionally we could have a check, when the user runs this kairos binary outside a Kairos OS, it should print a warning and wait for confirmation. The elemental-cli code will be moved to a pkg in the kairos repository.

Acceptance Criteria

  • kairos-agent becomes kairos
  • elemental-cli repo is archived
  • new kairos binary has a lifecycle subommand that does what elemental-cli used to do
  • The elemental-cli repo tests are now part of the kairos repo and they run when they have to run

[Optional - maybe move to other issues]

  • move non-low-level functionality from lifecycle to top level kairos command
  • show a warning when kairos binary is executed outside a Kairos OS
@Itxaka
Copy link
Member

Itxaka commented Apr 19, 2023

I do not remember this, but having it separated would be nicer? Wasnt that the point of trying to extract the sdk stuff so we dont:

  • rebuild the whole kairos on sdk changes
  • keep OS code and tools code in the same repo
  • have everything installed in the OS by luet packages

I think we need to rediscuss this becuase otherwise I dont think its the best way forward.

@jimmykarily
Copy link
Contributor Author

Blocked by: #1346 (we first extract the kairos-agent to an new repository and then move elemental-cli code there)

@Itxaka
Copy link
Member

Itxaka commented Apr 26, 2023

No longer blocked!

@Itxaka Itxaka removed the blocked label Apr 26, 2023
@jimmykarily jimmykarily self-assigned this May 2, 2023
@jimmykarily
Copy link
Contributor Author

These are the current elemental-cli commands:

  build-disk   Build a raw recovery image
  build-iso    Build bootable installation media ISOs
  cloud-init   Run cloud-init
  completion   Generate the autocompletion script for the specified shell
  convert-disk converts between a raw disk and a cloud operator disk image (azure,gce)
  help         Help about any command
  install      Elemental installer
  pull-image   Pull remote image to local file
  reset        Reset OS
  run-stage    Run stage from cloud-init
  upgrade      Upgrade the system
  version      Print the version

These are the ones I think belong to the kairos-agent lifecycle command:

  cloud-init   Run cloud-init
  install      Elemental installer
  pull-image   Pull remote image to local file
  reset        Reset OS
  run-stage    Run stage from cloud-init
  upgrade      Upgrade the system

@Itxaka do you agree?

@Itxaka
Copy link
Member

Itxaka commented May 2, 2023

@jimmykarily agreed. In fact cloud-init can also be dropped as I don't think it's used anywhere, only the run-stage

Alós there is a PR for this already but needs manual QA

@jimmykarily
Copy link
Contributor Author

Thanks @Itxaka, I linked the issue with the PR now. Please remember to update issues when you work on them to avoid other people working on the same things.

@Itxaka
Copy link
Member

Itxaka commented May 2, 2023

Sorry! Was gonna do it tonight but forgot that it's a local holiday and you folks are working 😂

@Itxaka
Copy link
Member

Itxaka commented May 5, 2023

libs merged, needs maybe the pull-image command to be exposed, but install/upgrade/reset are hooked to the old agent commands

@mudler mudler mentioned this issue May 26, 2023
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants