OK I track RELENG_9, and -CURRENT (11).
My procedure for updating my local servers has been using bare metal; I built a box out of spares, and simply preform fresh installs, followed by a build/install world/kernel. When/If all is well, I simply drop to single-user, and perform a dump(8). Which I can simply restore(8) on the other boxes. This has worked pretty well for me, for a couple years, now. But it still requires me to do the ports-mgmt/portmaster dance, or build ports fresh, from a ports list.
As it is now, I'm now maintaining greater than 50 ports. So I think I'd do well to revise my strategy, and I think jail(8)s might be the best solution. Not only for world/kernel, but for ports, as well.
Which brings me to my question;
I've looked at, and tried ports-mgmt/poudriere, but it's just not my cup of tea. It doesn't work the way I do, nor bend to my needs (easily). I see sysutils/ezjail is quite popular, and I can imagine why. But given I'm not real familiar with utilizing jail(8)s on FreeBSD. I'd like to start from start. So I can get a keen understanding on doing it the FreeBSD way. That said;
What would be the best setup to accomplish creating a jail, or jails to simply be a world/kernel builder, and maybe also, a port/package maker?
This is what I imagine so far:
I have a 1 TB drive dedicated for all this, mount(8)ed as
/1tb
build/install world/kernel on the host box
followed by:
I'll need to disable most of the services listed in the jails /etc/rc.conf. But I'm not sure the ideal setup. They won't need much, except the ability to svn(1) up src, and ports.
Speaking of /etc/rc.conf, I'll need to enable jails on the host. Will the following get it?
According to jail.conf(5), /etc/jail.conf should look like:
As to the host.hostname, and ip4.address;
will simply inventing a hostname, and listing it in hosts(5) (/etc/hosts), assigning 127.0.0.2 as ip4.address, be adequate?
Will all this work? Any critique, or advice would be greatly appreciated.
Thank you!
--Chris
My procedure for updating my local servers has been using bare metal; I built a box out of spares, and simply preform fresh installs, followed by a build/install world/kernel. When/If all is well, I simply drop to single-user, and perform a dump(8). Which I can simply restore(8) on the other boxes. This has worked pretty well for me, for a couple years, now. But it still requires me to do the ports-mgmt/portmaster dance, or build ports fresh, from a ports list.
As it is now, I'm now maintaining greater than 50 ports. So I think I'd do well to revise my strategy, and I think jail(8)s might be the best solution. Not only for world/kernel, but for ports, as well.
Which brings me to my question;
I've looked at, and tried ports-mgmt/poudriere, but it's just not my cup of tea. It doesn't work the way I do, nor bend to my needs (easily). I see sysutils/ezjail is quite popular, and I can imagine why. But given I'm not real familiar with utilizing jail(8)s on FreeBSD. I'd like to start from start. So I can get a keen understanding on doing it the FreeBSD way. That said;
What would be the best setup to accomplish creating a jail, or jails to simply be a world/kernel builder, and maybe also, a port/package maker?
This is what I imagine so far:
I have a 1 TB drive dedicated for all this, mount(8)ed as
/1tb
build/install world/kernel on the host box
followed by:
Code:
mkdir -p /1tb/jails/`uname -rK | sed s/\ /\-/g`
cd /usr/src
make installworld -DESTDIR=/1tb/jails/`uname -rK | sed s/\ /\-/g`
make installkernel -DESTDIR=/1tb/jails/`uname -rK | sed s/\ /\-/g`
cd /
cp -Rp /usr/src /1tb/jails/`uname -rK | sed s/\ /\-/g`/usr/src
cp -Rp /usr/ports /1tb/jails/`uname -rK | sed s/\ /\-/g`/usr/ports
mount -t devfs devfs /1tb/jails/`uname -rK | sed s/\ /\-/g`/dev
I'll need to disable most of the services listed in the jails /etc/rc.conf. But I'm not sure the ideal setup. They won't need much, except the ability to svn(1) up src, and ports.
Speaking of /etc/rc.conf, I'll need to enable jails on the host. Will the following get it?
Code:
jail_enable="YES" # Set to NO to disable starting of any jails
jail_list="The Output of `uname -rK | sed s/\ /\-/g`"
According to jail.conf(5), /etc/jail.conf should look like:
Code:
`uname -rK | sed s/\ /\-/g` { # something like: 9.3-STABLE-903504
path = /1tb/jails/`uname -rK | sed s/\ /\-/g`;
mount.devfs;
host.hostname = localhost;
ip4.addr = xxx.xxx.xxx.xxx;
interface = nfe0;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
will simply inventing a hostname, and listing it in hosts(5) (/etc/hosts), assigning 127.0.0.2 as ip4.address, be adequate?
Will all this work? Any critique, or advice would be greatly appreciated.
Thank you!
--Chris
Last edited by a moderator: