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

Add Synapse backup s3-integration #139

Merged
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d306d50
Add Synapse backup s3-integration
javierdelapuente Jan 17, 2024
0c94bb2
Add missing src-docs
javierdelapuente Jan 17, 2024
fec0ae3
Add integration documentation
javierdelapuente Jan 17, 2024
04a937d
Try integration tests for backup with localstack
javierdelapuente Jan 17, 2024
a1df7b1
Run integration tests in self hosted runners
javierdelapuente Jan 18, 2024
ca15818
Some small refactoring and renaming
javierdelapuente Jan 18, 2024
ac59a9c
github actions corrections
javierdelapuente Jan 18, 2024
2cb9f41
Use different name for fixture function and fixture name
javierdelapuente Jan 18, 2024
6843a97
Fix typo
javierdelapuente Jan 18, 2024
392c0d4
Fix typo
javierdelapuente Jan 18, 2024
3a91cdf
rename s3-backup integrations and improve docs
javierdelapuente Jan 18, 2024
126ee99
back up -> backup for name
javierdelapuente Jan 18, 2024
f9d0af8
Rename SynapseBackup to BackupObserver and split logic in two files
javierdelapuente Jan 18, 2024
df6dd81
Split test_backup in two files
javierdelapuente Jan 18, 2024
c473364
Swap test files. Improve config change
javierdelapuente Jan 18, 2024
252d9fe
Rename integration from s3-backup to backup
javierdelapuente Jan 19, 2024
3e97374
Refactor for integration tests to use fixtures
javierdelapuente Jan 19, 2024
8d11c61
Join three tests using pytests parametrize
javierdelapuente Jan 19, 2024
789988d
Fix bug and add tests for it in validate region or endpoint
javierdelapuente Jan 19, 2024
c4ac5f3
No check for status in backup observer before setting to active
javierdelapuente Jan 19, 2024
676e984
Merge branch 'main' into ISD-1492-Synapse-Create-S3-configuration-for…
javierdelapuente Jan 19, 2024
9d71d06
Remove unused constant
javierdelapuente Jan 19, 2024
ccd2406
Merge branch 'main' into ISD-1492-Synapse-Create-S3-configuration-for…
javierdelapuente Jan 22, 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
2 changes: 2 additions & 0 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
chaos-app-label: app.kubernetes.io/name=synapse
chaos-enabled: false
chaos-experiments: pod-delete
extra-arguments: --localstack-address 172.17.0.1
pre-run-script: localstack-installation.sh
trivy-image-config: "trivy.yaml"
juju-channel: 3.1/stable
channel: 1.28-strict/stable
12 changes: 5 additions & 7 deletions docs/how-to/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ and synapse-nginx images are required in the microk8s registry. To enable it:
The following commands import the images in the Docker daemon and push them into
the registry:

cd [project_dir]/synapse_rock && rockcraft pack rockcraft.yaml
skopeo --insecure-policy copy oci-archive:synapse_1.0_amd64.rock docker-daemon:localhost:32000/synapse:latest
docker push localhost:32000/synapse:latest
cd [project_dir]/nginx_rock && rockcraft pack rockcraft.yaml
skopeo --insecure-policy copy oci-archive:synapse-nginx_1.0_amd64.rock docker-daemon:localhost:32000/synapse-nginx:latest
docker push localhost:32000/synapse-nginx:latest
cd [project_dir]/synapse_rock && rockcraft pack
skopeo --insecure-policy copy --dest-tls-verify=false oci-archive:synapse_1.0_amd64.rock docker://localhost:32000/synapse:latest
cd [project_dir]/nginx_rock && rockcraft pack
skopeo --insecure-policy copy --dest-tls-verify=false oci-archive:synapse-nginx_1.0_amd64.rock docker://localhost:32000/synapse-nginx:latest

### Deploy

Expand All @@ -95,7 +93,7 @@ juju add-model synapse-dev
# Enable DEBUG logging
juju model-config logging-config="<root>=INFO;unit=DEBUG"
# Deploy the charm (assuming you're on amd64)
juju deploy ./synapse_ubuntu-20.04-amd64.charm \
juju deploy ./synapse_ubuntu-22.04-amd64.charm \
--resource synapse-image=localhost:32000/synapse:latest \
--resource synapse-nginx-image=localhost:32000/synapse-nginx:latest
```
Expand Down
14 changes: 14 additions & 0 deletions docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,17 @@ For the smtp-integrator, insecure configurations with `transport_security=none`
authenticated connections with `auth_type=none` are not supported.

See more information in [Charm Architecture](https://charmhub.io/synapse/docs/explanation-charm-architecture).


### backup

_Interface_: s3
_Supported charms_: [s3-integrator](https://charmhub.io/s3-integrator/)

In order to perform backups, Synapse has to be integrated with the s3-integrator charm using the
endpoint backup. Backups will be stored, listed and recovered from the location
indicated in the S3 compatible object storage provider configuration provided by the integration.
The Synapse charm will back up the media files, signing keys and sqlite database file if applicable.
If Synapse database integration is used, the Synapse charm will not back up the related database.

Example backup integrate command: `juju integrate synapse:backup s3-integrator`
Loading
Loading