Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme updates #6

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 7 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,20 @@ This module was originally written by [Jadestorm](https://github.com/jadestorm/)

The patroni module sets up the following:

* Installs Patroni via package manager
* Install necessary PostgreSQL packages
* Installs Patroni via Pip or package
* Sets up a systemd based service for Patroni
* Manages Patroni's configuration at /etc/patroni
* Manages Patroni's configuration

### Setup Requirements

It is very important that you read up on [how Patroni works](https://github.com/zalando/patroni), as you will
also need a variety of other components to accomplish anything useful with Patroni.

You also need to make sure the patroni package is available somewhere. For RPM based systems, you can
If not installing via Pip and setting `$install_method => 'package'`,
you also need to make sure the patroni package is available somewhere. For RPM based systems, you can
get the package from [here](https://github.com/cybertec-postgresql/patroni-packaging/releases).

You will also need to get PostgreSQL itself installed yourself. Patroni handles starting PostgreSQL on it's own,
but you need to get the software installed. One pretty easy recommendation I have is to simply pull in
[puppetlab's postgresql module](https://forge.puppet.com/puppetlabs/postgresql) and make use of the
`postgresql::globals` class. We will demonstrate a very simple manifest for that below.

### Beginning with patroni

A bare minimum configuration might be:
Expand All @@ -72,21 +69,7 @@ This assumes you have taken care of all of the rest of the components needed for

## Usage

If you want to use PostgreSQL's own repositories, you could do something like:

```puppet
class { 'postgresql::globals':
manage_package_repo => true,
}
package { 'postgresql96-server':
ensure => present,
}
class { 'patroni':
scope => 'mycluster',
}
```

A much more fleshed out example might be something like:
Below is a full example:

```puppet
# First PostgreSQL server
Expand All @@ -105,16 +88,6 @@ node pg1 {
initial_cluster_state => 'existing',
}

class { 'postgresql::globals':
encoding => 'UTF-8',
locale => 'en_US.UTF-8',
manage_package_repo => true,
version => '9.6',
}
package { ['postgresql96-server','postgresql96-contrib']:
ensure => present,
}

class { 'patroni':
scope => 'mycluster',
use_etcd => true,
Expand Down Expand Up @@ -152,16 +125,6 @@ node pg2 {
initial_cluster_state => 'existing',
}

class { 'postgresql::globals':
encoding => 'UTF-8',
locale => 'en_US.UTF-8',
manage_package_repo => true,
version => '9.6',
}
package { ['postgresql96-server','postgresql96-contrib']:
ensure => present,
}

class { 'patroni':
scope => 'mycluster',
use_etcd => true,
Expand Down Expand Up @@ -214,9 +177,7 @@ for setting up Patroni.

## Limitations

This is currently only supported on RedHat Enterprise Linux 7 based systems. I would love to
see support on other distributions and even OS's, so if you are interested in contributing please
do so!
This module is currently only supported on RHEL and Debian based operating systems that support Systemd.

## Development

Expand Down