sampledoc

Client Tool Drivers

Client tool drivers allow Bcfg2 to execute configuration operations by interfacing with platform and distribution specific tools.

Tool drivers handle any reconfiguration or verification operation. So far we have tools that primarily deal with packaging systems and service management. The POSIX tool also handles file system and permissions/groups operations.

To write your own tool driver, to handle a new packaging format, or new service architecture see Writing A Client Tool Driver

When the Bcfg2 client is run, it attempts to instantiate each of these drivers. The succeeding list of drivers are printed as a debug message after this process has completed. Drivers can supercede one another, for example, the Yum driver conflicts (and unloads) the RPM driver. This behavior can be overridden by running the Bcfg2 client with the -D flag. This flag takes a colon delimited list of drivers to use on the system.

Currently these are the tool drivers that are distributed with Bcfg2:

Action

Pre and post-install tests and actions. This driver executes commands and supplies status information to the Bcfg2 server via the statistics mechanism. It can also be used to prevent bundle installation when pre-conditions are not met. See the UsingActions page for more details.

APK

This tool driver is used to handle packages on apk based systems like Alpine Linux and employs the “apk” executable. Extra information can be found at apk-tools.

APT

Debian Packages. This tool driver is used to handle packages on dpkg based systems and employs the “apt” executable. Extra information can be found at APT Client Tool.

Blast

Blastwave Packages. This tool driver is for blastwave packages on solaris

Chkconfig

Tool to manage services (primarily on Redhat based distros).

Note

Start and stop are standard arguments, but the one for reload isn’t consistent across services. You can specify which argument to use with the target attribute in Service tags. Example:

<Service name="ftp" target="condrestart" status="on" type="chkconfig"/>

DebInit

Debian Service Support; exec’s update-rc.d to configure services.

Encap

Encap Packages.

FreeBSDInit

FreeBSD Service Support. Only bundle updates will work.

FreeBSDPackage

FreeBSD Packages. Verifies packages and their version numbers but can’t install packages.

launchd

Mac OS X Services. To use this tool, you must maintain a standard launch daemon .plist file in /Library/LaunchDaemons/ (example ssh.plist) and setup an entry in your config to load or unload the service.

<Service name="com.openssh.sshd" type="launchd" status="on"/>

Note the name is the Label specified inside of the .plist file

Portage

Support for Gentoo Packages.

POSIX

Files and Permissions are handled by the POSIX driver. Usage well documented other places.

RcUpdate

Uses the rc-update executable to manage services on distributions such as Gentoo.

RPM

Executes RPM to manage packages on Redhat-based and similar systems. Consider using the YUM tool instead if possible.

SMF

Solaris Service Support.

Example legacy run service (lrc):

<Service name='/etc/rc2_d/S47pppd' FMRI='lrc:/etc/rc2_d/S47pppd' status='off' type='smf'/>

Systemd

Systemd service support.

SYSV

Handles System V Packaging format that is available on Solaris.

Note

If the Packages specified in the PackageList are datastream format packages distributed via HTTP, you must specify a simplefile attribute. Such packages will be downloaded and installed from a local path.

Note the use of the uri attribute in the datastream format example. If the simplefile attribute exists, the Pkgmgr plugin will automatically construct the url attribute by concatenating the uri and simplefile attributes (with an intervening slash).

Datastream format over HTTP:

<PackageList uri='http://install/packages' type='sysv' priority='0'>
    <Package name='SCbcfg2' version='1.3.4' simplefile='bcfg-1.3.4-1' />
</PackageList>

File system format over NFS or local path:

<PackageList url='/mnt/install/packages' type='sysv' priority='0'>
    <Package name='SCbcfg2' version='1.3.4' />
</PackageList>

Upstart

Upstart service support. Uses Upstart to configure services.

YUM

Handles RPMs using the YUM package manager. See Bcfg2 RPM/YUM Client Drivers for more details.

Table Of Contents

Previous topic

Client modes

Next topic

Actions

This Page