What is the correct procedure for upgrading OS and application server on two-node failover HA Pacemaker cluster?

I've scoured enough search engine results before coming over. Looking for the correct procedure to upgrade an Ubuntu server and an application server on a two-node failover HA Pacemaker/Corosync/DRBD cluster. I saw a procedure (but can't find it now) that said to do it on the secondary node then make it the primary demoting the original-primary to secondary and then do the upgrade there.

I am upgrading: Ubuntu 14.04 to 18.04 which will require the HA stack to be upgraded, too. Zimbra Collaboration Server (Network Edition) 8.7 to 9.x (new owner Synacor maintains no support for HA stack. Just Redhat.)

Please advise. Thank you in advance.