Probably the "preferred" way would be to use the same tools we do. I.e. TKLDev. There is a doc page that provides a bit more info and links to further docs.
Essentially, that path will require scripting the entire build process including regenerating "secrets" and passwords. Although depending on what your appliance includes, much of the heavy lifting is already done for you (via our existing build code). So you can leverage what we've done already. The other advantage of going that route will mean that you could distribute your new appliance in any of our supported build types (not just OVA and/or ISO).
If you're interested in that approach, are using only open source components and think that there may be value to a broader audience, then I'm also happy to further discuss making your appliance part of the official TurnKey library. Either way though, I'm more than happy to give you some guidance and advice, even if adding it to the library isn't an option.
If that seems like "too much" and if you're ok with distributing as an OVA (or VM - rather than ISO) then another (easier) option would be to to just configure the existing firstboot scripts (i.e. inithooks) to rerun on (next) firstboot. That simply requires you to change the value of RUN_FIRSTBOOT in /etc/default/inithooks to true (see here).
To be complete, that would still require you to write scripts to regenerate any "secrets"/passwords on firstboot for any additional software which you install (which aren't already covered by the existing scripts).
If you wanted to create an ISO, then that is still possible, although TBH, I've never done it, so can't provide much insight. There is an old blog post by Alon, but it's quite dated so I'm not sure how much of it would still work... Regardless, it should still be possible, but would likely require a bit of research and trial-and-error.
Hi Alex
Probably the "preferred" way would be to use the same tools we do. I.e. TKLDev. There is a doc page that provides a bit more info and links to further docs.
Essentially, that path will require scripting the entire build process including regenerating "secrets" and passwords. Although depending on what your appliance includes, much of the heavy lifting is already done for you (via our existing build code). So you can leverage what we've done already. The other advantage of going that route will mean that you could distribute your new appliance in any of our supported build types (not just OVA and/or ISO).
If you're interested in that approach, are using only open source components and think that there may be value to a broader audience, then I'm also happy to further discuss making your appliance part of the official TurnKey library. Either way though, I'm more than happy to give you some guidance and advice, even if adding it to the library isn't an option.
If that seems like "too much" and if you're ok with distributing as an OVA (or VM - rather than ISO) then another (easier) option would be to to just configure the existing firstboot scripts (i.e. inithooks) to rerun on (next) firstboot. That simply requires you to change the value of
RUN_FIRSTBOOT
in /etc/default/inithooks totrue
(see here).To be complete, that would still require you to write scripts to regenerate any "secrets"/passwords on firstboot for any additional software which you install (which aren't already covered by the existing scripts).
If you wanted to create an ISO, then that is still possible, although TBH, I've never done it, so can't provide much insight. There is an old blog post by Alon, but it's quite dated so I'm not sure how much of it would still work... Regardless, it should still be possible, but would likely require a bit of research and trial-and-error.