Install IPLM Cache

Overview

IPLM Cache is a Python application so does not need Java to be installed.

Step 1: Install IPLM Cache

The IPLM Cache server can be installed with:

Copy
sudo apt install iplm-cache
# The following will also be needed unless they are installed on a different server
sudo apt install iplm-backend-mongodb
sudo apt install iplm-backend-redis

This will create an mdx-admin user if they do not already exist, and a home directory in /var/lib/mdx-admin.

The picache.conf configuration file will be placed in /etc/mdx/picache.conf. The cache server will need to be restarted after any changes are made to this file.

Step 2: Create root directory path

The "root" directory path needs to be created before starting the IPLM Cache server.

Review/Update IPLM Cache settings in /etc/mdx/picache.conf

The "root" configuration option defines the location IPLM Cache will use to populate IPVs on disk, and needs to be defined. The "root" path typically points to a folder exported from filer.

worker-user configuration

  • If "worker-user" is defined, make sure the user has the write permission to the "root" path.

  • If "worker-user" is not defined, make sure user "mdxadmin" has the write permission to the "root" path.

Make sure the mount options allow "worker-user" or "mdxadmin" to write to the root directory. Typically, the "root" path is owned by "worker-user" or "mdxadmin" to avoid any permission problem.

dm-program configuration

"dm-program" needs to point to valid P4 executable

Step 3: Start IPLM Cache

To start IPLM Cache, run the following command:

Copy
sudo systemctl start mdx-backend-redis mdx-backend-mongodb
sudo systemctl start picache

To ensure that IPLM Cache starts automatically after boot, it can be enabled with the following:

Copy
sudo systemctl enable picache
sudo systemctl enable mdx-backend-mongodo
sudo systemctl enable mdx-backend-redis

Step 4: Test IPLM Cache

To check to see if the IPLM Cache server is running, run the following command:

Copy
curl http://localhost:5000/picache/api/v1/info

If it is running, then you should get a JSON response similar to the following command:

Copy
{
  "check_signature": false, 
  "compression": false, 
  "site": "local", 
  "version": "2024.1.0", 
  "project_enabled": false, 
  "root": "/picache-root"
}

Step 5: Configure IPLM Cache for P4D

In anything but the most trivial case, it will be necessary to configure the environment that IPLM Cache uses to communicate with P4D. The simplest way to do this is by using P4 to generate the necessary configuration. This ensures that the configuration is correct. Alternatively, files can be copied in from elsewhere in much the same way as they are done for IPLM PiForce.

Create P4USER

Since IPLM Cache runs as the mdxadmin user, this is the user that it will use to connect to P4D by default. This means that an mdxadmin user needs to be created on the P4D server, and given a long lived ticket. If a different user is to be used, then IPLM Cache needs to be configured to use that user.

Run the following command to create P4USER:

Copy
sudo -u mdxadmin -i
# If you want to use a different user than mdxadmin, then set the P4USER environment variable
echo "export P4USER=mdxuser" >> .bashrc

This user should have a long lived ticket set up. Make sure that they belong to a P4D group that has an unlimited Timeout value.

Create P4TRUST

If the P4D server has SSL enabled, then a .p4trust file will need to be created. The easiest way to do this is to connect to the server and create a new trust file yourself.

Run the following command to create P4TRUST:

Copy
sudo -u mdxadmin -i
p4 -pssl:p4server:1666 trust -fy

Create P4TICKET

If security is enabled on p4d, then a P4TICKET file will be needed to define the session tickets for the user. This should be done after the user has been setup with an unlimited timeout. If the timeout is not changed, then the session ticket will expire after 8 hours.

Run the following command to create P4TICKET:

Copy
sudo -u mdxadmin -i
p4 -pssl:p4server:1666 login

Overriding environment

If environment variables need to be set for PiCache, then this can be done using the override.conf file. For example, create a /etc/systemd/system/picache.service.d/override.conf file with the following:

Copy
[Service]
Environment="MDX_SVN_CMD=/opt/bin/svn"

Next steps

After installing and configuring IPLM Cache, installation is complete.

From here you can: