zeus
4 years ago
13 changed files with 298 additions and 41 deletions
@ -1 +1 @@ |
|||||
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.ad1e967b.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.fd1c452f.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.ad1e967b.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.fd1c452f.js"></script></body></html> |
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.ad1e967b.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.5e7a93ea.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.ad1e967b.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.5e7a93ea.js"></script></body></html> |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1,29 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
SOURCE="${BASH_SOURCE[0]}" |
||||
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
||||
|
TARGET="$(readlink "$SOURCE")" |
||||
|
if [[ $TARGET == /* ]]; then |
||||
|
#echo "SOURCE '$SOURCE' is an absolute symlink to '$TARGET'" |
||||
|
SOURCE="$TARGET" |
||||
|
else |
||||
|
DIR="$( dirname "$SOURCE" )" |
||||
|
#echo "SOURCE '$SOURCE' is a relative symlink to '$TARGET' (relative to '$DIR')" |
||||
|
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
SRPATH="$( dirname "$SOURCE" )" |
||||
|
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
||||
|
if [ "$SFPATH" != "$SRPATH" ]; then |
||||
|
RDIR=$SRPATH # relativ path directory |
||||
|
fi |
||||
|
|
||||
|
cwdir=$PWD |
||||
|
wdir=$SFPATH |
||||
|
if [ "$cwdir" != "$wdir" ]; then |
||||
|
cd $wdir |
||||
|
fi |
||||
|
|
||||
docker-compose -f run.yml down |
docker-compose -f run.yml down |
||||
|
cd $cwdir |
||||
|
@ -1,5 +1,29 @@ |
|||||
#!/bin/sh |
#!/bin/bash |
||||
|
|
||||
|
SOURCE="${BASH_SOURCE[0]}" |
||||
|
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
||||
|
TARGET="$(readlink "$SOURCE")" |
||||
|
if [[ $TARGET == /* ]]; then |
||||
|
#echo "SOURCE '$SOURCE' is an absolute symlink to '$TARGET'" |
||||
|
SOURCE="$TARGET" |
||||
|
else |
||||
|
DIR="$( dirname "$SOURCE" )" |
||||
|
#echo "SOURCE '$SOURCE' is a relative symlink to '$TARGET' (relative to '$DIR')" |
||||
|
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
SRPATH="$( dirname "$SOURCE" )" |
||||
|
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
||||
|
if [ "$SFPATH" != "$SRPATH" ]; then |
||||
|
RDIR=$SRPATH # relativ path directory |
||||
|
fi |
||||
|
|
||||
|
cwdir=$PWD |
||||
|
wdir=$SFPATH |
||||
|
|
||||
|
cd $wdir |
||||
./stop.sh |
./stop.sh |
||||
./start.sh |
./start.sh |
||||
|
cd $cwdir |
||||
|
|
||||
|
@ -1,8 +1,33 @@ |
|||||
#docker service rm ondemand_playground_swarmlabclient |
#!/bin/bash |
||||
#env node7=636656brviohbzo5dhdggba0q \ |
|
||||
#env node7=qpszok5px74lqpvidoeq2wyyc \ |
SOURCE="${BASH_SOURCE[0]}" |
||||
#docker stack deploy -c run.yml ondemand_playground |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink |
||||
|
TARGET="$(readlink "$SOURCE")" |
||||
|
if [[ $TARGET == /* ]]; then |
||||
|
#echo "SOURCE '$SOURCE' is an absolute symlink to '$TARGET'" |
||||
|
SOURCE="$TARGET" |
||||
|
else |
||||
|
DIR="$( dirname "$SOURCE" )" |
||||
|
#echo "SOURCE '$SOURCE' is a relative symlink to '$TARGET' (relative to '$DIR')" |
||||
|
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
SRPATH="$( dirname "$SOURCE" )" |
||||
|
SFPATH="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
||||
|
if [ "$SFPATH" != "$SRPATH" ]; then |
||||
|
RDIR=$SRPATH # relativ path directory |
||||
|
fi |
||||
|
|
||||
|
cwdir=$PWD |
||||
|
wdir=$SFPATH |
||||
|
if [ "$cwdir" != "$wdir" ]; then |
||||
|
cd $wdir |
||||
|
fi |
||||
|
|
||||
|
|
||||
env nodepath=$PWD \ |
env nodepath=$PWD \ |
||||
docker-compose -f run.yml up -d > /dev/null 2>&1 |
docker-compose -f run.yml up -d > /dev/null 2>&1 |
||||
|
|
||||
|
cd $cwdir |
||||
|
|
||||
|
@ -1 +1 @@ |
|||||
Subproject commit acb33e1751110430ee6386fc2ad4e20e90cca230 |
Subproject commit 7034fdc050de0b0ec6d75597361a8bf4a2ce2580 |
@ -0,0 +1,65 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
|
||||
|
if [ -z ${1} ] ; then |
||||
|
echo "usage: status.sh interface " |
||||
|
exit |
||||
|
fi |
||||
|
|
||||
|
CHECK="off"; |
||||
|
ACTIVITY="off"; |
||||
|
|
||||
|
net=${1} |
||||
|
ping_c=2 # stop after sending packets |
||||
|
ping_i=1 # set interval in seconds |
||||
|
ping_w=2 # timeout in seconds |
||||
|
|
||||
|
ping_iptmp=$(ip addr show $net | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*") |
||||
|
ping_ip="$ping_iptmp.1" |
||||
|
#ping_ip=10.13.13.1 |
||||
|
|
||||
|
if [[ -d /sys/class/net/$net ]]; then |
||||
|
CHECK="on"; |
||||
|
T1=$(cat /sys/class/net/$net/statistics/tx_bytes) |
||||
|
ping -I $net -c $ping_c -i $ping_i -w $ping_w $ping_ip &> /dev/null |
||||
|
T2=$(cat /sys/class/net/$net/statistics/tx_bytes) |
||||
|
|
||||
|
tot=$(( (T2 - T1))) |
||||
|
if [ $tot -ne 0 ]; then |
||||
|
ACTIVITY="on"; |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
#echo "check $CHECK activity $ACTIVITY" |
||||
|
|
||||
|
if [ "$CHECK" == "on" ] && [ "$ACTIVITY" == "on" ] ; then |
||||
|
hybridswarm='Online' |
||||
|
else |
||||
|
hybridswarm='NotOnline' |
||||
|
fi |
||||
|
|
||||
|
dockerswarm=$(docker info --format "{{json .}}" | jq .Swarm.LocalNodeState) |
||||
|
tempswarm="${dockerswarm%\"}" |
||||
|
tempswarm="${tempswarm#\"}" |
||||
|
dockerswarm=$tempswarm |
||||
|
|
||||
|
|
||||
|
if [ "$dockerswarm" == "active" ] ; then |
||||
|
dockerswarmid=$(docker info --format "{{json .}}" | jq .Swarm.NodeID) |
||||
|
tempswarm1="${dockerswarmid%\"}" |
||||
|
tempswarm1="${tempswarm1#\"}" |
||||
|
swarmlabid=$tempswarm1 |
||||
|
else |
||||
|
swarmlabid="-1"; |
||||
|
fi |
||||
|
|
||||
|
if [ -z "$dockerswarm" ] ; then |
||||
|
dockerswarm=none |
||||
|
fi |
||||
|
|
||||
|
jq \ |
||||
|
--arg key0 'swarmlab' --arg swarmlab $dockerswarm \ |
||||
|
--arg key1 'hybrid' --arg hybrid $hybridswarm \ |
||||
|
--arg key2 'swarmlabid' --arg swarmlabid $swarmlabid \ |
||||
|
'. | .[$key0]=$swarmlab | .[$key1]=$hybrid | .[$key2]=$swarmlabid' <<<'{}' |
||||
|
|
Loading…
Reference in new issue