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

feat(plugin) Setup FD for PostgreSQL backup plugin usage #11

Merged
merged 40 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
6cd39e4
chore: rpl yes/no with true/false in defaults
adf-patrickha Apr 25, 2024
32c31a6
feat(plugin): additional tasks for postgresql
adf-patrickha Apr 25, 2024
b1e9026
chore(vars): move distro-specifics from defaults to vars
adf-patrickha Apr 26, 2024
4a44667
feat(molecule): add postgresql scenario
adf-patrickha Apr 26, 2024
8351db0
fix(plugin): syntax fixes plugins_postgresql.yml
adf-patrickha Apr 26, 2024
d50d14d
fix(ci): define molecule scenario to default
adf-patrickha Apr 26, 2024
b66a710
fix(ci): exclude scenario postgresql from lint
adf-patrickha Apr 26, 2024
90ed8fb
fix(ci): exclude postgresql scenario, update ansible-lint action
adf-patrickha May 2, 2024
2a2e692
fix(lint): task names, file mode
adf-patrickha May 2, 2024
8c8cf15
feat(ci): separate scenarios to different jobs
adf-patrickha May 2, 2024
b8b75fc
fix(molecule): update verify.yml for both scenarios
adf-patrickha May 2, 2024
a9225b7
fix(ci): separate GitHub action for postgresql test
adf-patrickha May 2, 2024
ccfed7b
fix(ci): use different molecule action as scenario is not working
adf-patrickha May 2, 2024
c90b4f2
fix(molecule): switch back to docker driver
adf-patrickha May 2, 2024
6b90e13
fix(ci): fix plattforms and images for postgresql scenario
adf-patrickha May 3, 2024
0b1cedc
fix(ci): fix postgresql scenario
adf-patrickha May 3, 2024
16bf488
fix(ci): add community.postgresql requirement
adf-patrickha May 3, 2024
4397e95
fix(ci): set image env to use correct distro
adf-patrickha May 3, 2024
39e891a
feat(plugin): rpl copy w template task, lineinfile regexp match
adf-patrickha May 3, 2024
dbc65a1
feat(plugin): update path vars postgresql
adf-patrickha May 3, 2024
b4d2cfd
feat(plugin): use template for postgresql config, improve lineinfile
adf-patrickha May 3, 2024
0d90889
chore(lint): file permissions for templates
adf-patrickha May 3, 2024
1aa0dd8
feat(plugin): determine postgresql major version
adf-patrickha May 3, 2024
702869d
fix(plugin): rm absolute path of pg_config binary
adf-patrickha May 3, 2024
9cb1421
chore(lint): yamllint spacing
adf-patrickha May 3, 2024
0c04fb0
fix(plugin): only run version tasks for Debian/Ubuntu
adf-patrickha May 3, 2024
426ba55
feat(plugin): add restore_command to postgresql conf template
adf-patrickha May 6, 2024
d01fe70
chore: assert for bareos_fd_plugins var
adf-patrickha May 6, 2024
5aca7ef
chore(molecule): postgreql update os_family condition
adf-patrickha May 6, 2024
b11935a
chore(vars): Clean-ups in var files
adf-patrickha May 8, 2024
c324982
chore: remove unneeded tags from main tasks
adf-patrickha May 8, 2024
8b96f4d
feat(molecule): include role vars in verify cycle
adf-patrickha May 8, 2024
bc85b05
feat(ci): add more distros to PostgreSQL scenario
adf-patrickha May 8, 2024
57cc916
chore(ci): rm .yamllint file
adf-patrickha May 8, 2024
07c4aa8
chore(lint): line-length tasks/encryption.yml
adf-patrickha May 8, 2024
20f2a44
Revert "chore(lint): line-length tasks/encryption.yml"
adf-patrickha May 8, 2024
376409c
chore(vars): update RHEL vars, improve comments
adf-patrickha May 8, 2024
54d9009
fix(ci): remove fedora 39 for now
adf-patrickha May 13, 2024
e0983a4
fix(molecule): remove broken file/dir check
adf-patrickha May 13, 2024
4dd619c
chore(molecule): shorter encryption key-pair
adf-patrickha May 14, 2024
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
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exclude_paths:
- molecule/default/converge.yml
- molecule/default/verify.yml
- molecule/default/collections.yml
- molecule/postgresql
- .tox
- .cache
- .github
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- name: checkout
uses: actions/checkout@v3
- name: ansible-lint
uses: ansible-community/ansible-lint-action@main
uses: ansible/ansible-lint@main

