Using python in ArcGIS Pro to upload a map service to ArcGIS for Server or Portal

1813
3
07-01-2018 11:15 PM
HugoBouckaert1
New Contributor III

Hi 

It looks to me that if you only have ArcGIS Pro on your desktop, you can no longer upload a map service to ArcGIS Server. The options for publishing to Portal for ArcGIS are also limited. 

Firstly if you want to load and configure a map manually in ArcGIS Pro you can only publish to Portal or to ArcGIS Online, because in ArcGIS Pro you cannot make a direct connection to ArcGIS for Server any more.

If you want to publish a map using python, the old arcpy.mapping.CreateMapSDDraft in ArcMap is now replaced by arcpy.mp.CreateWebLayerSDDraft. However, firstly you have to access a Project from python (use arcpy.mp.ArcGISProject to set up your environment) which in a shared setup you may not want to do. Secondly CreateWebLayerSDDraft only allows you to publish to ArcGIS Online, i.e. you cannot even create an sddraft that is configured to publish to your own internal Portal. Strange!

So the first question is, how are people going to publish to ArcGIS for Server if they only have ArcGIS Pro on their desktop?  In ArcGIS Pro, you cannot connect to ArcGIS for Server for "manual" publishing from a map, and neither can you connect to  ArcGIS for Server with arcpy.mp.CreateWebLayerSDDraft to use python for publishing. I had a look at the arcpy.sharing functionality, but there also, publishing is limited to Portal or ArcGIS Online. Is this an oversight?     

Now imagine I forget about publishing to ArcGIS for Server, it seems I am also limited in publishing to Portal. Say I want to use python in ArcGIS Pro to publish a map tile service directly to Portal for ArcGIS. This cannot be done because creating an SDDraft in python can only connect to ArcGIS Online. I have tried all options, but to me it looks like this is no longer possible. So in ArcGIS Pro my options are limited as follows:

1. Use python: can only publish to ArcGIS Online

2. Manually publishing from a map: can publish to Portal and ArcGIS Online (but I want to automate things)

3. Publishing to ArcGIS for Server: not possible manually or with python.   

 

Is this true? If my aim is to automate things and publish using python to Portal or ArcGIS Server, is there any way around this? 

Thanks

Hugo 

       

0 Kudos
3 Replies
DanPatterson_Retired
MVP Esteemed Contributor

I don't do the web thing... but new to 2.2 

whats-new-in-arcgis-pro 

There is a new Share your work section at the bottom of that link

introduction-to-arcpy-sharing

FeatureSharingDraft class

plus more in that general area if it makes sense to you

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

This issue has been raised and discussed quite a bit since ArcGIS Pro was released.  ArcGIS Pro Publish Services To ArcGIS Server is now 2-years old, and its status is "In Product Plan."  Unfortunately, "In Product Plan" doesn't give any insight into when, but it does tell you it isn't available now.

As Dan already pointed out, your comment about arcpy.mp.CreateWebLayerSDDraft is correct, but that function is now deprecated/legacy since the FeatureSharingDraft—Sharing module | ArcGIS Desktop , MapImageSharingDraft—Sharing module | ArcGIS Desktop , and TileSharingDraft—Sharing module | ArcGIS Desktop  were introduced in ArcGIS Pro 2.2.  The new classes support publishing to ArcGIS Online and Portal.

In terms of moving forward, I encourage you to vote for the above idea if you haven't already and also reach out to your Esri account manager to raise your needs of being able to publish directly to ArcGIS Server from ArcGIS Pro.  Also, upgrade to ArcGIS Pro 2.2.

WarrenRoe
New Contributor III

Hot off the press … Esri is saying "first half of 2019". This is from the 2018 UC Q&A.