зеркало из https://github.com/microsoft/AMBROSIA.git
Back off from running hello world under non-docker CI. Deadlocks/nontermination issues. Add --no-deploy option for main AKS script entrypoint.
This commit is contained in:
Родитель
8bcd12ddda
Коммит
e043cb7e20
|
@ -15,34 +15,48 @@ if [ ! -e Defs/AmbrosiaAKSConf.sh ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
while [ $# -ge 1 ]; do
|
||||
case $1 in
|
||||
--deploy-only) DEPLOY_ONLY=1; shift ;;
|
||||
*)
|
||||
echo "Unrecognized command line argument: $1"
|
||||
exit 1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "$0: Provision and run an AMBROSIA app on Azure Kubernetes Service"
|
||||
echo "Running with these user settings:"
|
||||
( export ECHO_CORE_DEFS=1; source `dirname $0`/Defs/Common-Defs.sh)
|
||||
echo
|
||||
|
||||
source Defs/Common-Defs.sh # For PUBLIC_CONTAINER_NAME
|
||||
|
||||
# This should perform IDEMPOTENT OPERATIONS
|
||||
#------------------------------------------
|
||||
|
||||
# STEP 0: Create Azure resources.
|
||||
./Provision-Resources.sh
|
||||
if ! [ ${DEPLOY_ONLY:+defined} ]; then
|
||||
|
||||
# STEP 0: Create Azure resources.
|
||||
./Provision-Resources.sh
|
||||
|
||||
# STEPs 1-3: Secrets and Authentication
|
||||
if [ ${PUBLIC_CONTAINER_NAME:+defined} ]; then
|
||||
echo "---------PUBLIC_CONTAINER_NAME set, not creating AKS/ACR auth setup---------"
|
||||
else
|
||||
./Grant-AKS-access-ACR.sh
|
||||
./Create-AKS-ServicePrincipal-Secret.sh # TODO: bypass if $servicePrincipalId/$servicePrincipalKey are set
|
||||
fi
|
||||
./Create-AKS-SMBFileShare-Secret.sh
|
||||
|
||||
# STEP 4: Building and pushing Docker.
|
||||
if [ ${PUBLIC_CONTAINER_NAME:+defined} ]; then
|
||||
echo "---------PUBLIC_CONTAINER_NAME set, NOT building Docker container locally---------"
|
||||
else
|
||||
./Build-AKS.sh "../../InternalImmortals/PerformanceTestInterruptible/"
|
||||
fi
|
||||
|
||||
# STEPs 1-3: Secrets and Authentication
|
||||
source Defs/Common-Defs.sh # For PUBLIC_CONTAINER_NAME
|
||||
if [ ${PUBLIC_CONTAINER_NAME:+defined} ]; then
|
||||
echo "---------PUBLIC_CONTAINER_NAME set, not creating AKS/ACR auth setup---------"
|
||||
else
|
||||
./Grant-AKS-access-ACR.sh
|
||||
./Create-AKS-ServicePrincipal-Secret.sh # TODO: bypass if $servicePrincipalId/$servicePrincipalKey are set
|
||||
fi
|
||||
./Create-AKS-SMBFileShare-Secret.sh
|
||||
|
||||
# STEP 4: Building and pushing Docker.
|
||||
if [ ${PUBLIC_CONTAINER_NAME:+defined} ]; then
|
||||
echo "---------PUBLIC_CONTAINER_NAME set, NOT building Docker container locally---------"
|
||||
else
|
||||
./Build-AKS.sh "../../InternalImmortals/PerformanceTestInterruptible/"
|
||||
fi
|
||||
|
||||
|
||||
# STEP 5: Deploy two pods.
|
||||
echo "-----------Pre-deploy cleanup-----------"
|
||||
echo "These are the secrets Kubernetes will use to access files/containers:"
|
||||
|
@ -54,12 +68,19 @@ time $KUBE delete pods,deployments -l app=generated-perftestclient
|
|||
time $KUBE delete pods,deployments -l app=generated-perftestserver
|
||||
$KUBE get pods
|
||||
|
||||
# [2018.12.03] If we run a DUMMY SERVICE here, the Coordinators do get to a "Ready" state.
|
||||
./Deploy-AKS.sh perftestserver \
|
||||
'runAmbrosiaService.sh Server --sp '$LOCALPORT1' --rp '$LOCALPORT2' -j perftestclient -s perftestserver -n 1 -c'
|
||||
# ./Deploy-AKS.sh perftestserver \
|
||||
# 'runAmbrosiaService.sh Server --sp '$LOCALPORT1' --rp '$LOCALPORT2' -j perftestclient -s perftestserver -n 1 -c'
|
||||
# ./Deploy-AKS.sh perftestclient \
|
||||
# 'runAmbrosiaService.sh Job --sp '$LOCALPORT1' --rp '$LOCALPORT2' -j perftestclient -s perftestserver --mms 65536 -n 13 -c'
|
||||
|
||||
export LOCALPORT1=2000
|
||||
export LOCALPORT2=2001
|
||||
./Deploy-AKS.sh helloserver 'runAmbrosiaService.sh dotnet Server/publish/Server.dll helloserver'
|
||||
|
||||
export LOCALPORT1=1000
|
||||
export LOCALPORT2=1001
|
||||
./Deploy-AKS.sh helloclient 'runAmbrosiaService.sh dotnet Client1/publish/Client1.dll helloclient helloserver'
|
||||
|
||||
./Deploy-AKS.sh perftestclient \
|
||||
'runAmbrosiaService.sh Job --sp '$LOCALPORT1' --rp '$LOCALPORT2' -j perftestclient -s perftestserver --mms 65536 -n 13 -c'
|
||||
|
||||
set +x
|
||||
echo "-----------------------------------------------------------------------"
|
||||
|
|
|
@ -49,7 +49,7 @@ $KUBE get pods
|
|||
|
||||
export LOCALPORT1=2000
|
||||
export LOCALPORT2=2001
|
||||
./Deploy-AKS.sh helloserver 'runAmbrosiaService.sh dotnet Client1/Publish/Client1.dll helloclient helloserver'
|
||||
./Deploy-AKS.sh helloserver 'runAmbrosiaService.sh dotnet Client1/publish/Client1.dll helloclient helloserver'
|
||||
|
||||
export LOCALPORT1=1000
|
||||
export LOCALPORT2=1001
|
||||
|
|
|
@ -48,10 +48,10 @@ case $mode in
|
|||
cd "$AMBROSIA_ROOT"/Samples/HelloWorld
|
||||
docker build -t ambrosia-hello .
|
||||
if [ ${AZURE_STORAGE_CONN_STRING:+defined} ]; then
|
||||
# Expects stdin, so we pipe 'yes' to it:
|
||||
docker run -it --rm --env "AZURE_STORAGE_CONN_STRING=$AZURE_STORAGE_CONN_STRING" \
|
||||
ambrosia-hello bash -c 'yes|./run_helloworld_both.sh' \
|
||||
|| echo "Allowed failure for now."
|
||||
# Expects stdin, so we pipe 'yes' to it:
|
||||
docker run -it --rm --env "AZURE_STORAGE_CONN_STRING=$AZURE_STORAGE_CONN_STRING" \
|
||||
ambrosia-hello bash -c 'yes|./run_helloworld_both.sh' \
|
||||
|| echo "Allowed failure for now."
|
||||
fi
|
||||
|
||||
# Application 3: NativeService
|
||||
|
@ -96,10 +96,10 @@ case $mode in
|
|||
|
||||
# Test Application: Hello World Sample
|
||||
# ----------------------------------------
|
||||
cd "$AMBROSIA_ROOT"/Samples/HelloWorld
|
||||
./build_dotnetcore.sh
|
||||
# Expects stdin, so we pipe 'yes' to it:
|
||||
yes | ./run_helloworld_both.sh || echo "Allowed failure for now."
|
||||
# cd "$AMBROSIA_ROOT"/Samples/HelloWorld
|
||||
# ./build_dotnetcore.sh
|
||||
# # Expects stdin, so we pipe 'yes' to it:
|
||||
# yes | ./run_helloworld_both.sh || echo "Allowed failure for now."
|
||||
|
||||
|
||||
# Test Application: PTI (last because it's slow)
|
||||
|
|
Загрузка…
Ссылка в новой задаче