Configuring the build server

  1. Create a checkpoint of the master server.

    p4 admin checkpoint or p4d -jc

    For more information, see Backup and recovery concepts and Checkpoint files.

  2. Restore from that checkpoint on the machine that the build server will run on:

    p4d -jr checkpoint_file

  3. Copy the versioned files from the master server to the build server.

    On Linux, cp -R /master/depot /replica/depot/

    On Windows, Xcopy /E /I C:/master/depot C:/replica/depot

    Versioned files include both text (in RCS format, ending with ,v) and binary files (directories of individual binary files, each directory ending with ,d). Ensure that you copy the text files in a manner that correctly translates line endings for the replica host’s filesystem.

    If your depots are specified using absolute paths on the master, use the same paths on the build server. (Or use relative paths in the Map: field for each depot, so that versioned files are stored relative to the server’s root.)

  4. Start the Helix Core(p4d) server on the build server machine using the P4PORT value of build:1667 and both the -n and -d options:

    $ p4d -p build:1667 -n -d

    Note

    The -n option is necessary until we set the serverid to correspond to a type of server that does not need a license.

  5. Set the serverid for the build server:

    $ p4 -p build:1667 serverid build-1667

  6. Confirm that the serverid is correctly set.

    $ p4 -p build:1667 serverid

    The output should be:

    Server ID: build-1667

  7. Log the service user into the master server using the location of the tickets file you specified in the "Spec configuration" section of Configuring the master server for the build server:

    $ p4 -p master:1666 -E P4TICKETS=/p4/.p4tickets login service

  8. On the build server, stop the server:

    $ p4 -p build:1667 admin stop

  9. Restart the server on the build server:
  10. $ p4d -p build:1667 -d

  11. Confirm that the p4 pull commands specified in the build-1667 startup.N configurations are running:

    $ p4 -p build:1667 monitor show -a

    The output should be similar to this:

    18835 R service00:04:46 pull -i 1
    18836 R service00:04:46 pull -u -i 1
    18837 R service00:04:46 pull -u -i 1
    18926 R super 00:00:00 monitor show -a
  12. Confirm that the build server is replicating.

    $ p4 -p build:1667 pull -l -j

    The output should be in this format, with the replica sequence matching (or being close to) that of the master.

    Current replica journal state is:    Journal 511,    Sequence 29233313
    Current master journal state is:    Journal 511,    Sequence 29233313.
    The  statefile was last modified at:    2019/10/22 15:19:55.
    The replica server time is currently:    2019/10/22 15:19:59 +0100 BST
    

Next step

Binding workspaces to the build server