test:
needs:
- lint
Expand All @@ -44,7 +45,7 @@ jobs:
- image: "fedora"
tag: "38"
- image: "fedora"
tag: "latest"
tag: "39"
- image: "opensuse"
tag: "latest"
- image: "ubuntu"
Expand All @@ -56,12 +57,45 @@ jobs:
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"

- name: disable apparmor for mysql
run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/

- name: parse apparmor for mysql
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

- name: molecule
uses: robertdebock/[email protected]
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
scenario: default

test_postgresql:
needs:
- lint
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
- image: "debian11"
- image: "debian12"
- image: "fedora38"
# TODO 39 not yet supported by geerlingguy.postgresql
# - image: "fedora39"
- image: "ubuntu2204"
- image: "rockylinux9"
steps:
- name: checkout
uses: actions/checkout@v3
with:
path: "${{ github.repository }}"

- name: molecule postgresql plugin scenario
uses: gofrolist/molecule-action@v2
with:
molecule_command: test
molecule_args: "--scenario-name postgresql"
env:
image: ${{ matrix.config.image }}
16 changes: 0 additions & 16 deletions .yamllint

This file was deleted.

21 changes: 15 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# The client has these configuration parameters.

# Backup existing configurations.
bareos_fd_backup_configurations: no
bareos_fd_backup_configurations: false

# Install debug packages. This requires the debug repositories to be enabled.
bareos_fd_install_debug_packages: no
bareos_fd_install_debug_packages: false

# The hostname of the File Daemon.
bareos_fd_hostname: "{{ inventory_hostname }}"
Expand All @@ -22,10 +22,10 @@ bareos_fd_message: "Standard"
bareos_fd_maximum_concurrent_jobs: 20

# Enable TLS.
bareos_fd_tls_enable: yes
bareos_fd_tls_enable: true

# Verify the peer.
bareos_fd_tls_verify_peer: no
bareos_fd_tls_verify_peer: false

# The inteval in seconds to send a heartbeat.
bareos_fd_heartbeat_interval: 0
Expand All @@ -52,11 +52,20 @@ bareos_fd_messages:
- "!restored"
description: "Send relevant messages to the Director."

# For encryption of data, set this to `yes`.
bareos_fd_encryption_enabled: no
# For encryption of data, set this to `true`.
bareos_fd_encryption_enabled: false

# You may bring your own private key. If not specified, a new one will be generated.
bareos_fd_encryption_private_key: ""

# The master public key to use.
bareos_fd_encryption_master_public_key: ""

##
# Defaults used by the Bareos PostgreSQL backup plugin
##

# PostgreSQL major version
# This value will be overwritten on Debian based distros by the actual version in-use.
# On Red Hat based distros, the value is not required as of now.
bareos_fd_plugin_psql_version: 15
adf-patrickha marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@
ansible.builtin.service:
name: "{{ bareos_fd_service }}"
state: restarted

