Skip to content

Commit

Permalink
Merge pull request #1366 from seokho-son/main
Browse files Browse the repository at this point in the history
Apply changed request body of remote cmd to scripts
  • Loading branch information
seokho-son authored Oct 12, 2023
2 parents 8b41e8a + 36f7186 commit 996c283
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for row in $(echo "${VMARRAY}" | jq -r '.[] | @base64'); do
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$VMID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${USERCMD}"
"command" : "[${USERCMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ echo "[Prepare fping (CMD: $LAUNCHCMD)]"
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF
)
Expand Down Expand Up @@ -134,7 +134,7 @@ LAUNCHCMD="fping -e $VMLIST"
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF
)
Expand Down Expand Up @@ -191,7 +191,7 @@ echo ""
# VAR1=$(
# curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$i -H 'Content-Type: application/json' -d @- <<EOF
# {
# "command" : "${LAUNCHCMD}"
# "command" : "[${LAUNCHCMD}]"
# }
# EOF
# )
Expand Down
4 changes: 2 additions & 2 deletions src/testclient/scripts/sequentialFullTest/command-mcis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ if [ -z "$VMID" ]; then
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${USERCMD}"
"command" : "[${USERCMD}]"
}
EOF
)
else
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$VMID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${USERCMD}"
"command" : "[${USERCMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CMD="cat /etc/hosts"
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CMD="ls ${DESTPATH}"
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if [ "${INDEX}" == "0" ]; then
MCISID=${POSTFIX}
fi

CMD="wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/setcbdf.sh -O ~/setcbdf.sh; chmod +x ~/setcbdf.sh; ~/setcbdf.sh"
echo "CMD: $CMD"

curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d \
'{
"command": "wget https://raw.githubusercontent.com/cloud-barista/cb-tumblebug/main/scripts/setcbdf.sh -O ~/setcbdf.sh; chmod +x ~/setcbdf.sh; ~/setcbdf.sh"
"command" : "[${CMD}]"
}' | jq '' #|| return 1

MCISINFO=`curl -H "${AUTH}" -sX GET http://$TumblebugServer/tumblebug/ns/$NSID/mcis/${MCISID}?option=status`
Expand Down
4 changes: 2 additions & 2 deletions src/testclient/scripts/sequentialFullTest/deploy-fps-game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo ""

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${INSTALLCMD}"
"command" : "[${INSTALLCMD}]"
}
EOF
)
Expand All @@ -40,7 +40,7 @@ LAUNCHCMD="cd Xonotic/; nohup ./xonotic-linux64-dedicated 1>server.log 2>&1 &"
echo "Launching Xonotic for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$MASTERVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "CMD: $CMD"

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${CMD}"
"command" : "[${CMD}]"
}
EOF
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ LAUNCHCMD="sudo scope stop"
echo "Stopping Weavescope for master node if exist..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -83,7 +83,7 @@ LAUNCHCMD="sudo scope launch $IPLIST $PRIVIPLIST"
echo "Launching Weavescope for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$MASTERVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF
#LAUNCHCMD="sudo scope launch $MASTERIP"
Expand All @@ -99,7 +99,7 @@ echo "Working on clustring..."
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ echo ""

VAR1=$(curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${INSTALLCMD}"
"command" : "[${INSTALLCMD}]"
}
EOF
)
Expand All @@ -72,7 +72,7 @@ echo ""
echo "Launching Weavescope for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID/vm/$MASTERVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF
#LAUNCHCMD="sudo scope launch $MASTERIP"
Expand All @@ -88,7 +88,7 @@ echo "Working on clustring..."
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ LAUNCHCMD="sudo scope stop"
echo "Stopping Weavescope for master node if exist..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$LORDMCIS/vm/$LORDVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -117,7 +117,7 @@ LAUNCHCMD="sudo scope launch $WHOLE_IPLIST"
echo "Launching Weavescope for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$LORDMCIS/vm/$LORDVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -134,7 +134,7 @@ EOF
# echo "Launching Weavescope for the other nodes..."
# curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
# {
# "command" : "${LAUNCHCMD}"
# "command" : "[${LAUNCHCMD}]"
# }
# EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ for MCISID in "$@"; do
VAR1=$(
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${INSTALLCMD}"
"command" : "[${INSTALLCMD}]"
}
EOF
)
Expand All @@ -114,7 +114,7 @@ LAUNCHCMD="sudo scope stop"
echo "Stopping Weavescope for master node if exist..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$LORDMCIS/vm/$LORDVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -125,7 +125,7 @@ LAUNCHCMD="sudo scope launch $WHOLE_IPLIST"
echo "Launching Weavescope for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$LORDMCIS/vm/$LORDVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -142,7 +142,7 @@ for MCISID in "$@"; do
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ done
echo "Launching Weavescope for master node..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$LORDMCIS/vm/$LORDVM -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand All @@ -124,7 +124,7 @@ for MCISID in "$@"; do
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
echo "Launching Weavescope for the other nodes..."
curl -H "${AUTH}" -sX POST http://$TumblebugServer/tumblebug/ns/$NSID/cmd/mcis/$MCISID -H 'Content-Type: application/json' -d @- <<EOF
{
"command" : "${LAUNCHCMD}"
"command" : "[${LAUNCHCMD}]"
}
EOF

Expand Down

0 comments on commit 996c283

Please sign in to comment.