From 4f58e83b35b3cf289ba539e24f5a3cf62f4f6e51 Mon Sep 17 00:00:00 2001 From: Andreia Velasco Date: Thu, 4 Jul 2024 13:33:23 +0200 Subject: [PATCH 1/2] Create sync_docs.yaml --- .github/workflows/sync_docs.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/sync_docs.yaml diff --git a/.github/workflows/sync_docs.yaml b/.github/workflows/sync_docs.yaml new file mode 100644 index 0000000000..7cf2ccfa28 --- /dev/null +++ b/.github/workflows/sync_docs.yaml @@ -0,0 +1,19 @@ +# Copyright 2024 Canonical Ltd. +# See LICENSE file for licensing details. +name: Sync docs from Discourse + +on: + workflow_dispatch: + schedule: + - cron: 00 01 * * * + +jobs: + sync-docs: + name: Sync docs from Discourse + uses: canonical/data-platform-workflows/.github/workflows/_sync_docs.yaml@main + secrets: + discourse-api-user: ${{ secrets.DISCOURSE_API_USERNAME }} + discourse-api-key: ${{ secrets.DISCOURSE_API_KEY }} + permissions: + contents: write # Needed to push branch & tag + pull-requests: write # Needed to create PR From cf566add86645526e6288c1eb738b34664eac563 Mon Sep 17 00:00:00 2001 From: a-velasco Date: Thu, 4 Jul 2024 14:21:57 +0200 Subject: [PATCH 2/2] Deleting existing /docs folder to avoid conflicts with the action --- docs/explanation/e-interfaces.md | 46 ------ docs/how-to/h-configure-s3-aws.md | 31 ---- docs/how-to/h-configure-s3-radosgw.md | 36 ----- docs/how-to/h-create-and-list-backups.md | 14 -- docs/how-to/h-enable-encryption.md | 55 ------- docs/how-to/h-enable-monitoring.md | 106 -------------- docs/how-to/h-manage-app.md | 54 ------- docs/how-to/h-manage-units.md | 40 ----- docs/how-to/h-migrate-cluster-via-restore.md | 35 ----- docs/how-to/h-restore-backup.md | 28 ---- docs/index.md | 59 -------- docs/reference/.gitkeep | 0 docs/tutorial/t-cleanup-environment.md | 20 --- docs/tutorial/t-deploy-postgresql.md | 109 -------------- docs/tutorial/t-enable-security.md | 69 --------- docs/tutorial/t-integrations.md | 145 ------------------- docs/tutorial/t-manage-passwords.md | 65 --------- docs/tutorial/t-managing-units.md | 58 -------- docs/tutorial/t-overview.md | 24 --- docs/tutorial/t-setup-environment.md | 50 ------- 20 files changed, 1044 deletions(-) delete mode 100644 docs/explanation/e-interfaces.md delete mode 100644 docs/how-to/h-configure-s3-aws.md delete mode 100644 docs/how-to/h-configure-s3-radosgw.md delete mode 100644 docs/how-to/h-create-and-list-backups.md delete mode 100644 docs/how-to/h-enable-encryption.md delete mode 100644 docs/how-to/h-enable-monitoring.md delete mode 100644 docs/how-to/h-manage-app.md delete mode 100644 docs/how-to/h-manage-units.md delete mode 100644 docs/how-to/h-migrate-cluster-via-restore.md delete mode 100644 docs/how-to/h-restore-backup.md delete mode 100644 docs/index.md delete mode 100644 docs/reference/.gitkeep delete mode 100644 docs/tutorial/t-cleanup-environment.md delete mode 100644 docs/tutorial/t-deploy-postgresql.md delete mode 100644 docs/tutorial/t-enable-security.md delete mode 100644 docs/tutorial/t-integrations.md delete mode 100644 docs/tutorial/t-manage-passwords.md delete mode 100644 docs/tutorial/t-managing-units.md delete mode 100644 docs/tutorial/t-overview.md delete mode 100644 docs/tutorial/t-setup-environment.md diff --git a/docs/explanation/e-interfaces.md b/docs/explanation/e-interfaces.md deleted file mode 100644 index 251298b63a..0000000000 --- a/docs/explanation/e-interfaces.md +++ /dev/null @@ -1,46 +0,0 @@ -# Interfaces/endpoints - -The charm supports modern `postgresql_client` and legacy `pgsql` interfaces (in a backward compatible mode). - -**Note:** do NOT relate both modern and legacy interfaces simultaneously! - -## Modern interfaces - -This charm provides modern ['postgresql_client' interface](https://github.com/canonical/charm-relation-interfaces). Applications can easily connect PostgreSQL using ['data_interfaces' ](https://charmhub.io/data-platform-libs/libraries/data_interfaces) library from ['data-platform-libs'](https://github.com/canonical/data-platform-libs/). - -### Modern `postgresql_client` interface (`database` endpoint): - -Adding a relation is accomplished with `juju relate` (or `juju integrate` for Juju 3.x) via endpoint `database`. Example: - -```shell -# Deploy Charmed PostgreSQL cluster with 3 nodes -juju deploy postgresql -n 3 --channel 14 - -# Deploy the relevant application charms -juju deploy mycharm - -# Relate PostgreSQL with your application -juju relate postgresql-k8s:database mycharm:database - -# Check established relation (using postgresql_client interface): -juju status --relations - -# Example of the properly established relation: -# > Relation provider Requirer Interface Type -# > postgresql:database mycharm:database postgresql_client regular -``` - -## Legacy interfaces - -**Note:** Legacy relations are deprecated and will be discontinued on future releases. Usage should be avoided. - -### Legacy `pgsql` interface (`db` and `db-admin` endpoints): - -This charm supports legacy interface `pgsql` from the previous [PostgreSQL charm](https://launchpad.net/postgresql-charm): - -```shell -juju relate postgresql:db mailman3-core -juju relate postgresql:db-admin landscape-server -``` - -**Note:** The endpoint `db-admin` provides the same legacy interface `pgsql` with PostgreSQL admin-level privileges. It is NOT recommended to use it from security point of view. \ No newline at end of file diff --git a/docs/how-to/h-configure-s3-aws.md b/docs/how-to/h-configure-s3-aws.md deleted file mode 100644 index dc49428e79..0000000000 --- a/docs/how-to/h-configure-s3-aws.md +++ /dev/null @@ -1,31 +0,0 @@ -Charmed PostgreSQL backup can be stored on any S3 compatible storage. The S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator). Deploy and configure the s3-integrator charm for **[AWS S3](https://aws.amazon.com/s3/)** (click [here](/t/charmed-postgresql-how-to-configure-s3-for-radosgw/10313) to backup on Ceph via RadosGW): -```shell -juju deploy s3-integrator -juju run-action s3-integrator/leader sync-s3-credentials access-key= secret-key= --wait -juju config s3-integrator \ - endpoint="https://s3.amazonaws.com" \ - bucket="postgresql-test-bucket-1" \ - path="/postgresql-test" \ - region="us-west-2" -``` - -To pass these configurations to Charmed PostgreSQL, relate the two applications: -```shell -juju relate s3-integrator postgresql -``` - -You can create/list/restore backups now: - -```shell -juju run-action postgresql/leader list-backups --wait -juju run-action postgresql/leader create-backup --wait -juju run-action postgresql/leader list-backups --wait -juju run-action postgresql/leader restore backup-id= --wait -``` - -You can also update your S3 configuration options after relating, using: -```shell -juju config s3-integrator