Skip to content

Commit

Permalink
fix technical solution 129
Browse files Browse the repository at this point in the history
  • Loading branch information
xiao201208 committed Jun 28, 2024
1 parent e95cd8f commit bbef73e
Showing 1 changed file with 45 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Resources:
ZoneId:
Ref: ZoneId1
VSwitchName:
Fn::Sub: ${CommonName}-vsw
Fn::Sub: ${CommonName}-web-01
VSwitch2:
Type: 'ALIYUN::ECS::VSwitch'
Properties:
Expand All @@ -83,7 +83,37 @@ Resources:
ZoneId:
Ref: ZoneId2
VSwitchName:
Fn::Sub: ${CommonName}-vsw
Fn::Sub: ${CommonName}-web-02
VSwitch3:
Type: 'ALIYUN::ECS::VSwitch'
Properties:
VpcId:
Ref: Vpc
CidrBlock: 192.168.3.0/24
ZoneId:
Ref: ZoneId1
VSwitchName:
Fn::Sub: ${CommonName}-db-01
VSwitch4:
Type: 'ALIYUN::ECS::VSwitch'
Properties:
VpcId:
Ref: Vpc
CidrBlock: 192.168.4.0/24
ZoneId:
Ref: ZoneId1
VSwitchName:
Fn::Sub: ${CommonName}-pub-01
VSwitch5:
Type: 'ALIYUN::ECS::VSwitch'
Properties:
VpcId:
Ref: Vpc
CidrBlock: 192.168.5.0/24
ZoneId:
Ref: ZoneId2
VSwitchName:
Fn::Sub: ${CommonName}-pub-02
SecurityGroup:
Type: 'ALIYUN::ECS::SecurityGroup'
Properties:
Expand Down Expand Up @@ -116,7 +146,7 @@ Resources:
DBMinorVersion: '8.0.2'
DBNodeClass: polar.mysql.sl.small
VSwitchId:
Ref: VSwitch1
Ref: VSwitch3
CreationCategory: Normal
ScaleRoNumMin: 1
ScaleRoNumMax: 4
Expand Down Expand Up @@ -200,7 +230,7 @@ Resources:
SecurityGroupId:
Ref: SecurityGroup
VSwitchId:
Fn::Sub: '${VSwitch1},${VSwitch2}'
Fn::Sub: '${VSwitch4},${VSwitch5}'
Replicas: 2
NamespaceId:
Ref: SaeNamespace
Expand All @@ -212,12 +242,23 @@ Resources:
PackageUrl: https://help-static-aliyun-doc.aliyuncs.com/demos/sae-demo-0.0.1-SNAPSHOT.jar
Timezone: Asia/Shanghai
JarStartArgs: '$JAVA_HOME/bin/java $Options -jar $CATALINA_OPTS "$package_path" $args'
JarStartOptions: >-
-XX:+UseContainerSupport
-XX:InitialRAMPercentage=70.0
-XX:MaxRAMPercentage=70.0
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-Xloggc:/home/admin/nas/gc-${POD_IP}-$(date '+%s').log
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/home/admin/nas/dump-${POD_IP}-$(date '+%s').hprof
Envs:
Fn::Sub: >-
[{"name":"APPLETS_RDS_ENDPOINT","value":"${PolarDBCluster.PrimaryConnectionString}"},
{"name":"APPLETS_RDS_USER","value":"${PolarDBAccount}"},
{"name":"APPLETS_RDS_PASSWORD","value":"${DBPassword}"},
{"name":"APPLETS_RDS_DB_NAME","value":"applets"}]
Readiness: '{"exec":{"command":["sleep","6s"]},"initialDelaySeconds":15,"timeoutSeconds":12}'
Liveness: '{"httpGet":{"path":"/","port":80,"scheme":"HTTP"},"initialDelaySeconds":10,"timeoutSeconds":10,"periodSeconds":10,"successThreshold":1,"failureThreshold":3}'
WaitApp:
Type: 'ALIYUN::ROS::Sleep'
DependsOn: SaeApp
Expand Down

0 comments on commit bbef73e

Please sign in to comment.