February 6, 2015

The Perforce Server Deployment Package – Now Available in the Workshop

What's New
E-Commerce
Helix Core

server room image
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 /metadata/depotdata and /logs, the actual data for a server instance called “Proj1” would be stored in /p4/Proj1/root/p4/Proj1/depots and /p4/Proj1/logs. On the same system, another Perforce Server installation called “bingo” could exist, with its data stored in /p4/bingo/root/p4/bingo/depots and /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 db.* files.

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:

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/

A good overview of the package can be found here:

https://swarm.workshop.perforce.com/projects/perforce-software-sdp/view/main/README.html

If you have any contributions to make toward the project, we would love to see them.