2
0

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.
This commit is contained in:
Burak Yigit Kaya 2020-01-03 13:17:35 +03:00 committed by GitHub
parent aa79f8baf9
commit 629ee07c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ var/
# Installer logs # Installer logs
pip-log.txt pip-log.txt
pip-delete-this-directory.txt pip-delete-this-directory.txt
sentry_install_log*.txt
# Unit test / coverage reports # Unit test / coverage reports
htmlcov/ htmlcov/

View File

@ -27,7 +27,7 @@ The recommended way to customize your configuration is using the files below, in
We currently support a very minimal set of environment variables to promote other means of configuration. We currently support a very minimal set of environment variables to promote other means of configuration.
If you have any issues or questions, our [Community Forum](https://forum.sentry.io/c/on-premise) is at your service! If you have any issues or questions, our [Community Forum](https://forum.sentry.io/c/on-premise) is at your service! Everytime you run the install script, it will generate a log file, `sentry_install_log-<ISO_TIMESTAMP>.txt` with the output. Sharing these logs would help people diagnose any issues you might be having.
## Event Retention ## Event Retention
@ -41,7 +41,7 @@ and [Nginx](http://nginx.org/). You'll likely want to add this service to your `
## Updating Sentry ## Updating Sentry
The included `install.sh` script is meant to be idempotent and to bring you to the latest version. What this means is you can and should run `install.sh` to upgrade to the latest version available. The included `install.sh` script is meant to be idempotent and to bring you to the latest version. What this means is you can and should run `install.sh` to upgrade to the latest version available. Remember that the output of the script will be stored in a log file, `sentry_install_log-<ISO_TIMESTAMP>.txt`, which you may share for diagnosis if anything goes wrong.
## Resources ## Resources

View File

@ -1,6 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
# Thanks to https://unix.stackexchange.com/a/145654/108960
log_file="sentry_install_log-`date +'%Y-%m-%d_%H-%M-%S'`.txt"
exec &> >(tee -a "$log_file")
MIN_DOCKER_VERSION='17.05.0' MIN_DOCKER_VERSION='17.05.0'
MIN_COMPOSE_VERSION='1.19.0' MIN_COMPOSE_VERSION='1.19.0'
MIN_RAM=2400 # MB MIN_RAM=2400 # MB