Newer
Older
# This script installs a MediaServer/Worker/Miris Manager/Cache server/MediaVault using envsetup on a system
# alpha-mm.ubicast.net
# 2. create system in panel
# 3. launcher.sh
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p "${DIR}/log"
LOG_FILE="${DIR}/log/launcher_$(date +%F).log"
exec > >(tee -i ${LOG_FILE})
# log envsetup version
version="$( cd "${DIR}" && git log -1 --pretty='format:%H %ad' --date=iso )"
echo "Envsetup version:"
echo "$version"
# envsetup action calls
python3 -u /root/envsetup/update_envsetup.py
python3 -u /root/envsetup/envsetup.py 31
python3 -u /root/envsetup/envsetup.py 32
python3 -u /root/envsetup/envsetup.py 33
python3 -u /root/envsetup/envsetup.py 34
python3 -u /root/envsetup/envsetup.py 35
python3 -u /root/envsetup/envsetup.py 11
python3 -u /root/envsetup/envsetup.py 12
python3 -u /root/envsetup/envsetup.py 13
python3 -u /root/envsetup/envsetup.py 21
python3 -u /root/envsetup/envsetup.py 22
python3 -u /root/envsetup/envsetup.py 28
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 26
python3 -u /root/envsetup/envsetup.py 41
python3 -u /root/envsetup/envsetup.py 28
python3 -u /root/envsetup/envsetup.py 23
python3 -u /root/envsetup/envsetup.py 24
python3 -u /root/envsetup/envsetup.py 71
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 51
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 28
python3 -u /root/envsetup/envsetup.py 72
python3 -u /root/envsetup/envsetup.py 26
mirismanager() {
python3 -u /root/envsetup/envsetup.py 23
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 61
python3 -u /root/envsetup/envsetup.py 62
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 28
python3 -u /root/envsetup/envsetup.py 81
python3 -u /root/envsetup/envsetup.py 82
python3 -u /root/envsetup/envsetup.py 25
python3 -u /root/envsetup/envsetup.py 26
python3 -u /root/envsetup/envsetup.py 52
python3 -u /root/envsetup/envsetup.py 91
python3 -u /root/envsetup/envsetup.py 111
python3 -u /root/envsetup/envsetup.py 112
[[ $2 = "--skip-tests" ]] || tests
[[ $2 = "--skip-tests" ]] || tests
[[ $2 = "--skip-tests" ]] || tests
;;
"cache")
init
cache
;;
"mv")
init
backup_server
;;
# install celerity-worker first so that vod test works
python3 -u /root/envsetup/envsetup.py 72

Florent Thiery
committed
# install netcapture
python3 -u /root/envsetup/envsetup.py 121

Florent Thiery
committed
# demokit scripts: deploy videos, custom conf, etc
python3 -u /root/envsetup/envsetup.py 131

Florent Thiery
committed
# deploy ssl self-signed certificates
python3 -u /root/envsetup/envsetup.py 133
[[ $2 = "--skip-tests" ]] || tests
"demokit-reset")
# purge content
python3 -u /root/envsetup/envsetup.py 132
# demokit scripts: deploy videos, custom conf, etc
python3 -u /root/envsetup/envsetup.py 131
;;
"exportvm")
CONF="$2"
exportvm
;;
"exportvm_local")
VM_NAME="$2"
exportvm_local
;;
*)
echo "
ms build a MediaServer & Miris Manager
mm build a Miris Manager
cache build a Cache server (munin needs manual configuration on master AND node)
mv build a MediaVault
demokit build a full demo kit
demokit-reset purge all content from demokit
After usage a log file will be generated under /root/$(date +%F)_envsetup.log
Usage: $0 exportvm
exportvm [conf_file] export VM from an hypervisor
exportvm_local [vm name] export VM from local vbox
"