CYBERTEC PostgreSQL Logo

vip-manager v2.8 meets Patroni REST API

11.2024 / Category: / Tags: |

vip-manager has long been a crucial tool for managing virtual IPs in PostgreSQL HA setups, providing reliable leader routing. With the release of version 2.8.0, we're taking things to the next level by introducing native integration with the Patroni REST API. This new feature adds flexibility and simplifies configuration, making it easier than ever to manage your PostgreSQL HA clusters.

Main Feature: Patroni REST API Integration

In this release, vip-manager can now directly interact with Patroni via its REST API. This integration removes the need for complex custom setups, enabling more dynamic and flexible management of virtual IPs.

What does this mean for you?

  • Native Integration: vip-manager now works seamlessly with Patroni clusters without additional configurations for etcd or consul.
  • Huge Flexibility: The tool isn't limited to managing virtual IPs for primary nodes anymore; it can also handle replicas.
  • Simplified Configuration: With default values in place (e.g., localhost for DCS endpoints), setting up vip-manager is quicker and easier than ever.

Example Usage of Patroni REST API

Here are a couple of examples to showcase the new feature:

Managing Virtual IP for the Primary Node

This command configures vip-manager to set up a virtual IP for the primary node:

What does it do?

  • --ip=10.0.0.42: The virtual IP to be managed.
  • --interface=eth0: The network interface where vip-manager will set up the virtual IP.
  • --trigger-key="/leader": The endpoint in Patroni's REST API to check if the node is the leader.
  • --trigger-value=200: The HTTP status code indicating success.
  • --dcs-type=patroni: Specifies Patroni as the source of truth (the prefix dcs is still here due to historical reasons).

If the current host is the leader, according to Patroni, the virtual IP will be assigned.

Managing Virtual IP for the Replica

This command configures vip-manager to manage a virtual IP for the replica node:

Key Notes:

  • No need to set dcs-endpoints if Patroni is running on localhost.
  • Flexibility to manage virtual IPs for nodes other than the primary, like replicas.

Try it today!

If you want to contribute to vip-manager and help to make it better:

In conclusion, I wish you all the best! Happy managing! 💙💛
See you soon in person at one of the conferences, meetups, or training sessions!

Leave a Reply

Your email address will not be published. Required fields are marked *

CYBERTEC Logo white
Get the newest PostgreSQL Info & Tools


    This site is protected by reCAPTCHA and the Google Privacy Policy & Terms of Service apply.

    ©
    2024
    CYBERTEC PostgreSQL International GmbH
    phone-handsetmagnifiercrosscross-circle
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram