Select to view content in your preferred language

Add "Save As SD" to overwrite an existing service - Overwrite Web Layer

2578
6
09-14-2022 10:42 AM
Status: Implemented
Labels (1)
PatriceLabbé
Frequent Contributor

In ArcGIS Pro, one can easily create an SD file to eventualy publish  a web layer (service) on a federated server using Share - Web Layer - Publish Web Layer - Save As SD.

With this SD file, it's simple to automate services publishing process on different environments (dev, staging, prod).

However, when it comes to overwrite a service (Share - Web Layer - Overwrite Web Layer), there's no "Save As SD" to create this file. There's only a "Publish" function.

Please add this option to create the SD file when someone wants to overwrite a service.

I know of some Python code can be done to try to do this:

Solved: Overwrite map service with ArcPy but use existing ... - Esri Community

Publishing map service with WMS capability with ar... - Esri Community

MapImageSharingDraft—ArcGIS Pro | Documentation

But it seems obvious that extended properties are really difficult to manage (ex : WMS, etc).

Moreover, we found a way to get the sd file when an overwrite is manually done with ArcGIS Pro :

1. Overwrite Web Layer - Publish

2. A series of files are created here including .sddraft : C:\Users\%username%\AppData\Local\ESRI\ArcGISPro\Staging\SharingProcesses\%jobnumber%

3. Use Stage Service geoprocessing tool to create the sd file from sddraft

4. Publish to dev, staging and prod from this sd file and ArcGIS API for Python (publish_sd). We use Azure DevOps Pipelines for this, adding SD files in our repository.

5. Everything works perfectly, even Portal itemId is preserved!

Thank you!

 

6 Comments
SimonP
by

Hello!

Additionally, according to the Esri link below, migrating services by SD file would be a recommended way to publish services to multiple environments, and indeed this functionality is missing in ArcGIS Pro “Overwrite Web Layer” in order to update a service.

ArcGIS Server in development, staging, and production environments—ArcGIS Server | Documentation for...

JonahLay

Thank you @PatriceLabbé and @SimonP for the idea and feedback. This functionality is something we might be able to support. We will keep an eye on this to see if there is additional interest from the community. 

JonahLay
Status changed to: Under Consideration
 
JonahLay
Status changed to: In Product Plan
 
JonahLay
Status changed to: Implemented

This idea was implemented in ArcGIS Pro 3.2. Please see the following help topics to learn more about this functionality:

To learn more about upgrading, visit What's New in ArcGIS Pro 3.2.

BrianLeroux

@JonahLay This is awesome. Saves us a lot of trouble. Thank you!!