Support OS-agnostic onboarding/inventory usage
Raising an issue with more use-case details as requested after discussion around https://github.com/rancher/elemental-operator/pull/516
Elemental provides a number of compelling features, some of which are tightly coupled to the base OS (such as image based updates and reset), others such as onboarding/inventory functionality are not necessarily coupled to the choice of base OS, and could potentially be decoupled to enable operation with other OS targets (such as vanilla SLEMicro).
As a potential user of Elemental, I may have several reasons for preferring flexibility to choose an alternate OS:
- Existing operational/toolchain investment - not all users are ready for the operational cost of migrating to an image-based solution, particularly if it must be maintained in addition to some other OS (environments where not all deployments are via Elemental)
- Some users have advanced customization needs, such as installing custom packages and drivers - this could potentially be achieved via the image based flow, but would require an automated way to layer customisations on top of every base-OS update to avoid undue operational friction compared with the corresponding package-based flow (does such a capability exist today in Elemental?)
- Some customers have vendor support/certification requirements which would be complicated by supporting another OS variant with a different packaging/update strategy
My proposal is we consider adding the capability to register pre-installed hosts (main focus area is vanilla SLEMIcro for now, but could apply to other platforms), with a flow like:
- Pre-installed OS with first-boot configuration (which installs
elemental-registerandelemental-system-agent) elemental-registeris run with a flag to indicate "no install" or similar, so we can register the system but opt out of all day-2 operations coupled to the choice of OS- The machine is registered and exposed as normal via
MachineInventorybut with an annotation to indicate OS management is disabled - MachineInventory can be consumed as normal to enable cluster bootstrap via
elemental-system-agent - All day-2 operations are out of scope for Elemental (achieved via other methods, for example rancher system-upgrade-controller)
Checklist of tasks to complete:
- [x] Add CLI option to disable OS install/management (current suggestion from #516 discussion is
--no-toolkit) - [x] Add MachineInventory annotation to reflect unmanaged state of hosts registered with the new option (I chose
elemental.cattle.io/os.unmanagedin #516) - [x] Modify controller behaviour to consume the unmanaged annotation to disable Reset
- [x] Update tests to ensure coverage of the new feature
- [ ] Update docs to describe the new CLI flag and annotation