Controlling P4 DAM and Perforce TeamHub

As described in the System architecture section, P4 DAM is composed of popular open-source technologies. P4 DAM runs and monitors a number of services, which are responsible for executing user requests, scheduling, and running background operations.

P4 DAM comes with the hth-ctl tool, which helps manage services and configuration, and aids in performing administrative tasks. This is the same tool used during P4 DAM installation and upgrades.

Control commands

Some control commands are destructive. Be extremely careful when executing unfamiliar switches.

To retrieve the list of all of the available commands, run sudo hth-ctl as the TeamHub user. To run a control command, run sudo hth-ctl <command> as the TeamHub user.

The most commonly used commands are listed below:

  • status - Show the status of all the services.
  • report - Generates system report for troubleshooting.
  • service-list - List all the services (enabled services appear with a *).
  • show-config - Show the configuration that would be generated by reconfigure.
  • tail - Watch the service logs of all enabled services.
  • start - Start services if they are down, and restart them if they stop.
  • restart - Stop the services if they are running, then start them again (causes slight downtime).
  • reconfigure - reconfigures P4 DAM after upgrading the package. Applies changes after configuration has been updated.

Services

P4 DAM runs and monitors a number of services using the runit service supervision tool. The list below outlines all available services on the P4 DAM servers. In Enterprise deployment, the services will be spread across the Web and DB roles.

  • anycable - Daemon for WebSocket connections together with moonshine.
  • apache - Apache Web server for handling version control operations.
  • docker_registry - Daemon for Docker repositories.
  • ldap - Daemon for LDAP protocol of the TeamHub LDAP interface, Perforce TeamHub only.
  • ldaps - Daemon for LDAPS protocol of the TeamHub LDAP interface, Perforce TeamHub only.
  • logrotate - Logrotate daemon for rotating application logs.
  • maven - Daemon for Maven repositories.
  • mongodb - MongoDB database stores entire application data.
  • moonshine - Daemon for WebSocket connections together with anycable.
  • nginx - Nginx proxies all users requests to other services.
  • redis - Redis database stores intermediate data, such as background jobs and events.
  • resque - Processes background jobs, such as hooks, notifications, events, backups.
  • resque_scheduler - Schedules resque background jobs.
  • streamer - Daemon for streaming files.
  • unicorn_backend - Unicorn Web server serving TeamHub APIs, including authorization.