Add 'wdcli monday' command
This commit is contained in:
parent
fc3b9170a6
commit
df4cfa3567
7 changed files with 75 additions and 110 deletions
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# read the lib/shared.sh and read the slug argument.
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "$DIR"
|
||||
source "$DIR/lib/lib.sh"
|
||||
|
||||
# Read the 'GRAPHDB_ZIP' argument from the command line.
|
||||
# If it's not set, throw an error.
|
||||
GRAPHDB_ZIP=$1
|
||||
if [ -z "$GRAPHDB_ZIP" ]; then
|
||||
log_error "Usage: monday.sh GRAPHDB_ZIP"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
|
||||
# Backup
|
||||
log_info " => Running backup, this will take a long time"
|
||||
bash backup_all.sh
|
||||
|
||||
# system install
|
||||
log_info " => Reinstalling system"
|
||||
bash system_install.sh "$GRAPHDB_ZIP"
|
||||
|
||||
# rebuild all the systems
|
||||
log_info " => Rebuilding all instances"
|
||||
bash rebuild_all.sh
|
||||
|
||||
# perform all the blind updates
|
||||
log_info " => Performing updates"
|
||||
bash blind_update_all.sh
|
||||
|
||||
log_info " => Done, have a great week"
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# read the lib/shared.sh and read the slug argument.
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "$DIR"
|
||||
source "$DIR/lib/lib.sh"
|
||||
|
||||
# Read the 'GRAPHDB_ZIP' argument from the command line.
|
||||
# If it's not set, throw an error.
|
||||
GRAPHDB_ZIP=$1
|
||||
if [ -z "$GRAPHDB_ZIP" ]; then
|
||||
log_error "Usage: monday_short.sh GRAPHDB_ZIP"
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
|
||||
# Backup
|
||||
log_info " => Running backup, this will take a long time"
|
||||
bash backup_all.sh
|
||||
|
||||
# system install
|
||||
log_info " => Reinstalling system"
|
||||
bash system_install.sh "$GRAPHDB_ZIP"
|
||||
|
||||
# rebuild all the systems
|
||||
log_info " => Rebuilding all instances"
|
||||
bash rebuild_all.sh
|
||||
|
||||
log_info " => Done, have a great week"
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# read the lib/shared.sh
|
||||
DISABLE_LOG=1
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
cd "$DIR"
|
||||
source "$DIR/lib/lib.sh"
|
||||
DISABLE_LOG=0
|
||||
|
||||
log_info " => Writing prefix configuration"
|
||||
|
||||
echo -n "# Prefix configuration, last updated on" | tee "$DEPLOY_PREFIX_CONFIG"
|
||||
date | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||
|
||||
# update all the instances
|
||||
for slug in $(sql_bookkeep_list); do
|
||||
INSTANCE_DOMAIN="$(compute_instance_url "$slug")"
|
||||
|
||||
read -r INSTANCE_BASE_DIR MYSQL_DATABASE MYSQL_USER GRAPHDB_REPO GRAPHDB_USER GRAPHDB_PASSWORD <<< "$(sql_bookkeep_load "${slug}" "filesystem_base,sql_database,sql_user,graphdb_repository,graphdb_user,graphdb_password" | tail -n +2)"
|
||||
|
||||
INSTANCE_NOPREFIX_FILE="$(compute_instance_noprefixfile "$INSTANCE_BASE_DIR" )"
|
||||
INSTANCE_PREFIX_FILE="$(compute_instance_prefixfile "$INSTANCE_BASE_DIR" )"
|
||||
if [ -f "$INSTANCE_NOPREFIX_FILE" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
pushd "$INSTANCE_BASE_DIR" > /dev/null
|
||||
|
||||
echo "$INSTANCE_DOMAIN:" | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||
docker-compose exec barrel /user_shell.sh -c "drush php:script /wisskiutils/list_uri_prefixes.php" | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||
|
||||
if [ -f "$INSTANCE_PREFIX_FILE" ]; then
|
||||
cat "$INSTANCE_PREFIX_FILE" | tee -a "$DEPLOY_PREFIX_CONFIG"
|
||||
fi
|
||||
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
log_info " => Restarting resolver"
|
||||
|
||||
cd "$DEPLOY_RESOLVER_DIR"
|
||||
docker-compose restart
|
||||
Loading…
Add table
Add a link
Reference in a new issue