Confluence AWS Upgrades

NOTE: These instructions assume a preference for read-only mode upgrades.Read-only mode is available in Confluence Data Center 6.10 and aboveNOTE: It is recommended to perform all steps in a test environment before deploying to live.
KEY: To aid navigation use this key to identify which area of the page to find the specified options:T = Top, D = Dropdown, L = Left, B = Bottom

Choose your target version...

Atlassian Matrix
Atlassian Matrix

Confluence

Check App Compatibility...

Resolve issues with apps that are "Incompatible", "Compatible if updated" or "Unknown" before continuing.

Find (and note) Application Nodes Instance IDs

for iid in $(aws ec2 describe-instance-status --output yaml | grep InstanceId | tr -d ' ' | awk -F: '{ print $2 }')

do

aws ec2 describe-instances --instance-ids ${iid} --output yaml | grep "Confluence Node" >/dev/null && \

aws ec2 describe-instances --instance-ids ${iid} --output yaml | egrep "InstanceId"

done 

Enable Read-Only Mode...


Click EDITTick the read-only check boxUpdate the banner message as necessaryClick Submit

Add a node to the cluster with the new version...

aws cloudformation describe-stacks --output yaml | grep StackName

To help identify your stack name if you don't remember it

mystack=mystackname

ClusterNodeMin=2

ClusterNodeMax=2

ConfluenceVersion=7.6.2

Note that you need the three digit version number. You should be able to find this on the Release Notes page for your target version.

aws cloudformation describe-stacks --stack-name ${mystack}

Parameter list was correct on 13-Jul-2020; newer versions of the Quick Start may affect the parameter list

aws cloudformation update-stack --stack-name ${mystack} \

   --use-previous-template --capabilities CAPABILITY_NAMED_IAM --parameters \

   ParameterKey=ClusterNodeMin,ParameterValue=${ClusterNodeMin} \

   ParameterKey=ClusterNodeMax,ParameterValue=${ClusterNodeMax} \

   ParameterKey=CollaborativeEditingMode,UsePreviousValue=true \

   ParameterKey=ConfluenceVersion,ParameterValue=${ConfluenceVersion} \

   ParameterKey=CloudWatchIntegration,UsePreviousValue=true \

   ParameterKey=ClusterNodeInstanceType,UsePreviousValue=true \

   ParameterKey=ClusterNodeVolumeSize,UsePreviousValue=true \

   ParameterKey=SynchronyClusterNodeMax,UsePreviousValue=true \

   ParameterKey=SynchronyClusterNodeMin,UsePreviousValue=true \

   ParameterKey=SynchronyNodeInstanceType,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationRepository,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationBranch,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationPlaybook,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationCustomParams,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationKeyName,UsePreviousValue=true \

   ParameterKey=DBEngine,UsePreviousValue=true \

   ParameterKey=DBInstanceClass,UsePreviousValue=true \

   ParameterKey=DBIops,UsePreviousValue=true \

   ParameterKey=DBMasterUserPassword,UsePreviousValue=true \

   ParameterKey=DBMultiAZ,UsePreviousValue=true \

   ParameterKey=DBPassword,UsePreviousValue=true \

   ParameterKey=DBStorage,UsePreviousValue=true \

   ParameterKey=DBStorageEncrypted,UsePreviousValue=true \

   ParameterKey=DBStorageType,UsePreviousValue=true \

   ParameterKey=BastionHostRequired,UsePreviousValue=true \

   ParameterKey=KeyPairName,UsePreviousValue=true \

   ParameterKey=CidrBlock,UsePreviousValue=true \

   ParameterKey=InternetFacingLoadBalancer,UsePreviousValue=true \

   ParameterKey=SSLCertificateARN,UsePreviousValue=true \

   ParameterKey=CustomDnsName,UsePreviousValue=true \

   ParameterKey=HostedZone,UsePreviousValue=true \

   ParameterKey=AutologinCookieAge,UsePreviousValue=true \

   ParameterKey=TomcatContextPath,UsePreviousValue=true \

   ParameterKey=CatalinaOpts,UsePreviousValue=true \

   ParameterKey=JvmHeapOverride,UsePreviousValue=true \

   ParameterKey=JvmHeapOverrideSynchrony,UsePreviousValue=true \

   ParameterKey=DBPoolMaxSize,UsePreviousValue=true \

   ParameterKey=DBPoolMinSize,UsePreviousValue=true \

   ParameterKey=DBTimeout,UsePreviousValue=true \

   ParameterKey=DBIdleTestPeriod,UsePreviousValue=true \

   ParameterKey=DBMaxStatements,UsePreviousValue=true \

   ParameterKey=DBValidate,UsePreviousValue=true \

   ParameterKey=DBPreferredTestQuery,UsePreviousValue=true \

   ParameterKey=DBAcquireIncrement,UsePreviousValue=true \

   ParameterKey=MailEnabled,UsePreviousValue=true \

   ParameterKey=TomcatAcceptCount,UsePreviousValue=true \

   ParameterKey=TomcatConnectionTimeout,UsePreviousValue=true \

   ParameterKey=TomcatDefaultConnectorPort,UsePreviousValue=true \

   ParameterKey=TomcatEnableLookups,UsePreviousValue=true \

   ParameterKey=TomcatMaxThreads,UsePreviousValue=true \

   ParameterKey=TomcatMinSpareThreads,UsePreviousValue=true \

   ParameterKey=TomcatProtocol,UsePreviousValue=true \

   ParameterKey=TomcatRedirectPort,UsePreviousValue=true \

   ParameterKey=QSS3BucketName,UsePreviousValue=true \

   ParameterKey=QSS3KeyPrefix,UsePreviousValue=true \

   ParameterKey=ExportPrefix,UsePreviousValue=true

Check Progress using AWS Cloudformation console or...

aws cloudformation list-stacks --output yaml --stack-status-filter "UPDATE_IN_PROGRESS" "UPDATE_ROLLBACK_FAILED" "UPDATE_ROLLBACK_IN_PROGRESS" "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" | grep -E 'StackName|StackStatus'

The command above will show UPDATE_IN_PROGRESS whilst the change is being applied. When the command above returns no results the Update is complete.

Terminate the nodes running the older version, using the InstanceIds you noted earlier...

aws ec2 terminate-instances --instance-ids instanceid

If you were initially running two or more nodes (before adding the new node on the new version above), consider terminating the old instances one by one, waiting for a replacement node to be spawned before terminating the next node.

Monitor progress...

for iid in $(aws ec2 describe-instance-status --output yaml | grep InstanceId | tr -d ' ' | awk -F: '{ print $2 }')

do

aws ec2 describe-instances --instance-ids ${iid} --output yaml | grep "Confluence Node" >/dev/null && \

aws ec2 describe-instances --instance-ids ${iid} --output yaml | egrep "InstanceId| Code:| Name:"

done 

Any connection to Confluence at this point should see a message similar to the one shown here...


The new version will also be shown in the footer of each page...


Disable Read-Only Mode...


Click EDITuntick the read-only check boxClick Submit

Set the number of Confluence nodes back to the correct value...

Monitor progress...

for iid in $(aws ec2 describe-instance-status --output yaml | grep InstanceId | tr -d ' ' | awk -F: '{ print $2 }')

do

aws ec2 describe-instances --instance-ids ${iid} --output yaml | grep "Confluence Node" >/dev/null && \

aws ec2 describe-instances --instance-ids ${iid} --output yaml | egrep "InstanceId| Code:| Name:"

done 

The Confluence Upgrade is Complete!

Bibliography