The Perforce Server Deployment Package – Now Available in the Workshop
Image: Tal ETouch via Flickr
The Perforce Server Deployment Package, or SDP, was put together by Perforce Consulting Services as a way to both demonstrate and provide best practices in configuration of Perforce Server environments. It consists of an overall directory structure that is easy to understand and configure. It follows a consistent methodology that works in both single-server and multi-server environments and provides a series of management scripts for Perforce Server and other Perforce products.
The directory structure used by the SDP is based on spreading server data across three disk volumes. These are for metadata, versioned file data, and log/journal data. This is done so if any one volume experiences a problem a full recovery can be assured. In addition, the directory structure used deliberately obfuscates the underlying filesystem mount points so all servers can have a consistent structure. In addition, multiple instances of Perforce can coexist within this structure. For example, on a system where the three volumes are
/logs, the actual data for a server instance called “Proj1” would be stored in
/p4/Proj1/logs. On the same system, another Perforce Server installation called “bingo” could exist, with its data stored in
/p4/bingo/logs. Each of these server instances can be configured completely independently, including different
P4PORT values, case sensitivity settings, versions of p4d, Unicode settings, etc.
The way the data is structured across the three volumes is also important for system backups. It allows one volume,
/depotdata, to contain all versioned file data and checkpoints. Thus, it is the only one that absolutely must be backed up. Backup of the
/logs volume (which also contains the journal file) is optional. By avoiding backup of the
/metadata volume, Perforce administrators are assured that a system backup process does not try to read from the
db.* files directly. Besides, at restore time Perforce always suggests use of checkpoint and journal files rather than copies of the
Management scripts that come with the SDP support a variety of best practices in operation of the Perforce Server. These include offline checkpointing, which allows backups of metadata with no downtime. That has proven to be the most popular SDP script. Other scripts support log and journal rotation, client workspace ageing, server sanity checking, and a variety of other administrative tasks. They can easily be configured to run on a scheduled basis – with email status notifications sent to the Perforce administrators.
In keeping with our mission to help our customers, we recently open-sourced the SDP and it is available in the Perforce Workshop. We hope you look at it and enjoy what you find. You can find the SDP here:
A good overview of the package can be found here:
If you have any contributions to make toward the project, we would love to see them.