# required for the PostgreSQL backup plugin
# only used when PostgreSQL is installed on the FD
- name: Reload postgresql
ansible.builtin.service:
name: postgresql.service
state: reloaded
102 changes: 29 additions & 73 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,80 +10,37 @@
bareos_fd_install_debug_packages: true
bareos_fd_encryption_enabled: true
bareos_fd_encryption_private_key: |
-----BEGIN RSA PRIVATE KEY-----
MIIJKAIBAAKCAgEAvFS5DDxBm2Hgf6LM2QnU3eKTw6PHpCBESjuqoKDnwnjL9wXH
GAO77b3lPXKFPZfrXUH41FxJt1wWuRXWjJfR4XI7RLmG5XGgbvKamnhCK48aZelN
oFa2Midto1Gydnb/I2I7GTA2fmx65mS4DTlXPn/phZJx9akUwJ1kRWVJgzuzimJ8
0YPqKbLPBRz86PWjAfTmYP4a7iuCTOlPqNIxGgCFUi5KIeFQZ3V8eO4iwVE8F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yMTIwMDMwWjA3MQsw
CQYDVQQGEwJDSDETMBEGA1UECAwKU29tZS1TdGF0ZTETMBEGA1UECgwKQWRmaW5p
cyBBRzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAudP/4ldFN6DR+CR5/TLe
00aE3jmsqiKg2LjRdV3s45bOScch/oPPuOzVztHE9QniE4hNkJaMFVArNB4x4Wvw
9SW2rE1jtbckXPj9CUiAXj+G+LytMUCLZ2Mew500USTfWaH4robosZ9yG5yQIbdv
zrFkYNZpZp+fJCJyqoc622MCAwEAAaNTMFEwHQYDVR0OBBYEFK/HMqCU8j2Dqj0R
/c2Xrl/MGaq8MB8GA1UdIwQYMBaAFK/HMqCU8j2Dqj0R/c2Xrl/MGaq8MA8GA1Ud
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAUO7icu1fG+mXUfJoMEpdhGCr
Zn0Ll4hplw9eANrGYnbC2FIWdh7tj23dFhm/kb0YRqI2arpPyYYagmu7eK89/22g
wyrW5xc17ivohUS+sN8lPqrKcXrRBveQ0FnvUbkjEmtmgHSYgjdCxoGMIcqpn8BC
m/1hu95J5z6/IZEm7oM=
-----END CERTIFICATE-----
bareos_fd_directors:
- name: "bareos-dir"
Expand Down Expand Up @@ -120,7 +77,6 @@
- mariabackup
- mysql
- mysql_xtrabackup
- postgresql
# TODO disabled as package `bareos-filedaemon-ldap-python-plugin`
# has broken dependencies on Debian (python-ldap instead of python3-ldap)
# - ldap
3 changes: 1 addition & 2 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
ansible.builtin.package:
name:
- bareos-filedaemon-mariabackup-python-plugin
- bareos-filedaemon-postgresql-python-plugin
- bareos-filedaemon-postgresql-python-plugin
- bareos-filedaemon-percona-xtrabackup-python-plugin

# TODO disabled as package `bareos-filedaemon-ldap-python-plugin`
# has broken dependencies on Debian (python-ldap instead of python3-ldap)
# - bareos-filedaemon-ldap-python-plugin
Expand Down
78 changes: 78 additions & 0 deletions molecule/postgresql/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---

- name: Converge
hosts: all
become: true
gather_facts: true

