Patroni


You must log in or register to view this page

Product description

Patroni is a clustering technology for PostgreSQL.

Architecture

The examples of the product components and pattern's interaction are displayed in the following tables.

Software pattern summary

The following table gives an overview of the pattern characteristics:

Product component

OS type

Versioning

Pattern depth

Patroni Cluster

Windows, UNIXActiveInstance-based

Platforms supported by the pattern

This pattern supports the Windows and UNIX platforms.

Identification

To run a discovery of the product, the pattern must be triggered. This section describes conditions under which the pattern can be triggered.

Software instance triggers

The following table gives details about the pattern triggers:

PatternTrigger nodeAttributeConditionArgument

Patroni

DiscoveredProcess

cmd

matches

regex '(?i)\bpatroni(?:\.exe)?$'

  or  
  

cmd

matches

regex "(?i)\bpython\d?(?:\.\d+)?(?:\.exe)?$"

  

and

  
  

args

matches

regex '\bpatroni\b'

Simple identification mappings

The following component is identified by using the simple identity mapping that maps the product's known processes:

Name

Condition

Patroni Clustering Technology

 matches regex "(?i)\bpatroni(?:\.exe)?$"

Versioning

The pattern attempts to retrieve version information by running <install_root>/patronictl <yml_file> version  to obtain the install_root and yml_file from the trigger process.

Application model

If the pattern discovers a SoftwareInstance of Patroni, it defines its architecture in the form of the application model.

Cluster node

The pattern creates a SoftwareCluster node with a key based on the Patroni Cluster type and instance name. The pattern retrieves the cluster instance name by running <install_root>/patronictl <yml_file> list to obtain the install_root and yml_file from the trigger process.

PostgreSQL Database

The pattern creates a SoftwareContainment link from the SoftwareCluster to all PostgreSQL Database Server SoftwareInstances running on the host with the same instance name as the cluster. The pattern retrieves the patroni_role of this PostgreSQL Database Server SoftwareInstance by running <install_root>/patronictl <yml file> list to obtain the install_root and yml_file from the trigger process.

Links to other SoftwareInstances

The pattern creates communication links from the cluster to the following SoftwareInstances. In all cases ,the cluster is the client.

SoftwareInstance typeHow the pattern finds the remote host
Apache Zookeeper ServerFrom the yml_file, the location of which is the trigger process.
etcd
HAProxyAlways on the local host.

 BMC Discovery models a typical installation of the Patroni cluster as shown in the following image:

1741774423147-604.png

Subject matter expertise

Inputs from subject matter experts are welcome on any other potential approaches not discussed in this topic.

Testing

The patterns have been tested against a live installation.

Information sources

Open issues

There are no known open issues with this pattern.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*