72 Commits

Author SHA1 Message Date
Kyle Filz
17b675c833
feat: Support custom CA roots (#1015)
Mount a certificate folder to local ca storage in containers,
and add update command to cron image's entrypoint.

Result of poking and prodding from getsentry/sentry#26851
2021-07-30 18:39:47 +03:00
Burak Yigit Kaya
3a412d7d94
fix(kafka): Get Confluent images back to 5.5.0 (#1021)
Fixes #1009 by partially reverting #1002. We need to make a 21.6.2 release soon and I didn't have time to dig into why Kafka upgrades were failing so reverting for safety for now.
2021-07-02 15:11:32 +03:00
Martin Janeček
e25e36b55c
fix: raise healthcheck interval for redis, memcached and postgres (#1007)
The 2s interval caused constantly high CPU usage. 30s interval with 3 retries is the Docker default and doesn't hurt the system that much.
Fixes #1000
2021-06-28 09:54:35 +00:00
fmartinou
f5411170ac
Update middlewares to latest stable versions (#1002)
This PR is a try to update most middlewares used by Sentry to latest stable versions.
[As mentioned in the forum](https://forum.sentry.io/t/middleware-version-compatibility/14353/2) I didn't update Postgresql & Clickhouse due to known issues.

I also :
- changed versions to immutable tags (MAJOR.MINOR.PATCH semver versions when possible).
- changed nginx to the Alpine variant
2021-06-25 11:55:34 +00:00
William Desportes
f4c3096245
feat: Add healthchecks for redis, memcached and postgres (#975)
Ref: #950
2021-06-02 18:53:07 +00:00
Filippo Pacifici
8dc84600c5
feat(cdc): Prepare the self hosted environment for the Change Data Capture pipeline (#938)
We will use Change Data Capture to stream WAL updates from postgres into clickhouse so that features like issue search will be able to join event data and metadata (from postgres) through Snuba.

This requires the followings:

A logical replicaiton plugin to be installed in postgres (https://github.com/getsentry/wal2json)
A service to run that streams from the replication log to Kafka (https://github.com/getsentry/cdc)
Datasets in Snuba.
This PR is preparing postgres to stream updates via the replication log.
The idea is to

download the the replication log plugin binary during install.sh
mount a volume with the binary when starting postgres
providing a new entrypoint to postgres that ensures everything is correctly configured.
There is a difference between how this is set up and how we do the same in the development environment.
In the development environment we download the library from the entrypoint itself and store it in a persistent volume, so we do not have to download it every time.
Unfortunately this does not work here as the postgres image is postgres:9.6 while it is postgres:9.6-alpine. This one does not come with either wget or curl. I don't think installing that in the entrypoint would be a good idea, so the download happens in install.sh. I actually think this way is safer so we never depend on connectivity for postgres to start properly.
2021-05-24 17:51:36 -07:00
Sébastien PIERRE
168f3b957f
feat: Add basic healthchecks for Zookeeper & Kafka (#948)
Add basic healthchecks on Zookeeper & Kafka containers to have a view on container status. These checks are quite basic because I have no knowledge at all on these components.

Co-authored-by: Sébastien Pierre <spi@dfakto.com>
2021-05-13 10:27:26 +00:00
Burak Yigit Kaya
a95b9fa011
fix: Make relay depend on web for DNS resolution (#934)
This is a stop-gap solution to #918 until we figure out the negative DNS caching issue inside `relay`. This may also be due to Docker Compose making some assumptions/optimizations/limiting regarding cross-container access unless they are explicitly linked via the `depends_on` key.
2021-04-26 13:16:29 +03:00
Burak Yigit Kaya
e0dde9c57b
fix: Add missing snuba transactions clean up service (#924)
Follow up to #920 and #923.
2021-04-15 18:20:39 +00:00
Lyn Nagara
35a45ea7ae
fix: Ensure snuba cleanup job runs on the correct storage (#923)
Follow up to #920.
2021-04-14 11:50:15 +03:00
Lyn Nagara
aecc75b1c9
feat: Update storage target for Snuba consumer and replacer. (#920)
This change ensures that the Snuba consumer and replacer start
to fill in the new table. It should be applied once we have
backfilled data and are ready to cut over to the new storage.

Depends on https://github.com/getsentry/snuba/pull/1801
2021-04-12 20:23:53 +03:00
Burak Yigit Kaya
4d7021729b
fix(deps): Add missing snuba consumer dependencies to Sentry (#862)
These were looked over when they were added. This is not a big deal as running `docker-compose up -d` spins up all services but this fix is for correctness sake, especially for folks using this repo as a basis for more complex setups.
2021-02-15 22:42:52 +03:00
Burak Yigit Kaya
fc7fc5d0ce
fix(cron): Fix sentry-cleanup entrypoint issue (#861)
Fixes #860 and adds a test case to ensure all cleanup jobs are working.
2021-02-15 10:33:58 -05:00
Burak Yigit Kaya
a1c0c1fd0c
ref: Stop building local images for Sentry services (#834)
We used to build local images for Sentry services to be able to
include required plugins in the image. With this change we instead
do this in a custom entrypoint script and use the volume `/data`
to store the plugins permanently.

This should resolve many issues people have around building local
images and pushing them to places like private repositories or swarm
clusters.

This is not 100% compatible with the old way but it should still be
a mostly transparent change to many folks.
2021-02-04 12:15:59 +00:00
Burak Yigit Kaya
ee53f18ad0
breaking: Remove Python 2 support (#833) 2021-01-20 15:28:14 +00:00
Chad Whitacre
a623e72e7e
Integrate with MaxMind out of the box (#766)
Integrate with MaxMind out of the box
2020-12-14 11:56:04 -05:00
Burak Yigit Kaya
f885eceaec
ref(py3): Remove SENTRY_PYTHON3 and -py3 versons (#764)
This is in preparation to make the PY3 version the default for Docker images and self-hosted. It is part **4/5**:

1. ~~Add `-py2` variants for the Python 2 build tags and introduce the `SENTRY_PYTHON2` env variable usage~~ (getsentry/sentry#22460)
2. ~~Switch getsentry/onpremise to Python 3 by default*, introducing the `SENTRY_PYTHON2` env var for Py2 builds via the `-py2` suffix~~ (getsentry/onpremise#763)
3. ~~Move the unsuffixed version of the builds to Python 3~~ (getsentry/sentry#22466)
4. **Remove the `SENTRY_PYTHON3` env var support and `-py3` prefix usage from getsentry/onpremise**
5. Remove tagging of `-py3` builds from getsentry/sentry
2020-12-05 01:46:20 +03:00
Burak Yigit Kaya
06fb0d75de
ref(py3): Make PY3 the default*, add SENTRY_PYTHON (#763)
This is in preparation to make the PY3 version the default* for Docker images and self-hosted. It is part **2/5**:

1. ~~Add `-py2` variants for the Python 2 build tags and introduce the `SENTRY_PYTHON2` env variable usage~~ (getsentry/sentry#22460)
2. __Switch getsentry/onpremise to Python 3 by default*, introducing the `SENTRY_PYTHON2` env var for Py2 builds via the `-py2` suffix__
3. Move the unsuffixed version of the builds to Python 3
4. Remove the `SENTRY_PYTHON3` env var support and `-py3` prefix usage from getsentry/onpremise
5. Remove tagging of `-py3` builds from here

_* this will only happen when item 3 above gets landed_
2020-12-04 22:43:36 +03:00
Burak Yigit Kaya
9151f56620
fix(snuba): Pass SENTRY_EVENT_RETENTION_DAYS to Snuba instances too (#759)
Follow up on #754. Depends on getsentry/snuba#1526.
2020-12-01 23:56:24 +03:00
Burak Yigit Kaya
be214438f7
fix(sentry): Pass SENTRY_EVENT_RETENTION_DAYS to sentry services (#754)
We are already referencing this env var here:

19f4561a9e/sentry/sentry.conf.example.py (L62-L64)
2020-12-01 21:11:59 +03:00
Dan Fuller
a717c11a25
fix(metric_alerts): Fix transaction alerts (#739)
I only tested error alerts while testing, turns out this was broken in both dev and on-prem. This
fixes the issue.
2020-11-17 08:51:19 +03:00
Dan Fuller
066bf262aa
feat: Allow metric alerts to be used in on-prem (#735)
This enables metric alerts for all on-prem users. We just need to start a few consumers and enable
the feature.
2020-11-13 13:39:11 +03:00
Burak Yigit Kaya
1399be6a68
feat(py3): Add Python 3 support via SENTRY_PYTHON3 env variable (#702) 2020-10-14 21:54:55 +03:00
Burak Yigit Kaya
3408e3db99
fix(redis): Increase file descriptors to 10032 (#681)
@xbenjii reported the following error on #629:
>You requested maxclients of 10000 requiring at least 10032 max file descriptors.

Increasing this limit by default makes sense to make Redis more available to heaveier loads.
2020-09-23 00:17:40 +03:00
Burak Yigit Kaya
9a18a4a366
fix(kafka): Reduce Kafka resource usage (#674)
Fixes #502 and applies the suggestions from there:

- Number of partitons=1 (from 40)
- Log retention to 1 day (from 7 days)

These settings should be more suited towards the scale this repo is intended for.

NOTE: The partition count change will only affect new installs unless `sentry-kafka` and related volumes are cleaned.
2020-09-14 23:03:44 +03:00
Burak Yigit Kaya
d6247e2374
feat(env): Add SENTRY_BIND var (#512)
Closes #279, supercedes #306. This is much simpler and safer now that we have `nginx` in front of everything.

Thanks a lot @larsnystrom!
2020-09-14 22:41:53 +03:00
Burak Yigit Kaya
d83432996d
feat(clickhouse): Reduce max memory usage to 30% of RAM (#662)
Closes #616, supersedes #651

Adds an option to reduce max memory usage of Clickhouse server. Sets it to 30% of all available RAM as the default.

Co-authored-by: Renaud Chaput <renchap@gmail.com>
2020-09-08 21:06:09 +03:00
Burak Yigit Kaya
a7b2ddbf2e
upgrade(clickhouse): Use the Clickhouse version we use in prod (#630)
Co-authored-by: josh <josh@jrl.ninja>
2020-08-21 22:34:51 +03:00
Burak Yigit Kaya
86864d0edf
feat(compose): Add ability to use custom images for any Sentry service (#602)
This change allows one to override any Sentry service image, mostly for testing purposes. It also removes the SENTRY_VERSION variable as docker-compose makes it very hard to cascade default values for these. Next step is to have integration tests in getsentry/snuba and getsentry/relay (and possibly for getsentry/symbolicator) for getsentry/onpremise using this PR.

Also related: #596.
2020-07-17 15:02:45 +03:00
Burak Yigit Kaya
e82506f5b7
fix(snuba): Add consumer group to transactions consumer (#599)
Without the consumer-group option, transactions consumer and events consumer will compete for messages on the same topic and usually events win, which is the first one. This may cause some data loss for performance and make it seem not work.

Should address https://forum.sentry.io/t/perfomance-tracing-for-sentry-itself/10405/5?u=byk
2020-07-17 06:50:36 +03:00
Burak Yigit Kaya
cb83593d5b
feat(snuba): Add transactions consumer (#595)
Needed for Performance to work (see #586).

Depends on #593. Fixes #588.
2020-07-15 21:00:37 +03:00
Mike Purvis
96889a6175
Add volumed-out config directory for symbolicator. (#566)
I would like to be able to customize the configuration for my Sentry 10 symbolicator instance, which this change allows me to easily do.

See related: https://github.com/getsentry/symbolicator/issues/245

Co-authored-by: Burak Yigit Kaya <ben@byk.im>
2020-07-08 20:42:33 +03:00
Burak Yigit Kaya
2fc9811c74
build(gha): Add automated CalVer releases (#539) 2020-06-16 12:44:13 +03:00
Armin Ronacher
ff057d1d2c
feat: Add sessions snuba consumer to setup (#524)
Co-authored-by: Markus Unterwaditzer <markus@unterwaditzer.net>
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>
2020-06-02 17:04:46 +03:00
Burak Yigit Kaya
b651fc7fda
fix(versioning): Fix leftover snuba:latest in cleanup
Follow up to #509.
2020-05-23 22:38:30 +03:00
Burak Yigit Kaya
e8d8cda688
feat(versioning): Add SENTRY_VERSION env var for sentry, snuba, relay (#509)
This is in preparation for the upcoming CalVer transition. Introduces a general `$SENTRY_VERSION` env variable, defaulting to `latest`.
2020-05-23 06:24:44 +03:00
Burak Yigit Kaya
c34484ddbf
feat(kafka): Increase max message size (#497)
Fixes #402.
2020-05-18 19:22:54 +03:00
Burak Yigit Kaya
3c190eb138
upgrade(confluent): Upgrade cp-stack to 5.5.0 (#465)
Suggested [on the forum](https://forum.sentry.io/t/connection-to-kafka-failed-when-installing/9162/10?u=byk) and the [upgrade docs](https://kafka.apache.org/25/documentation.html#upgrade) suggest upgrading from `5.1.x` without a rolling upgrade should be fine by just upgrading the code.
2020-05-04 21:36:04 +03:00
Burak Yigit Kaya
4040e68267
upgrade(clickhouse): Use 19.17 as it seems to be fixing some issues (#464)
Fixes #433.
2020-05-02 08:07:12 +03:00
Burak Yigit Kaya
3244a966ec
fix(relay): Use Docker Hub as relay image registry (#462)
We regularly prune old Google Cloud Build images and also GCB registry is not accessible to everyone all the time (firewall settings, being in China, etc.)

Fixes #445.
2020-05-01 16:23:50 +03:00
Burak Yigit Kaya
ecccb211aa
fix(relay): Fix failed to write credentials (#450) 2020-04-27 20:54:59 +03:00
Joshua Gigg
d31f46831e
Use restart-policy for nginx & relay (#448) 2020-04-27 18:15:17 +03:00
Radu Woinaroski
e97da7c56f
feat(relay): Add Relay to onpremise installation (#421)
Co-Authored-By: Burak Yigit Kaya <byk@sentry.io>
2020-04-24 15:31:59 +03:00
Lyn Nagara
c20956527c
build: Update Snuba commands (#434)
Update the consumer and replacer commands. These now take a storage
instead of a dataset name as per https://github.com/getsentry/snuba/pull/875
and https://github.com/getsentry/snuba/pull/861.

This would require `getsentry/snuba:ab2e49cc1f475e59a037d882eb1cecddd23596b9` or more recent to work.
2020-04-22 22:04:57 +03:00
Markus Unterwaditzer
88991582c5
fix: Add snuba outcomes consumers to setup (#426)
* feat: Add snuba outcomes consumers to setup

* fix: Rename all references of snuba-consumer

* ref: Rename back to snuba-consumer

* fix: Change auto-offset-reset

* fix: Attempt to fix CI
2020-04-03 15:16:26 +02:00
ahmadali shafiee
d0ba529401
add volume for clickhouse logs (#414) 2020-03-30 20:42:41 +03:00
Burak Yigit Kaya
5f7c18bd18
feat(config): Mount config as a volume to Sentry (#407)
This follows the best-practice of mounting the config folder as a volume and removes the need to rebuild sentry images for config changes. Partially addresses #314.
2020-03-12 20:14:46 +03:00
ffauvel
c95eb56467
Add missing restart policy unless-stopped (#409)
Add missing restart policy unless-stopped for symbolicator-cleanup service
2020-03-12 17:41:27 +03:00
Burak Yigit Kaya
3e8ed1a680
feat(snuba): Remove redundant UWSGI settings (#408)
These became obsolete after getsentry/snuba#825
2020-03-12 17:40:02 +03:00
Burak Yigit Kaya
6979959a71
fix(postgres): Fix postgres suddenly failing after their 'patch' release
See
https://github.com/docker-library/postgres/pull/658#pullrequestreview-336007842
2020-02-15 01:39:55 +03:00