Skip to content

Commit

Permalink
aldaas on client side
Browse files Browse the repository at this point in the history
  • Loading branch information
Negashev committed Dec 29, 2023
1 parent e5bb014 commit dbf72e0
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions tunnel/aldaas.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
#!/bin/sh
ALDAAS_AWT=aldaas-chart
ALDAAS_PROTOCOL="${ALDAAS_PROTOCOL:-ws}"
ALDAAS_SERVER="${ALDAAS_SERVER:-$ARGO_SERVER}"
ALDAAS_PORT="${ALDAAS_PORT:-5432}"

argo submit --from workflowtemplate/$ALDAAS_AWT --watch
aldaas_name=""
# check save
FILE=/tmp/aldaas
if [ -f "$FILE" ]; then
echo "save file exists."
aldaas_name=`cat $FILE`
# check wf exist
if ! argo get $aldaas_name; then
aldaas_name=""
echo "Not found $aldaas_name"
else
echo "Use saved $aldaas_name"
fi
fi

# if no save create new aldaas wf
if [[ -z $aldaas_name ]]; then
aldaas_name=`argo submit --from workflowtemplate/$ALDAAS_NAME -o name`
argo watch $aldaas_name
echo $aldaas_name > $FILE
fi

tcp-over-websocket client -listen_tcp 0.0.0.0:$ALDAAS_PORT -connect_ws "$ALDAAS_PROTOCOL://$ALDAAS_SERVER/$ALDAAS_NAME/$ALDAAS_TOKEN/$aldaas_name"

0 comments on commit dbf72e0

Please sign in to comment.