LGTM Enterprise 1.19.2

Services

The LGTM cluster runs services to handle different types of request. In a basic deployment, all services may run on a single machine. In a larger deployment, services may run on separate machines. The location of each service is specified by the host names in the cluster configuration file. For information about editing this file and deploying a new configuration, see Editing and deploying the cluster configuration.

Summary

The following table describes each service and shows which block of the cluster configuration specifies its location:

Service Block Description
lgtm-scheduler coordinator

Scheduling service—runs periodic tasks at set intervals.

lgtm-webapp web

Web application—handles requests to the LGTM web interface and also processes the results of tasks and jobs.

lgtm-worker@ workers

Worker services—retrieve tasks from the job dealer and run them. This is a templated service with an instance for each LGTM worker running on the machine.

minio file_storage

File storage service—provides storage of frequently accessed data. This gives immediate access to repositories in LGTM format, recent build/analysis log files, unprocessed job results, and the latest snapshot for each project (used by the query console).

nginx-lgtm web

Web proxy service—acts as a proxy and SSL terminator for the LGTM web interface.

postgres-lgtm database

Database service—provides permanent storage of LGTM data.

rabbitmq-server-lgtm queue

Message queue service—manages work. The associated job dealer ensures that build/analysis jobs are processed by a suitable worker.

solr search

Search service— provides help search functionality.

For an architecture diagram showing the relationships between these services, see Network connections.

Managing services

You can enable/start or stop/disable all LGTM services on a host machine by running:

Action Linux command Windows script
Enable lgtm-up lgtm-install-services.bat
Start lgtm-up lgtm-up.bat
Stop lgtm-down lgtm-down.bat
Disable lgtm-down lgtm-uninstall-services.bat

For more information, see Bringing the system up or Taking the system down.

Use an appropriate system utility if you want to change the status of an individual service. For example, on Linux machines you use the systemctl utility:

Action Command
Start a service

systemctl start <service>.service

Example: systemctl start database.service

Stop a service

systemctl stop <service>.service

Example: systemctl stop database.service

Enable a service

systemctl enable <service>.service

Example: systemctl enable queue.service

Disable a service

systemctl disable <service>.service

Example: systemctl disable queue.service

lgtm-worker services

The lgtm-worker service is templated so you need to refer to it using the instance number. For example, to start the first lgtm-worker service:

  • Linux: systemctl start lgtm-worker@1.service
  • Windows: sc.exe start lgtm-worker-1 or use the Services control panel

On Linux, if you want to control all instances of the lgtm-worker service, use * as the parameter (making sure that you escape it appropriately for the shell you are using). For example, to start all worker services:

systemctl start lgtm-worker@*.service

Related topicsRelated topics