How to automate ArcGIS Enterprise updates and patches in HA environment

107
4
Jump to solution
09-27-2022 01:05 PM
MarGIS
by
New Contributor III

Hello, everyone

I hope you are doing great. I am wondering how to automate patches and updates a large HA environment that include fleet of servers and three environments (development - staging - production). I know from Esri documentation that they encourage when you have HA environment that you should update and patch standby servers first then you patch primary servers. I understood from those documentation that this process done manually. My question is how to plan this automatically?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
FraserHand
Occasional Contributor II

Hi, there is a workflow for patching HA deployments, as ideally you don't want a whole bunch of failovers. The process is described here if you haven't seen it. https://enterprise.arcgis.com/en/portal/latest/administer/windows/apply-patches-and-updates-to-highl...

If you still wanted to do it automatically then I would wrap it all up in a powershell script and use remoting to do the patching. That way you could patch secondary first, stop the service, patch primary and restart the secondary service for portal and datastore assuming you are ok for downtime during the patching window and just schedule the PS1 script. Just be aware you have to tweak the execution policy when scheduling PS1 scripts via scheduled tasks. With server it doesn't matter, you can just stagger the scheduled tasks (separate days) to run the patch utility as there isn't any failover. I've also seen the ha_failover file get tweaked for patching so portal doesn't failover over while the primary patches.

View solution in original post

0 Kudos
4 Replies
FraserHand
Occasional Contributor II

Hey there, What version are you on? There is a patch utility BAT file in the /tools/patchnotification directory in the Enterprise install that you can call via a scheduled task. I've set this up on servers to run on the last day of each month in the past. I usually wrap in a powershell script so I can dump out the log and email to make sure everything was successful. You can do it via Python as well if you're a Python person.

0 Kudos
MarGIS
by
New Contributor III

@FraserHand  Thanks for reply. Actually we are planning to use the latest version of ArcGIS Enterprise. I know that there is a utility in program files for discovering patches and updates, but my question was about how to plan the updates in HA? should I update standby servers first then primary? and if this will reflect on the time that I will schedule?

0 Kudos
FraserHand
Occasional Contributor II

Hi, there is a workflow for patching HA deployments, as ideally you don't want a whole bunch of failovers. The process is described here if you haven't seen it. https://enterprise.arcgis.com/en/portal/latest/administer/windows/apply-patches-and-updates-to-highl...

If you still wanted to do it automatically then I would wrap it all up in a powershell script and use remoting to do the patching. That way you could patch secondary first, stop the service, patch primary and restart the secondary service for portal and datastore assuming you are ok for downtime during the patching window and just schedule the PS1 script. Just be aware you have to tweak the execution policy when scheduling PS1 scripts via scheduled tasks. With server it doesn't matter, you can just stagger the scheduled tasks (separate days) to run the patch utility as there isn't any failover. I've also seen the ha_failover file get tweaked for patching so portal doesn't failover over while the primary patches.

0 Kudos
MarGIS
by
New Contributor III

@FraserHand  Much thanks for your help. I got the point

0 Kudos