How to set up a split depot in OPSI software distribution that separates public from custom files

January 30, 2012

If you install OPSI packages on the OPSI server, they will be extracted to the depot directory/opt/pcbin/install. For some packages it’s necessary to place customized files inside this area (e.g. /opt/pcbin/install/[package]/custom/myconfig.cfg).  In this situation, OPSI depot and packages are mixed up with private, individual files. The solution for this is a split depot which prevents custom related files from mixing up with OPSI packages.

To separate the OPSI packages from the custom files, we setup a unionfs file system and publish two directories as one, read-only aggregation file system. This could be a issue for maintenance, update or privacy reasons.DT Netsolution GmbH, as a partner of uib gmbh, uses the solution described here  in all custom projects.

Installation of unionfs

Install the requirered packages of unionfs-fuse on a CentOS system for compiling unionfs

Download and install unionfs

To automatically load the module, add this line to /etc/modprobe.d/fuse.conf:

To manually load the module simply run

Configure the aggregated OPSI depot

Create a depot directory containing the customized files.

Mount the new, aggregated depot to a new mount point

Mount example 1:

Mount example 2:

Automount aggregated depot through /etc/fstab:

Important: the previous lines  must be in one line inside /etc/fstab separated by spaces!

Testing aggregated OPSI depot

Check, if you can access the new filesystem

Check functionally using the swdaudit project by creating a custom file and validate the aggregated file system:

Now run some checks

Configure samba service to use the aggregated depot

Setup samba to use this new file system. Add this entry /etc/samba/smb.conf:

Restart samba

Test using a OPSI client PC

On a windows client PC. connect to the OPSI depot network share \\<opsi-server\opsi_depot> and check the directory swaudit\custom. You should have read-only access to the test file MY_INDIVIDUAL_FILE.txt located in the individual/private directory on the OPSI-server.

This page: Print Send by email Share on: