Skip to content

Commit

Permalink
Merge branch 'main' into dpe-3684-reinitialise-raft
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Nov 19, 2024
2 parents c769b8e + f50d373 commit 0896245
Show file tree
Hide file tree
Showing 24 changed files with 1,086 additions and 117 deletions.
58 changes: 36 additions & 22 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>canonical/data-platform//renovate_presets/charm.json5"],
"reviewers": ["team:data-platform-postgresql"],
"packageRules": [
// Later rules override earlier rules
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'github>canonical/data-platform//renovate_presets/charm.json5',
],
reviewers: [
'team:data-platform-postgresql',
],
packageRules: [
{
"matchPackageNames": ["pydantic"],
"allowedVersions": "<2.0.0"
matchPackageNames: [
'pydantic',
],
allowedVersions: '<2.0.0',
},
{
"matchManagers": ["regex"],
"matchDepNames": ["juju"],
"matchDatasources": ["pypi"],
"allowedVersions": "<3",
"groupName": "Juju agents"
}
matchManagers: [
'custom.regex',
],
matchDepNames: [
'juju',
],
matchDatasources: [
'pypi',
],
allowedVersions: '<3',
groupName: 'Juju agents',
},
],
"regexManagers": [
customManagers: [
{
"fileMatch": ["^\\.github/workflows/[^/]+\\.ya?ml$"],
"matchStrings": [
"(libjuju: )==(?<currentValue>.*?) +# renovate: latest libjuju 2"
customType: 'regex',
fileMatch: [
'^\\.github/workflows/[^/]+\\.ya?ml$',
],
matchStrings: [
'(libjuju: )==(?<currentValue>.*?) +# renovate: latest libjuju 2',
],
"depNameTemplate": "juju",
"datasourceTemplate": "pypi",
"versioningTemplate": "loose"
}
]
depNameTemplate: 'juju',
datasourceTemplate: 'pypi',
versioningTemplate: 'loose',
},
],
}
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5

unit-test:
name: Unit test charm
Expand All @@ -39,13 +39,13 @@ jobs:
- name: Run tests
run: tox run -e unit
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5
with:
cache: true

Expand All @@ -59,7 +59,7 @@ jobs:
allure_on_amd64: false
- agent: 3.4.6 # renovate: juju-agent-pin-minor
allure_on_amd64: true
- snap_channel: 3.6/beta
- snap_channel: 3.6/candidate
allure_on_amd64: false
architecture:
- amd64
Expand All @@ -69,15 +69,15 @@ jobs:
allure_on_amd64: true
architecture: arm64
- juju:
snap_channel: 3.6/beta
snap_channel: 3.6/candidate
allure_on_amd64: false
architecture: arm64
name: Integration | ${{ matrix.juju.agent || matrix.juju.snap_channel }} | ${{ matrix.architecture }}
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5
with:
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
architecture: ${{ matrix.architecture }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5
with:
channel: 14/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
sync-docs:
name: Sync docs from Discourse
uses: canonical/data-platform-workflows/.github/workflows/[email protected].4
uses: canonical/data-platform-workflows/.github/workflows/[email protected].5
with:
reviewers: a-velasco,izmalk
permissions:
Expand Down
9 changes: 7 additions & 2 deletions docs/how-to/h-configure-s3-radosgw.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ If you are using an earlier version, check the [Juju 3.0 Release Notes](https://

# Configure S3 for RadosGW

A Charmed PostgreSQL backup can be stored on any S3-compatible storage. S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator).
A PostgreSQL backup can be stored on any S3-compatible storage. S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator).

This guide will teach you how to deploy and configure the s3-integrator charm on Ceph via [RadosGW](https://docs.ceph.com/en/quincy/man/8/radosgw/), send the configuration to a Charmed PostgreSQL application, and update it. (To configure S3 for AWS, see [this guide](/t/9681))
This guide will teach you how to deploy and configure the s3-integrator charm on Ceph via [RadosGW](https://docs.ceph.com/en/quincy/man/8/radosgw/), send the configuration to a Charmed PostgreSQL application, and update it.
> For AWS, see the guide [How to configure S3 for AWS](/t/9681)
[note]
The Charmed PostgreSQL backup tool ([pgBackRest](https://pgbackrest.org/)) can currently only interact with S3-compatible storages if they work with [SSL/TLS](https://github.com/pgbackrest/pgbackrest/issues/2340) (backup via the plain HTTP is currently not supported).
[/note]

## Configure s3-integrator
First, install the MinIO client and create a bucket:
Expand Down
10 changes: 5 additions & 5 deletions docs/how-to/h-create-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ If you are using an earlier version, check the [Juju 3.0 Release Notes](https://
This guide contains recommended steps and useful commands for creating and managing backups to ensure smooth restores.

## Prerequisites
* A cluster with at [least three nodes](/t/charmed-postgresql-how-to-manage-units/9689?channel=14/stable) deployed
* A cluster with at [least three nodes](/t/9689?channel=14/stable) deployed
* Access to S3 storage
* [Configured settings for S3 storage](/t/charmed-postgresql-how-to-configure-s3/9681?channel=14/stable)
* [Configured settings for S3 storage](/t/9681?channel=14/stable)

## Summary
- [Save your current cluster credentials](#heading--save-credentials), as you'll need them for restoring
Expand All @@ -38,7 +38,7 @@ Once Charmed PostgreSQL is `active` and `idle`, you can create your first backup
```shell
juju run postgresql/leader create-backup
```
By default, backups created with command above will be **full** backups: a copy of *all* your data will be stored in S3. There are 2 other supported types of backups (available in revision 416+, currently in channel `14/edge` only):
By default, backups created with the command above will be **full** backups: a copy of *all* your data will be stored in S3. There are 2 other supported types of backups (available in revision 416+, currently in channel `14/edge` only):
* Differential: Only modified files since the last full backup will be stored.
* Incremental: Only modified files since the last successful backup (of any type) will be stored.

Expand All @@ -48,8 +48,8 @@ juju run postgresql/leader create-backup type={full|differential|incremental}
```

**Tip**: To avoid unnecessary service downtime, always use non-primary units for the action `create-backup`. Keep in mind that:
* TLS enabled: disables the command from running on *primary units*.
* TLS **not** enabled: disables the command from running on *non-primary units*.
* When TLS is enabled, `create-backup` can only run on replicas (non-primary)
* When TLS is **not** enabled, `create-backup` can only run in the primary unit

<a href="#heading--list-backups"><h2 id="heading--list-backups">List backups</h2></a>
You can list your available, failed, and in progress backups by running the `list-backups` command:
Expand Down
Loading

0 comments on commit 0896245

Please sign in to comment.