ployground / ploy

A tool to manage servers through a central configuration. Plugins allow provisioning, configuration and other management tasks.
http://ploy.readthedocs.org
BSD 3-Clause "New" or "Revised" License
78 stars 15 forks source link

[enhancement] Add support for plain jails #33

Open keltia opened 9 years ago

keltia commented 9 years ago

Some people find ezjail more of an hindrance to manage upgrades compared to "plain jails". There is also the fact that ezjail supports only one base jail which makes mixing versions and/or archs more difficult. It would be nice if ploy could work with plain jails too.

tomster commented 9 years ago

yes, this topic has come up elsewhere already, too and i'm very much in favour of adding it but i'm still not sure what approach to take.

implementing the create / start / stop / terminate lifecycle should be trivial enough.

i'd probably go for implementing it as a plugin (ploy_jail?) , though, so people could chose which jail implementation to use (i.e. CBSD and also because technically BSDploy is in no way limited to FreeBSD.

what would you expect 'plain jail' support to look like? i.e. what would configuring a jailhost in that scenario entail in your mind?

fschulze commented 9 years ago

I'd also say we should definitely do this in another plugin. I think the hardest part is the jail creation. There are quite a few ways to do it. The thing ezjail does is having an opinion on how to do it, which is the basejail with null mounts approach. How would one handle that for the general case?

tomster commented 9 years ago

i definitely like the nullfs mount approach. the flexibility of mapping ZFS filesystems (in)to jails is very powerful.

but then again, if you really want that you can always just use ezjail :)

OTOH i really wouldn't mind using a non-ezjail approach myself, but for me the nullfs mount feature is a must-have...

keltia commented 9 years ago

The thing is, in the freebsd project, we use jails a lot and we have found that ezjail is not flexible enough (only one basejail for example) and harder to update than "plain" jails. In fact, we just converted all 100-ish jails to plain ones. I guess my problem is more with ezjail than bsdploy in fact :) So flexibility would be better.

fschulze commented 9 years ago

So, how do you use jails now? I would be really interested in how you create the jails now. A plugin that only implements start (without create), stop, terminate, ssh etc is pretty simple, but I'm not sure without create it's that useful.

fschulze commented 9 years ago

Oh and just FYI: I have things brewing in my head for ploy 2.0 based on my experience so far and what I see others doing, which would make it all much simpler overall.