Skip to content

Commit

Permalink
* Added AlternativeIAMRole to BastionStack to fix sporadic fails (#54)
Browse files Browse the repository at this point in the history
* Added AlternativeIAMRole to BastionStack to fix sporadic fails
* Added retry of config-sync for more stable deploy results
  • Loading branch information
bczoma authored Feb 12, 2021
1 parent be02390 commit 26cae87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/install-solace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@ if [ "${is_primary}" = "true" ]; then
esac
((count++))
echo "`date` INFO: Waited ${run_time} seconds, Config-sync is not yet Up"
if (( $count % 18 == 0 )) ; then
echo "`date` INFO: Re-trying initiate config-sync for router"
/tmp/semp_query.sh -n admin -p ${admin_password} -u http://localhost:8080/SEMP \
-q "<rpc><admin><config-sync><assert-master><router/></assert-master></config-sync></admin></rpc>"
/tmp/semp_query.sh -n admin -p ${admin_password} -u http://localhost:8080/SEMP \
-q "<rpc><admin><config-sync><assert-master><vpn-name>default</vpn-name></assert-master></config-sync></admin></rpc>"
fi
sleep ${pause}
done
Expand Down Expand Up @@ -557,4 +566,10 @@ if [ "${is_primary}" = "true" ]; then
fi
if [ ${count} -eq ${loop_guard} ]; then
echo "`date` ERROR: Solace bringup failed" | tee /dev/stderr
exit 1
fi
echo "`date` INFO: Solace bringup complete"
echo "`date` INFO: PubSub+ HA-node bringup complete"
2 changes: 2 additions & 0 deletions templates/solace-master.template
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,15 @@ Resources:
BastionStack:
Type: AWS::CloudFormation::Stack
Condition: UsePrivateSubnets
DependsOn: VPCStack
Properties:
TemplateURL:
!Sub
- 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-linux-bastion/templates/linux-bastion.template'
- S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion]
S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
Parameters:
AlternativeIAMRole: !Ref BastionHostRole
BastionInstanceType: t2.micro
EnableBanner: 'true'
BastionBanner: !Sub
Expand Down

0 comments on commit 26cae87

Please sign in to comment.