pgbouncer

contributions requested
Installs and configure pgbouncer

8,386 downloads

8,386 latest version

5.0 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
released Oct 8th 2015
This version is compatible with:
  • Ubuntu

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rhoml-pgbouncer', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rhoml-pgbouncer
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rhoml-pgbouncer --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

rhoml/pgbouncer — version 0.1.0 Oct 8th 2015

puppet-pgbouncer Build Status

PGbouncer

Lightweight connection pooler for PostgreSQL.

https://pgbouncer.github.io

Overview

This module is intended to install & Configure PGbouncer.

Module Description

  • Manage pgbouncer.ini config file as a template.
  • Manage userlist.txt file
  • Manage /etc/default/pgbouncer file for default OPTS
  • Installs PGbouncer in Ubuntu from the default repositories

Usage

class {
  'pgbouncer':
    databases       => {
      'database01' => {
        'host'            => '127.0.0.1',
        'port'            => '5432',
        'user'            => 'user1',
        'password'        => 'password',
        'client_encoding' => 'UNICODE',
        'datestyle'       => 'ISO',
        'connect_query'   => 'SELECT 1'
      }
    },
    db_users        => {
      'dbuser' => 'dbuser_password'
    },
    pool_size       => 50,
    reserve_pool    => 10,
    pgbouncer_conf  => {
      'logfile'                => '/var/log/postgresql/pgbouncer.log',
      'pidfile'                => '/var/run/postgresql/pgbouncer.pid',
      'listen_addr'            => '127.0.0.1',
      'listen_port'            => 6432,
      'unix_socket_dir'        => '/var/run/postgresql',
      'auth_type'              => 'trust',
      'auth_file'              => '/etc/pgbouncer/userlist.txt',
      'admin_users'            => 'admin1, admin2',
      'stats_users'            => 'stats, root',
      'pool_mode'              => 'session',
      'server_reset_query'     => 'DISCARD ALL',
      'server_check_query'     => 'select 1',
      'server_check_delay'     => 30,
      'max_client_conn'        => 100,
      'default_pool_size'      => 20,
      'reserve_pool_size'      => 5,
      'log_connections'        => 1,
      'log_disconnections'     => 1,
      'log_pooler_errors'      => 1,
      'server_round_robin'     => 0,
      'server_lifetime'        => 1200,
      'server_idle_timeout'    => 60,
      'server_connect_timeout' => 15,
      'server_login_retry'     => 15,
      'query_timeout'          => 0,
      'query_wait_timeout'     => 0,
      'client_idle_timeout'    => 0,
      'client_login_timeout'   => 60,
      'autodb_idle_timeout'    => 3600,
      'pkt_buf'                => 2048,
      'listen_backlog'         => 128,
      'tcp_defer_accept'       => 0,
      'tcp_socket_buffer'      => 0,
      'tcp_keepalive'          => 1,
      'tcp_keepcnt'            => 0,
      'tcp_keepidle'           => 0,
      'tcp_keepintvl'          => 0,
      'dns_max_ttl'            => 15,
      'dns_zone_check_period'  => 0
    },
    pgbouncer       => undef,
    pgbouncer_start => true,
    version         => '1.5.5-1.pgdg12.4+1'
}

Development

  1. Clone the repo
  2. Change directory to the actual module dir
  3. We use pre-commit.com hooks to ensure guidelines pre-commit install
  4. Create a feature branch
  5. Submit a PR