Open erik-stephens opened 8 years ago
Hi, supporting Gentoo is definitely in the scope of Butterknife. I am just mainly focusing on Ubuntu/Debian and another developer is focused on Arch but additional distributions are welcome. What is the purpose of this DiskCfgResource, what is the problem you're trying to solve?
I work with a lot of leased systems and can't ship pre-configured disks. I couldn't find anything in the docs or code to suggest that I can specify how the disks are sw-raided and partitioned. Preferably it would be completely hands-free similar to kickstart, but if not, having the ability to drop into a shell and do it manually would be an improvement to our workflow.
Also, the more I think about it, the more I like the the ability for custom pre-install code to execute. Should be able to tackle this disk configuration use case as well as things like an automated pre-install sanity check, pre-registration, etc.
Are there ways to tackle that currently? If not, is it in the scope of what you'd like Butterknife to do? I want to get a sense before hacking away how welcome a change like this would be as well as to implement in a way that's aligned with your vision of how it should be.
Hi, currently some partitioning methods are supported as seen here: https://github.com/laurivosandi/butterknife/blob/master/provision/overlay/sbin/butterknife-provision#L53 I would welcome software RAID setups and other scenarios here.
So far I've made several aspects of the deployment preconfigurable via kernel arguments, so you can specify arguments eg. in PXELINUX menu and have almost completely handsfree deployment eg https://github.com/laurivosandi/butterknife/blob/master/provision/overlay/sbin/butterknife-provision#L203
I'm thinking of adding support for a bk_preinstall option which would pull down a pre-install script from the Butterknife api. In that script, I could setup the disks to my liking. Then setting PARTITIONING_METHOD=receive should work like normal?
I've already stumbled on a situation where having install to Btrfs pool spanning over multiple disks would be convenient, hence I think additional partitioning methods to the menu would be beneficial for others as well.
Of course having provisioning image fetch arbitrary file from the server and execute it would be nice addition to the mix. How about adding HTTP API call for serving individual files from the template and have opportunity to execute a file fetched via that call with all the relevant environment variables put in place? Alternatively we can just have bk_partitioning_script=http://bla
which could simply download a script from arbitrary URL and execute it, that's even easier to implement. Note that for exotic setups we also need to include relevant utilities in the provisioning image which is currently built with Buildroot.
Once the filesystems are set then yes, PARTITIONING_METHOD=receive
would suffice.
We're moving in another direction. Not sure if you'd like this left open if I'm not around to champion it. Feel free to close this issue.
I'm looking for something to help with automation of bare metal systems for my gentoo friends. Even for distros that support fully automated installs, butterknife's approach is more appealing to me than something like kickstart. Is this in the scope of this project? If so, are there currently any plans?
If I were to hack on support for this, I guess I would add something like DiskCfgResource to the api for the provision script to read. A DiskCfg would simply be a shell script to run.
Maybe adding support for pre & post hooks is a better way to address this need. I'm curious to hear your thoughts.