Commit 29e277ad by 李二毛

Merge branch 'development' into 'scaling/staging'

扩容预生产环境实例数量为2

See merge request liermao/microservice-autodevopspipelines!106
parents 1a295aab fbe6e8c5
Pipeline #4369 passed with stages
in 22 seconds
#!/bin/bash
set -e
IFS=$'\n\n'
# Import external functions
chmod +x ./devops/PipeLines/Functions.deploy.sh
source ./devops/PipeLines/Functions.deploy.sh
# global variable
RollEnvironmentOf Environment
GetNameSpace namespace
GetReplicas replicas
GetAppName appName
echo "[${Environment}]Auto scaling for ${appName} starting..."
GetCiCdSettings allPublishable noPublishable
if [ "${noPublishable}" == "1" ] ;
if [ "${AllPublishable}" == "1" ];
then
echo ""
echo "Tips: No services need to be cded."
for servicePrefix in `ls ./src/Services|xargs -d '/'`
do
echo "All micro-services will be scaled, replicas: [${replicas}]."
GetServiceName ${servicePrefix} serviceName
AutoScaling ${namespace} ${serviceName} ${replicas}
done
else
GetNameSpace namespace
GetReplicas replicas
for servicePrefix in `ls ./src/Services|xargs -d '/'`
do
IsPublishableOf ${servicePrefix} isPublishable
GetServiceName ${servicePrefix} serviceName
# Notes: Hard release[manual control], will not analyz changes.
DynamicVariableValueOf "${servicePrefix}" "Publishable" isPublishable
if [ "${isPublishable}" == "1" ];
then
echo ""
echo "Tips: ${serviceName} begin scaling, replicas: [${replicas}]!!!"
then
echo "Tips: ${servicePrefix} will be scaled, replicas: [${replicas}]."
GetServiceName ${servicePrefix} serviceName
AutoScaling ${namespace} ${serviceName} ${replicas}
else
echo ""
echo "Tips: ${serviceName} will not be scaled!!!"
fi
fi
done
fi
echo ""
echo "[${Environment}]Auto scaling for ${appName} has been successful."
\ No newline at end of file
fi
\ No newline at end of file
<Project>
<PropertyGroup>
<Replicas>1</Replicas>
<Replicas>2</Replicas>
<RollBackStep>1</RollBackStep>
<ImageUserName>devopspipelines</ImageUserName>
</PropertyGroup>
......
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