Commit 5a0c370d authored by Johannes Kiesel's avatar Johannes Kiesel

add util mturk-manager-frontend

parent 6d0ec658
......@@ -27,10 +27,11 @@ betamng Low level scripts for managing Betaweb.
betaweb High level scripts for betaweb, e.g. hadoop management.
check_ram
htop Print the clipboard to standard output
htop Show system load of all betaweb nodes using clusterssh and htop
restart_hadoop_ressourcemanager Restart hadoop ressource manager on betaweb020 and restarts nodemanager
rolling_restart Restart betaweb nodes one after another
rolling_state Apply Salt state on nodes one after another
ssh SSH into all betaweb nodes using clusterssh
status Get status of betaweb via salt
core Core functions of the Webis command.
......@@ -75,6 +76,7 @@ util General helper tools and utilities
backup-btrfs-vol Take a snapshot of a btrfs subvolume and back up its contents to another location
list-buw-dns List all assigned Webis host names / IP addresses at BUW
login Get user name for a university login
mturk-manager-frontend Start the MTurk manager frontend on your machine
parallel-idrac Execute idrac command in parallel across multiple hosts
patch-jar Add files from one jar to another
read-from-clipboard Print the clipboard to standard output
......
#!/bin/bash
# Start the MTurk manager frontend on your machine
#
# Copyright 2019-today
#
# Project WEBIS
# Author: Johannes Kiesel
scriptPath=${0%/*}
. "$scriptPath"/../../libs/bashhelper.sh
. "$scriptPath"/../../libs/shflags
check_tools "docker"
image=kritten/mturk-manager-frontend
default_tag=1.7.3
default_port=8000
internal_port=80
#
# Define usage screen.
#
usage() {
echo "usage:
$(basename "$0")
description:
start the MTurk Manager frontend on your machine
"
}
#
# Define command line arguments and parse them.
#
DEFINE_integer "port" "$default_port" "Local port at which to access the frontend." "p"
DEFINE_string "tag" "$default_tag" "Tag of $image to use" "t"
FLAGS_HELP=$(usage)
export FLAGS_HELP
FLAGS "$@" || exit 1 # Parse command line arguments.
eval set -- "${FLAGS_ARGV}"
#
# Main
#
main() {
logInfo "Starting the MTurk Manager frontend ($image:$FLAGS_tag) at port $FLAGS_port"
logInfo "Log in at http://localhost:8080"
logInfo "URL: https://mturk-manager.webis.de/"
logInfo "Token: <ask in Discord>"
if groups | grep &>/dev/null '\bdocker\b'; then
docker run -p $FLAGS_port:$internal_port $image:$FLAGS_tag
else
sudo docker run -p $FLAGS_port:$internal_port $image:$FLAGS_tag
fi
}
#
# Start programm with parameters.
#
main "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment