Select to view content in your preferred language

Using ArcGIS PowerShell DSC for upgrades

727
5
09-29-2024 07:29 PM
IhabHassan
Esri Contributor

Hi,

Has anyone tried to upgrade an ArcGIS Enterprise (that is deployed manually or using Enterprise Builder) by the DSC PowerShell module?

Regards
Ihab
5 Replies
JustinMallinckrodt
Esri Contributor

Hello Ihab - We have a pretty extensive repository located here Windows PowerShell DSC for ArcGIS Enterprise, Desktop & Pro (esri.github.io)

Do you have a specific question we can try to answer?

0 Kudos
IhabHassan
Esri Contributor

Thanks @JustinMallinckrodt  for sharing the GitHub page, I didn't have that before, I always go to the GitHub repo. 
We are trying to choose the best available method to automate Enterprise upgrades, we are anticipating to get a lot of these from our clients. 
A lot of these deployments are done either manually, few were built using other automation tools. We are doing a lot of POCs to prove that we can upgrade such deployments safely using the DSC module, hence my question in the post.
We were able to upgrade an Enterprise (using the DSC) that was originally deployed using Enterprise builder on a single machine. We are still trying to cover more complex scenarios.

Something else we are trying to discover, could be another question, if we use the DSC module to deploy or upgrade an Enterprise that relies on load balancers instead of web adaptors.
Any insights in these areas are really appreciated.
Thanks.

Regards
Ihab
0 Kudos
tigerwoulds
Frequent Contributor

Ihab - I had this same question recently. Can we retrofit/upgrade a manually launched Enterprise environment with DSC? Untested hypothesis but depending on the complexity of the current architecture, there's a good chance you'll run into errors/conflicts. 

The direction I took was to take vm snapshots and a webgisdr full backup, uninstall Enterprise (remove any remnants/arcgis folders), re-deploy the Enterprise with DSC (ensure the architecture/configurations match what was previously in place), then run a webgisdr restore/import. This seemed like the cleanest approach and in my case, everything worked as expected. For some context we have a multi machine deployment, multi machine arcgis server site, mission server, geoevent server, and a host for web adaptors. 

 

IhabHassan
Esri Contributor

I attended a service enablement session with Esri PS, a lot of people asked the same question, the answer from Esri team was that "it's possible, but highly not recommended".
@tigerwoulds I like your approach, fail safe, I am glade you had the time to allow for your solution.

Regards
Ihab
0 Kudos
AdrienH
Esri Contributor

I think generally speaking the reason it's not recommended to mix the two deployment methods and use automation after having manually installed an environment is that when PowerShell DSC installs Enterprise for the first time, it's doing so according to best-practices (WebContextURLs for aliases, the option for explicit vs implicit URLs for privatePortalURL, Services URL and Administration URL, etc).  Manual installations may or may not follow all of these best practices, so when you perform an upgrade, PSDSC is expecting that the environment is already in that state, when it may not be. 

The method described by @tigerwoulds is what is normally recommended as a best-practice way to begin using PSDSC in a deployment going forward.  Deploy a new environment using PSDSC -> migrate -> upgrade.

If you're interested in or able to experiment a little, you may be able to test truing up the manual deployment before the upgrade attempt.  Admittedly I have never attempted the following before, so I can't speak to the efficacy. First, take backups and have all fail-safes in place (most importantly 🙂), then attempt to run the Invoke-ArcGISConfiguration command with -Mode InstallLicenseConfigure against your current pre-upgrade installation (using a .json built to represent your current environment with all of the necessary files, folders, etc), then if that runs successfully, attempt the upgrade with the upgrade .json and -Mode Upgrade.  Running with InstallLicenseConfigure mode before an upgrade *may* modify what's needed or 'true up' the installation to be PSDSC-compliant for an upgrade.  If it works, it avoids the need to use webgisdr before upgrading.

0 Kudos