Using multiple configuration files
You can modularize your configuration by creating multiple configuration
files and directories and having include statements in your /etc/perforce/p4dtcl.conf configuration file.
-
To include a specific file, use the following syntax:
include pathToFile
-
To include directories, use the following syntax:
include directoryPath
When including directories,
p4dctlrequires that names for files included end with the.confextension.
The following example shows a multiple file configuration.
Environment
{
PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/sbin
}
include /etc/perforce/p4dctl.conf.d
The include reference causes Helix P4DCTL to pick up further configuration from any .conf files in the directory specified.
The sub-directory /etc/perforce/p4dctl.conf.d contains a file called README with example content for a server .conf file that can be placed in the directory. That directory will also contain template files where packages have been used for installation of other Helix Core products. These can be used as the basis for your own configuration.
| Package Name | Template File |
|---|---|
helix-p4d
|
p4d.template
|
helix-proxy
|
p4p.template
|
helix-broker
|
p4broker.template
|
The content of the template files for p4d, p4p, and is shown below with placeholders:
| Placeholder | Description |
|---|---|
%NAME%
|
service name |
%ROOT%
|
P4ROOT directory |
%TARGET%
|
P4TARGET Helix Core Server port for the proxy |
%PORT%
|
P4PORT that the service is listening on |
#-------------------------------------------------------------------------------
# Template p4dctl configuration file for Helix Core Server
#-------------------------------------------------------------------------------
p4d %NAME%
{
Owner = perforce
Execute = /opt/perforce/sbin/p4d
Umask = 077
# Enabled by default.
Enabled = true
Environment
{
P4ROOT = %ROOT%
P4SSLDIR = ssl
PATH = /bin:/usr/bin:/usr/local/bin:/opt/perforce/bin:/opt/perforce/sbin
# Enables nightly checkpoint routine
# This should *not* be considered a complete backup solution
MAINTENANCE = true
}#-------------------------------------------------------------------------------
# Template p4dctl configuration file for Helix Core Proxy
#-------------------------------------------------------------------------------
p4p %NAME%
{
Owner = perforce
Execute = /usr/sbin/p4p
Umask = 077
Environment
{
P4PCACHE=/opt/perforce/servers/%NAME%/
P4TARGET=%TARGET%
P4PORT=%PORT%
PATH=/bin:/usr/bin:/usr/local/bin
}
}#-------------------------------------------------------------------------------
# Template p4dctl configuration file for Helix Core Broker
#-------------------------------------------------------------------------------
p4broker %NAME%
{
Owner = perforce
Execute = /usr/sbin/p4broker
Umask = 077
Environment
{
P4BROKEROPTIONS = "-c /opt/perforce/servers/%NAME%/broker.conf"
P4SSLDIR = ssl
PATH = /bin:/usr/bin:/usr/local/bin
}
# Enabled by default.
Enabled = true
}






