Do custom python packages need to be deployed to ALL ArcGIS servers?

463
1
06-07-2023 11:24 AM
JenaF
by
New Contributor II

Hey all - 

We have a number of scripts that folks run on an ad-hoc basis through ArcMap and/or Pro tools/toolboxes.  People and scripts will soon be entirely migrated to Pro and Python3. Those scripts almost always utilize additional Python packages outside the standard install. In the past, we’ve walked each person who needs to run a script through changing their PATH variable, cloning their Python environment (for Pro at least), installing packages through the command line, etc. It works, but is not exactly user-friendly.

We recently implemented Portal and I think I can publish those scripts as web tools that will actually run on the server (even though they would be accessed via Pro on the user’s machine). That would mean I would only need to configure the server with the needed packages and scripts would run seamlessly for users, no matter what user was working from what machine running what script. The process looks pretty straightforward: https://enterprise.arcgis.com/en/server/10.8/publish-services/windows/deploying-custom-python-packag...

However, I do have a question:

The documentation says to “Repeat on each machine in your ArcGIS Server site.” We have 5 servers in our Enterprise deployment for publishing services to (a mix of general use and image servers). If I’m only going to publish web tools to one server, and I'm the only person publishing web tools, do I really need to implement this on all the servers? Or can I just modify the single server I'll be publishing web tool to? Do all the server Python installations need to be in sync for some reason? Or is it just recommended so that web tools can be published to any server? What's the reasoning behind that instructions from Esri?

We're currently on Enterprise 10.8.1 (potentially moving to 11 this winter, but that's very TBD).

0 Kudos
1 Reply
Scott_Tansley
MVP Regular Contributor

Hey, an ArcGIS Server Site is a 'group' of equally configured servers.  For context read this:

https://enterprise.arcgis.com/en/get-started/11.0/windows/additional-server-deployment.htm#ESRI_SECT...

In the diagram there are portal, hosting and datastore servers.  They do not need your python environment, assuming you only publish to the "ArcGIS Server Site" (on the right).  That 'site' has three machines in it, so each of those 'would' need your python environment.  This is because they are all doing the same thing, so need to be equal as your requests could end up being routed to any machine.

Answering in a different way, if you only have one ArcGIS Server then you could be heading for trouble by publishing all your scripts here.  If the scripts execute in less than a few seconds then you'll be fine.  But if they take time to run, then there's a strong possibility that they will block map requests.  One of the beauties of doing analytics on Pro is that you are using the discrete processing capabilities of each user's machine.  If you consolidate those workflows onto a single server, with many users requesting it then you could easily run out of resources on your server.  I'd advise caution taking that route, or at least test your theory extensively.  

Scott Tansley
Consulting Architect (ArcGIS Enterprise)
https://www.linkedin.com/in/scotttansley/
0 Kudos