From 95038313e9c80e4a76259ae4a6c5c86bf8c188a9 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 9 Oct 2019 11:17:15 +0200 Subject: [PATCH] improved pre-run checks in upgrade scripts --- doc/elastic_upgrade.md | 2 ++ doc/postgres_upgrade.md | 2 ++ scripts/elastic-upgrade.sh | 24 ++++++++++++++++++------ scripts/postgre-upgrade.sh | 8 +++++++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/doc/elastic_upgrade.md b/doc/elastic_upgrade.md index c6315bb9f..c07e1f128 100644 --- a/doc/elastic_upgrade.md +++ b/doc/elastic_upgrade.md @@ -8,6 +8,8 @@ We've wrote a script to automate the process while keeping your data integrity, - You need to install *curl*, *jq*, *GNU awk* and *sudo* on your system before running the script. Usually, `apt update && apt install curl jq sudo gawk`, ran as root, will do the trick but this may change, depending upon your system. +- Your current user must be part of the *docker* and *sudo* groups. + Using the root user is a possible alternative, but not recommended. - You'll need at least 4GB of RAM for the data migration to complete successfully. The script will try to add 4GB of swap memory if this requirement is detected as missing but this will consume you hard disk space (see below). - 1,2GB of free disk space are also required to perform the data migration. diff --git a/doc/postgres_upgrade.md b/doc/postgres_upgrade.md index 6e94f3507..f79a2d069 100644 --- a/doc/postgres_upgrade.md +++ b/doc/postgres_upgrade.md @@ -8,6 +8,8 @@ We've wrote a script to automate the process while keeping your data integrity, - You need to install *curl*, *GNU awk* and *sudo* on your system before running the script. Usually, `apt update && apt install curl gawk sudo`, ran as root, will do the trick but this may change, depending upon your system. +- Your current user must be part of the *docker* and *sudo* groups. + Using the root user is a possible alternative, but not recommended. - A bit of free disk space is also required to perform the data migration. The amount needed depends on your current database size, the script will check it and tell you if there's not enough available space. - This script should run on any Linux or MacOS systems if you installed ElasticSearch using docker-compose. diff --git a/scripts/elastic-upgrade.sh b/scripts/elastic-upgrade.sh index fd91b2c00..9d856c6c2 100755 --- a/scripts/elastic-upgrade.sh +++ b/scripts/elastic-upgrade.sh @@ -15,6 +15,24 @@ config() echo "It is not recommended to run this script as root. As a normal user, elevation will be prompted if needed." read -rp "Continue anyway? (y/n) " confirm