100 Commits

Author SHA1 Message Date
Ethan Smith
6976baee0a
ci: Check health of services after running integration tests and fix snuba-replacer
Also remove batching from snuba-replacer. This was removed in 6e98074596

Co-authored-by: Chad Whitacre <chadwhitacre@sentry.io>
2023-01-11 14:51:52 -08:00
Ethan Smith
dbb89bfdda
Set higher kafka healthcheck timeout and fix clickhouse timeout (#1855)
This increases the timeout of kafka based on failures such as https://self-hosted.getsentry.net/organizations/self-hosted/issues/18/events/d9ae718413c94659b20b785ab0bb8aa8/?project=3&query=is%3Aunresolved&referrer=previous-event&sort=freq&statsPeriod=14d

Also fix the timeout of clickhouse, which was incorrectly set much too long.
2022-12-08 10:38:13 -08:00
kl
240361942c
Fix commit-log-topic parameter configuration problem (#1817)
* Fix the problem that the commit-log-topic of the transactions consumer group is incorrect after post-process-forwarders split errors and transactions

* remove commit-log-topic param from snuba transaction consumer

Co-authored-by: hubertdeng123 <hubertdeng123@gmail.com>
2022-12-07 10:02:00 -08:00
Chad Whitacre
4a02090030
Split post process forwarders (#1759) 2022-10-17 17:34:14 -04:00
Chad Whitacre
ddbf7cd2d0
Add ARM support (#1538)
Co-authored-by: Ethan Smith <ethan.smith@sentry.io>
2022-07-08 19:03:52 -07:00
goganchic
3cbe130188
do not use gosu for snuba-transactions-cleanup and snuba-cleanup (#1564) 2022-07-08 11:23:59 -07:00
goganchic
2672ce5452
Improve installation through proxy (#1543) 2022-06-28 17:57:21 -04:00
Amin Vakil
2f33d574b8
Bump nginx:1.22.0-alpine (#1506) 2022-06-27 11:51:37 -04:00
yuval1986
569cc8e3ad
fix "services.web.healthcheck.retries must be a number" (#1482)
fix https://github.com/getsentry/self-hosted/issues/1343
2022-06-14 08:49:33 -04:00
Elan Ruusamäe
084ce62ff9
Add volume for nginx cache (#1511) 2022-06-14 08:25:07 -04:00
Lyn Nagara
6c88b78de6
snuba: New subscriptions infrastucture rollout (#1507)
We have rebuilt the Snuba subscriptions infrastructure to help with scaling
subscriptions in SaaS. Hopefully it will be a bit more stable for self hosted
as well. It's configured to be able to recover more quickly from any downtimes or
backlogs as it ignores stale subscriptions and only executes and delivers alerts
on recent ones.
2022-06-09 08:13:51 -04:00
Benedikt Franke
9eff0c3b4d
Ease modification of base image (#1479) 2022-05-25 12:54:29 -04:00
Elan Ruusamäe
06d6666883
Docker-Compose: Avoid setting hostname to '' (#1365) 2022-03-14 16:16:30 -04:00
Amin Vakil
e0a8aef06d
Bump nginx:1.21.6-alpine (#1319) 2022-02-11 18:13:34 -05:00
Amin Vakil
433493b437
Make healthcheck variables configurable in .env (#1248) 2022-01-10 09:22:16 -05:00
Chad Whitacre
7eb16f348d
Take some actions to avoid unhealthy containers (#1241) 2022-01-07 09:00:02 -05:00
Amin Vakil
0cea537a2a
Bump nginx:1.21.5-alpine (#1230) 2021-12-30 08:18:33 -05:00
Chad Whitacre
c258a1e939
Rename onpremise to self-hosted (#1169) 2021-12-02 08:38:22 -05:00
Chad Whitacre
5495fe2ebf Revert "Rename onpremise to self-hosted"
This reverts commit 9ad05d87d371973112028882e4d2857b0a17eba2.
2021-11-24 15:07:49 -05:00
Chad Whitacre
9ad05d87d3 Rename onpremise to self-hosted
https://github.com/getsentry/self-hosted/issues/796
2021-11-24 15:06:13 -05:00
Amin Vakil
c3013fec1c
Bump nginx:1.21.4-alpine (#1156) 2021-11-18 08:43:20 -05:00
EricsonMacedo
78a5c3cb87
feat: Support docker compose CLI (#1116)
Check if docker compose v2, CLI, is available and get semantic version
from it, or fallback to get semantic version out of docker-compose v1
when checking minimum requirements during install.sh script

Fixes #962
2021-10-15 21:21:19 +03:00
Burak Yigit Kaya
b32de84d31
feat(smtp): Add hostname to SMTP (#1076)
Fixes #1045.

Co-authored-by: William Desportes <williamdes@wdes.fr>
Co-authored-by: Chad Whitacre <chadwhitacre@sentry.io>
2021-08-26 10:40:22 -04:00
Burak Yigit Kaya
674a600770
fix(compose): Drop version from compose file (#1074)
We've switched to using the [compose spec](https://github.com/compose-spec/compose-spec/blob/master/spec.md) with the recent upgrades and health-check related upgrades anyway so drop the incorrect and confusing compose file version.
2021-08-24 09:26:52 -04:00
Burak Yigit Kaya
610f7136bc
fix(healthcheck): Increase retries to 5 (#1072)
Fixes #1070.
2021-08-19 16:12:09 +00:00
Burak Yigit Kaya
59c0df393f
fix(clickhouse): Use correct HTTP port for healthcheck (#1069)
Should fix #1058
2021-08-19 09:21:18 +00:00
Burak Yigit Kaya
9aa34dd612
feat: Leverage health checks for depends_on (#1057)
Expands the work on #1053 to all applicable services.
2021-08-06 09:20:01 -04:00
Florian Fuß
d11fb14cee
fix(snuba-api): wait for clickhouse to be healthy (#1053)
To avoid a race condition in install.sh process at step
7e7401a668/install/bootstrap-snuba.sh (L4)


Closes #1033
2021-08-05 10:13:05 +00:00
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