Skip to content

Commit

Permalink
Merge tag 'v10.0.0' of https://github.com/nyaruka/rp-archiver into up…
Browse files Browse the repository at this point in the history
…date/10.0.0

 * Update README.md
  • Loading branch information
rasoro committed Jan 22, 2025
2 parents 157c393 + f601519 commit 15ab2a1
Show file tree
Hide file tree
Showing 15 changed files with 588 additions and 530 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on: [push, pull_request]
env:
go-version: "1.22.x"
go-version: "1.23.x"
jobs:
test:
name: Test
Expand All @@ -18,6 +18,16 @@ jobs:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

minio:
image: bitnami/minio:latest
env:
MINIO_ROOT_USER: root
MINIO_ROOT_PASSWORD: tembatemba
MINIO_DEFAULT_BUCKETS: temba-archives
ports:
- 9000:9000
options: --health-cmd "mc ready local" --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -29,9 +39,6 @@ jobs:

- name: Run tests
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
env:
ARCHIVER_AWS_ACCESS_KEY_ID: ${{ secrets.ARCHIVER_AWS_ACCESS_KEY_ID }}
ARCHIVER_AWS_SECRET_ACCESS_KEY: ${{ secrets.ARCHIVER_AWS_SECRET_ACCESS_KEY }}

- name: Upload coverage
if: success()
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
v10.0.0 (2025-01-07)
-------------------------
* Update README.md

v9.3.9 (2024-12-17)
-------------------------
* Fix sending metrics

v9.3.8 (2024-12-16)
-------------------------
* Send metrics to cloudwatch and remove librato

v9.3.7 (2024-12-05)
-------------------------
* Support reading from run.path_nodes and path_times when set

v9.3.6 (2024-08-23)
-------------------------
* Fix uploading archives

v9.3.5 (2024-08-23)
-------------------------
* Improve error messages from failed S3 operations

v9.3.4 (2024-08-22)
-------------------------
* Always strip leading / from S3 keys

v9.3.3 (2024-08-22)
-------------------------
* Update to aws-sdk-go-v2

v9.3.2 (2024-07-26)
-------------------------
* Add runtime.Runtime to hold config, DB and S3
* Update to latest gocommon

v9.3.1 (2024-07-25)
-------------------------
* Re-add config option to force path style urls in S3, use minio to emulate S3 for testing

v9.3.0 (2024-07-25)
-------------------------
* Update AWS/S3 config

v9.2.0 (2024-07-17)
-------------------------
* Update dependencies
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,30 @@ We recommend running it with no changes to the configuration and no parameters,
environment variables to configure it. You can use `% rp-archiver --help` to see a list of the
environment variables and parameters and for more details on each option.

For use with RapidPro/TextIt, you will need to configure these settings:

* `ARCHIVER_DB`: URL describing how to connect to the database (default "postgres://temba:temba@localhost/temba?sslmode=disable")
* `ARCHIVER_TEMP_DIR`: The directory that temporary archives will be written before upload (default "/tmp")
* `ARCHIVER_DELETE`: Whether to delete messages and runs after they are archived, we recommend setting this to true for large installations (default false)

### AWS services:

* `ARCHIVER_AWS_ACCESS_KEY_ID`: AWS access key id used to authenticate to AWS
* `ARCHIVER_AWS_SECRET_ACCESS_KEY`: AWS secret access key used to authenticate to AWS
* `ARCHIVER_AWS_REGION`: AWS region (ex: `eu-west-1`)

For writing of archives, Archiver needs access to a storage bucket on an S3 compatible service. For AWS we recommend that
you choose SSE-S3 encryption as this is the only type that supports validation of upload ETags.

* `ARCHIVER_S3_REGION`: The region for your S3 bucket (ex: `ew-west-1`)
* `ARCHIVER_S3_BUCKET`: The name of your S3 bucket (ex: `dl-archiver-test"`)
* `ARCHIVER_S3_ENDPOINT`: The S3 endpoint we will write archives to (default "https://s3.amazonaws.com")
* `ARCHIVER_AWS_ACCESS_KEY_ID`: The AWS access key id used to authenticate to AWS
* `ARCHIVER_AWS_SECRET_ACCESS_KEY` The AWS secret access key used to authenticate to AWS
* `ARCHIVER_S3_BUCKET`: name of your S3 bucket (ex: `dl-archiver-test"`)

If using a different encryption type or service that produces non-MD5 ETags:

* `CHECK_S3_HASHES`: can be set to `FALSE` to disable checking of upload hashes.
* `ARCHIVER_CHECK_S3_HASHES`: can be set to `FALSE` to disable checking of upload hashes.

Recommended settings for error reporting:
### Logging and error reporting:

* `ARCHIVER_SENTRY_DSN`: The DSN to use when logging errors to Sentry
* `ARCHIVER_DEPLOYMENT_ID`: used for metrics reporting
* `ARCHIVER_SENTRY_DSN`: DSN to use when logging errors to Sentry
* `ARCHIVER_LOG_LEVEL`: logging level to use (default is `info`)

## Development

Expand Down
Loading

0 comments on commit 15ab2a1

Please sign in to comment.