pkg-server jail, path, zfs datasets

News and Announcements related to GhostBSD
Post Reply
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

pkg-server jail, path, zfs datasets

Post by ASX »

currently on the webserver, the jails base is:
/usr/home/jails

and the pkg-server jail rootdir should be:
/usr/home/jails/gbsd-repos
usr and home are zfs datasets on the webserver
jails was created from ezjail-admin, actually is not a ZFS dataset
gbsd-repos is the jail name and the path /usr/home/jails/gbsd-repos is jail rootdir

on the builder we have:
/builder/jails/gbsd-repos/build/var-i386/log/synth
/builder/jails/gbsd-repos/build/var-i386/db/ports
/builder/jails/gbsd-repos/build/repositories/i386/build
/builder/jails/gbsd-repos/build/repositories/amd64/build
/builder/jails/gbsd-repos/build/var-amd64/db/ports
/builder/jails/gbsd-repos/build/var-amd64/log/synth

- builder is a ZFS dataset, I'm requiring it to make 'portable' the builder configuration easily.
- jails is a ZFS dataset but there is no need for it at all
- gbsd-repos is a dir and was created to match the webserver, but there is no need for it.
- build is a dir, and can be removed
- repositorries is a dir, required to match the freebsd-repo tree structure, will be the root dir for apache, we will make it a ZFS dataset.
- i386 and amd64 contains the respective pkgs repo, we will make them two ZFS datasets to easily transfer the repos
- var-amd64/log/synth will become amd64/log and i386/log where i386 and amd64 are the two dataset mentioned above.
- var-amd64/db/ports will become amd64/ports, same as above.
- amd64/options and i386/options will be created, same as above.
- the final "build" was supposed to differentiate between buiid,test,current and previous, there is no need anymore for that and we will drop this dir.

################################

so the final configuration on the builder will be:
/builder/amd64/pkgs
/builder/amd64/ports
/builder/amd64/options
/builder/amd64/logs
/builder/i386/pkgs
/builder/i386/ports
/builder/i386/options
/builder/i386/logs

those in bold are ZFS datasets, after that we can use something like this:

Code: Select all

zfs snap pool/builder/amd64@ready
zfs send pool/builder/amd64@ready |
                     ssh webserver zfs recv zroot/usr/home/jails/gbsd-repos/repositories/(amd64)
zfs destroy pool/builder/amd64@ready
to be continued
User avatar
ericbsd
Developer
Posts: 2058
Joined: Mon Nov 19, 2012 7:54 pm

Re: pkg-server jail, path, zfs datasets

Post by ericbsd »

Thanks for the information.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: pkg-server jail, path, zfs datasets

Post by ASX »

ericbsd wrote:Thanks for the information.
Actually I was trying to provide info to myself, trying to put togheter the requirements coming from:
- me (buidler dataset)
- ezjail
- apache
- pkg repository structure
- keeping all data on the same dataset, per arch (pkgs, ports, options, logs)
- zfs send /receive

I had difficult to do that without writing it down. ;)
User avatar
ericbsd
Developer
Posts: 2058
Joined: Mon Nov 19, 2012 7:54 pm

Re: pkg-server jail, path, zfs datasets

Post by ericbsd »

At less I have the information of what you are doing.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: pkg-server jail, path, zfs datasets

Post by ASX »

ericbsd wrote:At less I have the information of what you are doing.
Yes, in fact it is better that I'm not the only one to know about.
I have edited my post since then.
User avatar
ericbsd
Developer
Posts: 2058
Joined: Mon Nov 19, 2012 7:54 pm

Re: pkg-server jail, path, zfs datasets

Post by ericbsd »

Yea I have notice.
ASX
Posts: 988
Joined: Wed May 06, 2015 12:46 pm

Re: pkg-server jail, path, zfs datasets

Post by ASX »

ericbsd wrote:Yea I have notice.
Due to "zfs receive" requirements we need that all dirs in the destination path are zfs datasets.
I will perform the required maintenance on the webserver to met those requirements, most likely I will need to reboot/restart the webserver at some point. No interruption of the service, except for the reboot/restart time.
Post Reply