2
0
Commit Graph

45 Commits

Author SHA1 Message Date
a6ca0a9033
remove github stuff 2020-07-19 01:49:00 +02:00
Burak Yigit Kaya
094d8e38a3
fix(install): Read and set .env in install.sh (#600)
Fixes #597.
2020-07-17 15:29:55 +03:00
Burak Yigit Kaya
4f39b57a53
install(clickhouse): Ensure we have the newest transactions table (#594)
See getsentry/sentry#19882 and getsentry/sentry/#19883.

Fixes #587.
2020-07-15 20:37:51 +03:00
Burak Yigit Kaya
75fe6c073b
fix(ingest): Fix Relay auth issues and add e2e event ingestion test (#578)
This is a long-needed test that tests the whole pipeline from Nginx, Relay, to Kafka, and Snuba. The final missing piece is testing the Symbolicator integration.

This PR is also a follow up to #576 as it didn't solve the Relay issues fully (the earlier fix was a coincidence or is not as reliable as it seemed).

Fixes #486 (finally?).
2020-07-13 13:07:05 +03:00
Burak Yigit Kaya
73213bc51f
ref(relay): Remove PK and rely on INTERNAL_IPS (#572)
This patch adds `INTERNAL_IPS` definition to `sentry.conf.py` by sniffing the network from eth0 and relies on this for trusted Relays instead of the ALLOWLISTED PKs. This removes the necessity of syncing Relay PKs to `sentry.conf.py`.

This PR needs getsentry/sentry#19798 to work.
2020-07-10 23:53:50 +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
strange-developer
e75e6f1dee
fix(zookeeper): cp: cannot create regular file (#552)
Hi,

I've been through quite a few different ways of implementing this fix and settled on creating a variable to store the output of checking whether the zookeeper copy target folder exists and copying the snapshot file based on the copy target folder existing. I've ran quite a few manual tests for each option as well. Currently the PR sits on Option 3 from the below options.

**Option 1**
Judging from the [Jira issue](https://issues.apache.org/jira/browse/ZOOKEEPER-3056), it seems like the work around for zookeeper upgrades could be omitted entirely since the issue relates to upgrades from v3.4.10 to v3.5.4. I've tested removing the zookeeper workaround entirely and that install ran smoothly on a clean install of Sentry (no existing data) as well as an install of Sentry that currently has very minimal amount of log entries (roughly 100 log entries). Could we possibly remove the workaround entirely? 

**Option 2**
The second option was to simply add a check to the currently [existing line](https://github.com/getsentry/onpremise/blob/master/install.sh#L178) of whether the copy target folder exists and perform the snapshot file copy only if the copy target folder exists. This is the least amount of code and possibly the simpler fix while also setting the `ZOOKEEPER_SNAPSHOT_TRUST_EMPTY` env var to `true`, however, some unnecessary calculations will be done to determine the `ZOOKEEPER_LOG_FILE_COUNT` and `ZOOKEEPER_SNAPSHOT_FILE_COUNT`.

**Option 3**
I've created a variable to store whether the copy target folder exists and proceed with the zookeeper upgrade workaround only if the copy target folder exists. This means that if the copy target folder does not exist, the env var `ZOOKEEPER_SNAPSHOT_TRUST_EMPTY` will not be set.

Fixes #547.

Co-authored-by: chamirb <chamirb@globalkinetic.com>
2020-06-29 16:16:42 +03:00
Burak Yigit Kaya
c2120aafc9
fix(zookeeper): Temp ZK fix should run in detached mode (#525)
Fixes #519.
2020-06-02 19:45:07 +03:00
Burak Yigit Kaya
83160e8bdb
fix(gcb): We need to pull SENTRY_IMAGE on GCB
Follow up to #514.
2020-05-25 10:18:18 +03:00
Burak Yigit Kaya
3e7df7be17
fix(install): Skip pull when SENTRY_IMAGE is set (#514)
This also uses SENTRY_VERSION instead of hard-coding `:latest` as the tag when pulling (follow up to #509).
2020-05-25 01:11:19 +03:00
Burak Yigit Kaya
fe1f23f10f
fix(zk): Fix zookeper upgrade to 5.5.0 (#511)
Fixes the "logs found but no snapshot" error when upgrading from a
short-lived older version. Fixes #472.

See https://issues.apache.org/jira/browse/ZOOKEEPER-3056.
2020-05-24 23:52:30 +03:00
Lyn Nagara
29c6ef58ad
feat(snuba): Skip snuba migrate task (#495) 2020-05-18 09:16:30 +03:00
Markus Unterwaditzer
adda25ee23
feat: Instruct users to migrate TSDB (#430)
Tested this in a Ubuntu VM. The output of `date` is not too pretty but at least localized (so D/M vs M/D is not confusing)

## What is the TSDB migration?

We're effectively deprecating all TSDB backends but `sentry.tsdb.redissnuba.RedisSnubaTSDB`. We cannot reasonably support any other backend due to the fact that we would have to reimplement each of the backends in Relay, which is written in a different language. Also, like with deprecating mysql support, we don't really have the capacity to support things we do not use ourselves.

## Migration

`install.sh` should rewrite your configuration automatically and define a cutover date such that no data is lost. Before the cutover date, data is written to two backends at once, Redis and Snuba, and read from one, Redis. After the cutover date, event-related metrics will be read from Snuba which matches what we have on sentry.io.

## Manual migration guide for TSDB

In case `install.sh` is unable to migrate your files you will be given basic instructions on the console that essentially tell you to completely delete all TSDB config and paste the new, standard one. If for some reason you cannot say goodbye to your existing TSDB config, please create a new issue in this repo and cc @untitaker on it.
2020-05-12 12:02:40 +02:00
Mohamed Laradji
45320c6e86
fix(install.sh): skip checking for sse4 2 flag if kvm was detected (#485)
This PR disables checking for the SSE4.2 flag, which may not be present if the server is running in a VM even if SSE4.2 is in fact available to use (ClickHouse/ClickHouse#20). The KVM check was obtained from a [comment](https://github.com/ClickHouse/ClickHouse/issues/20#issuecomment-226849297) in that issue.

If SSE4.2 is not actually available in the VM, then the installation script may fail in an unpredictable way. Perhaps we can add a keyword argument to the script to let the user decide if they want to skip the check.
2020-05-09 23:10:08 +03:00
Burak Yigit Kaya
024024b198
ref(relay): More robust Relay credentials setting (#470)
This patch does two things:

1. Separate creating of Relay credentials from syncing them to Sentry config
2. Has a more flexible Relay credentials check and sync: look for the quoted public key in the config file, if it is there, assume this must be correctly set as it is very unlikely to have that random key in a different context with quotes around. The second one is to allow having other whitelisted relay keys by using an append method when adding the new key.
2020-05-04 21:44:34 +03:00
Burak Yigit Kaya
8c053b661a
feat(relay): Use a simpler hack for credentials (#452) 2020-04-27 21:35:59 +03:00
Burak Yigit Kaya
ecccb211aa
fix(relay): Fix failed to write credentials (#450) 2020-04-27 20:54:59 +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
Burak Yigit Kaya
b2076eaeed
ref(install): Reduce noise on docker-compose pull (#442) 2020-04-24 15:13:38 +03:00
Rob Nieuwenhuizen
3e0ca482c2
Make secret key generation idempotent (#390)
Only generate secret key if not set
2020-02-25 16:08:13 +03:00
Vernon Hockney
ce5834b8cf
fix(install): Update exit status and fix premature exit (#375)
Update exit -1 to exit 1 in line with best practices
Fixes premature exit of the script when checking for sse42 support. The
script would exit before displaying the reason for failure to the user.
2020-02-03 21:01:12 +03:00
Amphaal
cd1f9e811e
Check SSE4.2 compatibility before installation (#361)
Fixes #358.
2020-01-29 16:29:38 +03:00
Burak Yigit Kaya
1292a125b8
fix(install): Remove unnecessary infinite loop from snuba bootst… (#354)
With getsentry/snuba#709 merged, we no longer need to randomly try forever creating Kafka topics, which were a prerequisite for creating Clickhouse tables. This patch also removes the preceding (and obsolete) `docker-compose up` statement which was used to "speed up" the `snuba bootstrap` command in the hopes to fix it.
2020-01-21 22:56:45 +03:00
Burak Yigit Kaya
b8405fca76
build(compose): Bump required compose version (#353)
With #343, we added the `--parallel` flag which only got introduced in `docker-compose` `1.23.0` (source https://medium.com/schkn/parallelize-your-docker-compose-build-8ac653e3e596 as Docker docs themselves don't really mention these) so bumping the minimum required version.

Fixes #351.
2020-01-21 22:56:04 +03:00
Burak Yigit Kaya
70674e252a
fix(data-migration): Make sure to chown the /data folder on sentry (#336)
Fixes #334.
2020-01-13 22:25:27 +03:00
Burak Yigit Kaya
a655b4799c
feat(build): Enable parallel builds for docker-compose (#343) 2020-01-12 18:53:54 +03:00
Burak Yigit Kaya
d6951a2c32
fix(install): Fix secret key gen on BSD (#338)
Fixes #330.
2020-01-10 12:34:36 +03:00
Simon Golms
bc23448141 fix(install): support for Windows and Git Bash (#335)
Fixes #329.
2020-01-09 22:55:20 +03:00
Burak Yigit Kaya
753683d3d6
ref(install): Remove manual eventstream backfill (#318)
This became obsolete thanks to getsentry/sentry#16226
2020-01-03 23:28:43 +03:00
Burak Yigit Kaya
1d33ae6b04
fix(migration): Move Snuba bootstrapping before DB upgrade (#317)
Since we are [moving the eventstream into a proper db migration](https://github.com/getsentry/sentry/pull/16226), we need Snuba and its friends ready at the time of `sentry upgrade` command. This patch does exactly that.

Co-authored-by: Lyn Nagara <lyn.nagara@gmail.com>
2020-01-03 22:52:22 +03:00
Burak Yigit Kaya
4a82e9fa1d
feat(logs): Cleaner logs w/o ANSI sequences (#316) 2020-01-03 22:06:33 +03:00
Burak Yigit Kaya
629ee07c79
feat(install): Add automatic logs to install script (#312)
This change makes the install script create a new install log file, `sentry_install_log-<ISO_TIMESTAMP>.txt`, for each run and records all the output there for future reference.
2020-01-03 13:17:35 +03:00
Burak Yigit Kaya
3dfc01ec2d
fix(upgrade): Fix upgrade instructions and script (#304) 2019-12-30 23:07:42 +03:00
Burak Yigit Kaya
ba67058070
feat(upgrade): Add automatic Snuba migration for upgrades (#292)
Upgrades existing events from last `$SENTRY_EVENT_RETENTION_DAYS`
to Snuba automatically. Relies on getsentry/sentry#15934.
2019-12-09 21:33:02 +03:00
Burak Yigit Kaya
3c9e8c28ff
fix(sentry-data): Don't migrate when not needed (#297)
With this patch, `./install.sh` becomes safer as it won't recursively move things under `/data/file`. It also won't try to migrate an empty volume.
2019-12-09 21:18:43 +03:00
Burak Yigit Kaya
4af4ecfd0e
fix(install): Don't run migrations in interactive mode (#296)
This should fix the GCB failures.
2019-12-06 23:21:54 +03:00
Burak Yigit Kaya
89e8053c40
fix(data): Use /data for persisting files and file caches (#295)
Moves sentry-data volume to /data mount point and sets all file-based storage settings to /data/files, /data/dsym-cache etc. accordingly. See 50ac550666/src/sentry/options/defaults.py (L45-L54)
2019-12-06 03:32:31 +03:00
Burak Yigit Kaya
ddabbe96c6
feat(postgres): Add auto upgrade from pg 9.5 to 9.6 (#283) 2019-11-27 03:14:09 +03:00
Burak Yigit Kaya
9d21847218
fix(snuba): Add migrate call on setup (#281)
We need to run `snuba migrate` to be able to safely upgrade between Snuba versions
2019-11-25 23:01:14 +03:00
Burak Yigit Kaya
5d064c2224
feat(sentry10): Make on-premise work for Sentry 10 (#220) 2019-11-12 02:18:59 +03:00
Thomas Lutz
fc24bd4b82 fix(build): make version checker more robust in install (#260)
Resolves #246.
2019-10-24 01:14:53 +03:00
Burak Yigit Kaya
ea78661e36
build(travis): Use :latest tag for getsentry/sentry (#252) 2019-10-14 21:31:38 +03:00
Burak Yigit Kaya
13b510fc14
fix(install): Fix invalid reference format again (#231)
Fix #230.
2019-07-26 09:50:46 +03:00
Burak Yigit Kaya
ce1d259834
fix: Update minimum Docker version (#217)
Required after #211. Fixes #213.
2019-07-17 22:13:23 +03:00
Burak Yigit Kaya
c42fc264df feat(install): Add fully automated install script
This adds a fully automated `install.sh` that does the following:

- Checks minimum Docker and `docker-compose` versions
- Checks minimum RAM available to Docker containers
- Removes potential user errors in install steps
2019-07-02 00:23:31 +03:00