Autobase for PostgreSQLĀ® :elephant: :sparkling_heart:

Ansible-lint Yamllint Flake8 Molecule GitHub license GitHub stars

Autobase for PostgreSQLĀ® is an open-source alternative to cloud-managed databases (DBaaS) such as Amazon RDS, Google Cloud SQL, Azure Database, and more.

This automated database platform enables you to create and manage production-ready, highly available PostgreSQL clusters. It simplifies the deployment process, reduces operational costs, and makes database management accessibleā€”even for teams without specialized expertise.

Automate deployment, failover, backups, restore, upgrades, scaling, and more with ease.

You can find a version of this documentation that is searchable and also easier to navigate at autobase.tech


Project Status

Autobase has been actively developed for over 5 years (since 2019) and is trusted by companies worldwide, including in production environments with high loads and demanding reliability requirements. Our mission is to provide an open-source DBaaS that delivers reliability, flexibility, and cost-efficiency.

The project will remain open-source forever, but to ensure its continuous growth and development, we rely on sponsorship. By subscribing to Autobase packages, you gain access to personalized support from the project authors and PostgreSQL experts, ensuring the reliability of your database infrastructure.


Supported setups of Postgres Cluster

pg_cluster_scheme pg_cluster_scheme

You have three schemes available for deployment:

1. PostgreSQL High-Availability only

This is simple scheme without load balancing.

Components:

2. PostgreSQL High-Availability with Load Balancing

This scheme enables load distribution for read operations and also allows for scaling out the cluster with read-only replicas.

When deploying to cloud providers such as AWS, GCP, Azure, DigitalOcean, and Hetzner Cloud, a cloud load balancer is automatically created by default to provide a single entry point to the database (controlled by the cloud_load_balancer variable).

For non-cloud environments, such as when deploying on Your Own Machines, the HAProxy load balancer is available for use. To enable it, set with_haproxy_load_balancing: true in the vars/main.yml file.

[!NOTE] Your application must have support sending read requests to a custom port 5001, and write requests to port 5000.

List of ports when using HAProxy:

Components of HAProxy load balancing:

3. PostgreSQL High-Availability with Consul Service Discovery

To use this scheme, specify dcs_type: consul in variable file vars/main.yml

This scheme is suitable for master-only access and for load balancing (using DNS) for reading across replicas. Consul Service Discovery with DNS resolving is used as a client access point to the database.

Client access point (example):

Besides, it can be useful for a distributed cluster across different data centers. We can specify in advance which data center the database server is located in and then use this for applications running in the same data center.

Example: replica.postgres-cluster.service.dc1.consul, replica.postgres-cluster.service.dc2.consul

It requires the installation of a consul in client mode on each application server for service DNS resolution (or use forward DNS to the remote consul server instead of installing a local consul client).

Compatibility

RedHat and Debian based distros (x86_64)

Supported Linux Distributions:
PostgreSQL versions:

all supported PostgreSQL versions

:white_check_mark: tested, works fine: PostgreSQL 10, 11, 12, 13, 14, 15, 16, 17

Table of results of daily automated testing of cluster deployment:

Distribution Test result
Debian 11 GitHub Workflow Status
Debian 12 GitHub Workflow Status
Ubuntu 22.04 GitHub Workflow Status
Ubuntu 24.04 GitHub Workflow Status
CentOS Stream 9 GitHub Workflow Status
Oracle Linux 8 GitHub Workflow Status
Oracle Linux 9 GitHub Workflow Status
Rocky Linux 8 GitHub Workflow Status
Rocky Linux 9 GitHub Workflow Status
AlmaLinux 8 GitHub Workflow Status
AlmaLinux 9 GitHub Workflow Status

Getting Started

You have the option to easily deploy Postgres clusters using the Console (UI), command line, or GitOps.

[!TIP] šŸ“© Contact us at info@autobase.tech, and our team will provide you with detailed deployment instructions and help you implement Autobase into your infrastructure.

Deploying and managing PostgreSQL clusters can be challenging, especially without a dedicated database administrator (DBA). With Autobase, it becomes simpler: alongside powerful automation tools, you get DBA as a Service (DBAaaS). This means access to PostgreSQL experts who will assist with deployment, maintenance, and optimization, ensuring your clusters run smoothly.

Explore our support packages to find a plan that fits your needs.

Cluster creation demo

Refer to the Deployment section to learn more about the different deployment methods.

Star us

If you find our project helpful, consider giving it a star on GitHub! Your support helps us grow and motivates us to keep improving. Starring the project is a simple yet effective way to show your appreciation and help others discover it.

Star History Chart

By sponsoring our project, you directly contribute to its continuous improvement and innovation. As a sponsor, you'll receive exclusive benefits, including personalized support, early access to new features, and the opportunity to influence the project's direction. Your sponsorship is invaluable to us and helps ensure the project's sustainability and progress.

Become a sponsor today and help us take this project to the next level!

Support our work through GitHub Sponsors

GitHub Sponsors

Support our work through Patreon

Support me on Patreon

License

Licensed under the MIT License. See the LICENSE file for details.

Author

Vitaliy Kukharik (PostgreSQL DBA)
vitaliy@autobase.tech

Feedback, bug-reports, requests, ...

Are welcome!

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.