Re: [RFC] Ideas for new distribuition: base-jail

From: Anish Mistry <mistry.7_at_osu.edu>
Date: Tue, 11 Apr 2006 10:36:34 -0400
On Tuesday 11 April 2006 08:38, Brian Candler wrote:
> On Mon, Apr 10, 2006 at 05:27:18PM -0300, Ricardo A. Reis wrote:
> >    I think in one new distribution, this idea is for decrease
> > create time for start jails after release install, the base-jail
> > is distribute in CD1. After install RELEASE and update with
> > freebsd-update a admin create a jail
> > with ( cd /usr/local/base-jail; make jail DESTDIR=/XXXX ) very
> > fast
>
> How about prototyping this? I offer as a starting point:
>
> -- 8<
> --------------------------------------------------------------
> DISTBASE?=/cdrom
> DESTDIR?=.
> jail:
> 	cd $(DISTBASE)/base && ./install.sh DESTDIR=$(DESTDIR)
> -- 8<
> --------------------------------------------------------------
>
> What else does it need to have? I guess you could automatically add
> jail_* entries in /etc/rc.conf, but it would need to prompt for
> several pieces of information in order to be able to set them all.
>
>     jail_enable="YES"
>     jail_list="foo"
>     jail_foo_rootdir="/XXXX"
>     jail_foo_hostname="foo.example.com"
>     jail_foo_ip="192.168.1.1"
>     jail_foo_exec_start="/bin/sh /etc/rc"
>     jail_foo_exec_stop="/bin/sh /etc/rc.shutdown"
>     jail_foo_devfs_enable="YES"
>     jail_foo_devfs_ruleset="devfsrules_jail"
>
> You might also want to prompt for, and set, the jail's root
> password.
>
> You could copy some key files from the host environment assuming
> they will be the same within the jail (e.g. /etc/resolv.conf,
> /etc/hosts, /etc/localtime)
>
> You might also want a template directory for other files to be
> installed into the jail (e.g. /etc/rc.conf might have
> sshd_enable="YES" as its default), but the contents of these files
> are likely to be very specific to your particular needs. The same
> goes for installing additional distribution sets or packages.
> Perhaps the jail builder could invoke sysinstall somehow, such that
> it can be driven from an install.cfg script.
This isn't done in a Makefile, but a normal shell script but it's what 
I use to setup jails.  It makes setup incredibly simple.  Run it and 
follow the prompts, the non-interactive mode doesn't work yet.
http://am-productions.biz/docs/make-jail.sh

I just updated it to work with the /etc/rc.d/jail changes in CURRENT 
so it might be broken to everything else.  An MFC should be imminent 
for RELENG_6.

I intentionally omitted adding jail_enable="YES" to rc.conf to force 
the user to actually know what they're enabling.

-- 
Anish Mistry

Received on Tue Apr 11 2006 - 12:36:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:54 UTC