Swarm configuration
Now that Swarm is ready for use, you need to configure it to work in your environment.
Swarm configuration file
Create a file named config.php under the data directory with the following contents:
<?php
return array(
'p4' => array(
'port' => 'my-perforce-service:1666
',
'user' => 'admin_userid
',
'password' => 'admin user ticket or password
',
),
'log' => array(
'priority' => 3, // 7 for max, defaults to 3
),
'mail' => array(
'transport' => array(
'host' => 'my.mx.host',
),
),
);
-
For the
port
value, replacemy-perforce-service:1666
with theP4PORT
value used to connect to your Perforce service. -
For the
user
value, replaceadmin_userid
with a Perforce userid that has admin-level access to the Perforce service. -
For the
password
value, while a plain-text password works, we recommend that you use a ticket value instead. Obtain the ticket value for theadmin_userid
during login with this command:$ p4 -u
admin_userid
login -pNote
For a Perforce service with the
security
configurable set to level 3, ticket-based authentication is required.Important: When using ticket-based authentication, ensure that the ticket has a very long expiration. An expired ticket causes many Swarm operations to fail.
You can determine when the
admin userid
's ticket will expire with:$ p4 -u
admin_userid
-Pticket_value
login -s -
For the
host
value, replacemy.mx.host
with the hostname of the mail exchanger service that Swarm should use to send its email notifications.
Note
Since this configuration file contains the credentials for a Perforce admin-level user, we recommend that this file's ownership and permissions be adjusted such that only the web server user can read the file, and that no user can write the file.
Optional additional Swarm configuration
Swarm provides optional functionality that could be enabled at this time: