We get `docker: 'compose' is not a docker command.` on the console when we are checking for `docker compose` availability. This PR hides these messages.
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
Starting from `docker-compose` v1.28.0, the `--no-ansi` option is deprecated and a new, `--ansi never` option is introduced instead. This PR makes the deprecation warnings around this go away but bumps the minimum docker-compose version required to `1.28.0` as the older versions don't support the new option.
Turns out the latest, `7.78.0` may have issues with DNS resolution from time to time (I experienced this locally). It is also a good practice to fix it to a specific version.
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
There is a potential conrner case where we may end up with the wal2json library in the `postgres/wal2json/VERSION/file` but not in `postgres/wal2json/wal2json.so`.
Not sure exactly how likely this could be, but thechnically it is possible that the download succeeds and `cp "../postgres/wal2json/$VERSION/$FILE_NAME" "$FILE_TO_USE"` does not. The next attempt the copy would not be attempted.
This fix ensures the copy always happens
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
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.
Removes the obsolete `echo ''` at the end, fixes detection as `python --version` outputs to `stderr` instead of `stdout` in versions prior to 3.4 or something.