Jira Service Desk AWS Upgrades

NOTE: These instructions assume a preference for zero downtime upgrades.NOTE: 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...

Jira Service Desk


Check App Compatibility...

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

Put Jira into Upgrade Mode

"Putting Jira in to upgrade mode allows you to individually remove a node from your cluster, upgrade it to the required version, and add it back to your cluster. Once all the nodes in your cluster are upgraded to the same version, you can finalize the upgrade, which allows any required upgrade tasks to run. "

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 "Jira Node" >/dev/null && \

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

done 

Add a new node to the cluster following the standard instructions, but also update the Jira version...

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

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

mystack=mystackname

ClusterNodeMin=3

ClusterNodeMax=3

JiraProduct='ServiceDesk'

JiraVersion='4.11.0'

Set variables

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 --parameters \

   ParameterKey=ClusterNodeMin,ParameterValue=${ClusterNodeMin} \

   ParameterKey=ClusterNodeMax,ParameterValue=${ClusterNodeMax} \

   ParameterKey=JiraProduct,ParameterValue=${JiraProduct} \

   ParameterKey=JiraVersion,ParameterValue=${JiraVersion} \

   ParameterKey=PrivateSubnet2CIDR,UsePreviousValue=true \

   ParameterKey=TomcatEnableLookups,UsePreviousValue=true \

   ParameterKey=DBIops,UsePreviousValue=true \

   ParameterKey=SSLCertificateARN,UsePreviousValue=true \

   ParameterKey=QSS3KeyPrefix,UsePreviousValue=true \

   ParameterKey=TomcatMinSpareThreads,UsePreviousValue=true \

   ParameterKey=DBMaxWaitMillis,UsePreviousValue=true \

   ParameterKey=DBStorageEncrypted,UsePreviousValue=true \

   ParameterKey=BastionHostRequired,UsePreviousValue=true \

   ParameterKey=DBTestOnBorrow,UsePreviousValue=true \

   ParameterKey=VPCCIDR,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationPlaybook,UsePreviousValue=true \

   ParameterKey=PublicSubnet1CIDR,UsePreviousValue=true \

   ParameterKey=MailEnabled,UsePreviousValue=true \

   ParameterKey=DBMultiAZ,UsePreviousValue=true \

   ParameterKey=JvmHeapOverride,UsePreviousValue=true \

   ParameterKey=QSS3BucketName,UsePreviousValue=true \

   ParameterKey=DBRemoveAbandoned,UsePreviousValue=true \

   ParameterKey=DBInstanceClass,UsePreviousValue=true \

   ParameterKey=DBMasterUserPassword,UsePreviousValue=true \

   ParameterKey=CloudWatchIntegration,UsePreviousValue=true \

   ParameterKey=ClusterNodeInstanceType,UsePreviousValue=true \

   ParameterKey=DBMinIdle,UsePreviousValue=true \

   ParameterKey=PublicSubnet2CIDR,UsePreviousValue=true \

   ParameterKey=DBPassword,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationCustomParams,UsePreviousValue=true \

   ParameterKey=DBStorage,UsePreviousValue=true \

   ParameterKey=TomcatMaxThreads,UsePreviousValue=true \

   ParameterKey=InternetFacingLoadBalancer,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationBranch,UsePreviousValue=true \

   ParameterKey=DBMaxIdle,UsePreviousValue=true \

   ParameterKey=TomcatAcceptCount,UsePreviousValue=true \

   ParameterKey=DBStorageType,UsePreviousValue=true \

   ParameterKey=DBEngine,UsePreviousValue=true \

   ParameterKey=AccessCIDR,UsePreviousValue=true \

   ParameterKey=TomcatDefaultConnectorPort,UsePreviousValue=true \

   ParameterKey=DBMinEvictableIdleTimeMillis,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationKeyName,UsePreviousValue=true \

   ParameterKey=TomcatRedirectPort,UsePreviousValue=true \

   ParameterKey=DBTestWhileIdle,UsePreviousValue=true \

   ParameterKey=HostedZone,UsePreviousValue=true \

   ParameterKey=CatalinaOpts,UsePreviousValue=true \

   ParameterKey=KeyPairName,UsePreviousValue=true \

   ParameterKey=CustomDnsName,UsePreviousValue=true \

   ParameterKey=AvailabilityZones,UsePreviousValue=true \

   ParameterKey=TomcatContextPath,UsePreviousValue=true \

   ParameterKey=DBRemoveAbandonedTimeout,UsePreviousValue=true \

   ParameterKey=ClusterNodeVolumeSize,UsePreviousValue=true \

   ParameterKey=DBPoolMinSize,UsePreviousValue=true \

   ParameterKey=DBTimeBetweenEvictionRunsMillis,UsePreviousValue=true \

   ParameterKey=PrivateSubnet1CIDR,UsePreviousValue=true \

   ParameterKey=DBEngineVersion,UsePreviousValue=true \

   ParameterKey=ExportPrefix,UsePreviousValue=true \

   ParameterKey=DBPoolMaxSize,UsePreviousValue=true \

   ParameterKey=DeploymentAutomationRepository,UsePreviousValue=true \

   ParameterKey=TomcatProtocol,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" "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS" | grep -E 'StackName|StackStatus'

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 "Jira Node" >/dev/null && \

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

done 

Check Upgrade Status in the Jira application...

Click the "Run upgade tasks" button towards the bottom right of the screen...
The cluster status should show as:
READY TO RUN UPGRADE TASKS All nodes have been upgraded to a newer version. You can now finalize the upgrade. 

Check Current Version....

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

When anyone next logs in to Jira Service Desk they should see a splah screen like this...

The Jira Service Desk Upgrade is Complete!

Bibliography