From 5bca2873e6f1409bfbdf37d2566220e2f99087ab Mon Sep 17 00:00:00 2001 From: Will Fitch Date: Thu, 10 Nov 2022 12:28:52 +0000 Subject: [PATCH] Update docs (#36) # PR ## Proposal The docs for this charm were unclear and outdated. This PR updates them to match the current state of the charm. Further updates coming in client relation PRs. ## Comments * updated docs * finished usage docs, added social docs and updated relation info --- README.md | 63 +++++++++++++++++++++++++++---------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 321bb244c..e349e2bb0 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,32 @@ ## Description -The PgBouncer Operator deploys and operates the [PgBouncer](https://www.pgbouncer.org) lightweight connection pooler for PostgreSQL. +The PgBouncer Operator deploys and operates the [PgBouncer](https://www.pgbouncer.org) lightweight connection pooler for PostgreSQL. This charm is only compatible with the [data platform postgresql-operator charm](https://github.com/canonical/postgresql-operator). ## Usage -As this charm is not yet published, you need to follow the build and deploy instructions from [CONTRIBUTING.md](https://github.com/canonical/pgbouncer-operator/CONTRIBUTING.md). This charm creates one pgbouncer application instance per CPU core on each machine it is deployed. +To deploy pgbouncer in front of three units of postgres: -### Config Options +```bash +juju deploy pgbouncer --channel=edge +juju deploy postgresql --channel=edge -n 3 +juju add-relation pgbouncer:backend-database postgresql:database +``` + +To deploy and relate an application to the above cluster, using the legacy pgsql relation (not recommended - this will be deprecated in future): + +```bash +juju deploy my-app +juju add-relation pgbouncer:db my-app:db +``` + +Or, if my-app needs admin permissions: + +```bash +juju add-relation pgbouncer:db-admin my-app:db +``` + +### Configuration Options Set these using the command `juju config