roles:
- role: ansible-role-bareos_fd
bareos_fd_backup_configurations: true
bareos_fd_install_debug_packages: true
bareos_fd_encryption_enabled: true
bareos_fd_encryption_private_key: |
-----BEGIN PRIVATE KEY-----
MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALnT/+JXRTeg0fgk
ef0y3tNGhN45rKoioNi40XVd7OOWzknHIf6Dz7js1c7RxPUJ4hOITZCWjBVQKzQe
MeFr8PUltqxNY7W3JFz4/QlIgF4/hvi8rTFAi2djHsOdNFEk31mh+K6G6LGfchuc
kCG3b86xZGDWaWafnyQicqqHOttjAgMBAAECgYAbZXPuLKuZve32xXnuqFdNkrH4
CUy5cI2CJg1LXmOUUiFrox4R5eD0BIapDSgacDCSbJ/y1x8j7UPRVTpJX56QZUD/
FByRAPc5+/nPuiltB9sSNmFx3FlTeF4N0oyglEioz3zM5ilUYkdVetj+vYnQJKkt
LGysJ46ZO7pBdmjsgQJBAO7e3Dj8umZfS9EC3Xr/ykxFKSSSUenFg6qNu1lADCUo
S9iJu5BY0R81ab7uWdgBPUHtW1vp/WhpnfoPMs80dOECQQDHJ2WJyXZtHSqBzXRZ
J/+Ki0E4uuYuJn9CCb2w5Fegq1BW+6FU0759s3RJCEbFt3B2Xy4G+y7QOjglb0DN
bFTDAkBQxshN9RjLmZo32fIvr+QnGpQpK9nLZeF6gWdDbScuQYw0c48b5w0Asr1J
taxoITMn4i4szNnGv0CO2SjjbOfBAkAQEO6REg6auNqgBBoZwy9LVvaZBALjwDlN
84k5BwLGtGtTyRL3y+k3LM35wlArTSQmeIE3EPZy1++FnZcFu3KPAkEAtIZOonLt
EtRs4axJi3vnPnPCje92Usdd3QOCCJHt4zA5GITp866aiO0bW5lLc7ZzUNEUk3jt
ICo3CGGSXV7yiA==
-----END PRIVATE KEY-----
bareos_fd_encryption_master_public_key: |
-----BEGIN CERTIFICATE-----
MIICSjCCAbOgAwIBAgIUd8WfhMKbB1MSc47VEsokPgViZKIwDQYJKoZIhvcNAQEL
BQAwNzELMAkGA1UEBhMCQ0gxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoM
CkFkZmluaXMgQUcwHhcNMjQwNTEzMTIwMDMwWhcNMjQwNjEyMTIwMDMwWjA3MQsw
CQYDVQQGEwJDSDETMBEGA1UECAwKU29tZS1TdGF0ZTETMBEGA1UECgwKQWRmaW5p
cyBBRzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAudP/4ldFN6DR+CR5/TLe
00aE3jmsqiKg2LjRdV3s45bOScch/oPPuOzVztHE9QniE4hNkJaMFVArNB4x4Wvw
9SW2rE1jtbckXPj9CUiAXj+G+LytMUCLZ2Mew500USTfWaH4robosZ9yG5yQIbdv
zrFkYNZpZp+fJCJyqoc622MCAwEAAaNTMFEwHQYDVR0OBBYEFK/HMqCU8j2Dqj0R
/c2Xrl/MGaq8MB8GA1UdIwQYMBaAFK/HMqCU8j2Dqj0R/c2Xrl/MGaq8MA8GA1Ud
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADgYEAUO7icu1fG+mXUfJoMEpdhGCr
Zn0Ll4hplw9eANrGYnbC2FIWdh7tj23dFhm/kb0YRqI2arpPyYYagmu7eK89/22g
wyrW5xc17ivohUS+sN8lPqrKcXrRBveQ0FnvUbkjEmtmgHSYgjdCxoGMIcqpn8BC
m/1hu95J5z6/IZEm7oM=
-----END CERTIFICATE-----
bareos_fd_directors:
- name: "bareos-dir"
password: "secretpassword"
monitor: false
connection_from_client_to_director: true
connection_from_director_to_client: false
tls_enable: true
tls_verify_peer: false
- name: "disabled-director"
enabled: false
bareos_fd_messages:
- name: "Standard"
director:
server: bareos-dir
messages:
- all
- "!skipped"
- "!restored"
description: "Send relevant messages to the Director."
append:
file: "/var/log/bareos/bareos.log"
messages:
- all
- "!skipped"
- "!terminate"
console:
- all
- "!skipped"
- "!saved"
- name: "disabled-message"
enabled: false
bareos_fd_plugins:
- postgresql
26 changes: 26 additions & 0 deletions molecule/postgresql/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---

dependency:
name: galaxy
options:
role-file: molecule/postgresql/requirements.yml
requirements-file: molecule/postgresql/requirements.yml
lint: |
set -e
yamllint .
ansible-lint
driver:
name: docker
platforms:
- name: "bareosfd-${image:-fedora38}${TOX_ENVNAME}"
image: "geerlingguy/docker-${image:-fedora38}-ansible:latest"
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: yes
pre_build_image: yes
systemd: true
provisioner:
name: ansible
verifier:
name: ansible
Loading
Loading