UGA-ITOSHumanitarianGIS / mapservicedoc

Map Service Documentation and Tools Hosted by University of Georgia for Common Operational Datasets (COD) coordinated by UN OCHA and accessible through HDX, https://data.humdata.org and humanitarian data
https://codgis.itos.uga.edu/arcgis/rest/services
GNU General Public License v3.0
2 stars 0 forks source link

ArcGIS Server Publishing #54

Closed UGA-ITOSHumanitarianGIS closed 4 months ago

UGA-ITOSHumanitarianGIS commented 4 months ago

In standup of the additional environment, ArcGIS Server bulk service publishing is failing with failure to access DBMS server. This may be a ticket to file with Esri

UGA-ITOSHumanitarianGIS commented 4 months ago

This is now resolved. Connection details are updated to reference the project database and server connection files and modifying host by ip and the updateConnectionProperties method passing the object details.

The method runs the script in the ArcPro project folder with the connection files (ags and sde) local to the project. the document is layers and tables are recursively parsed and modified to reference the connection details per the pseudo code: ags=con #r"C:\Users\\Documents\ArcGIS\Projects\bulkprocess\server.ags" for tbl in ,listTables(): tblcp = tbl.connectionProperties tblcp['connection_info']['server'] = 'ipcode' tblcp['connection_info']['db_connection_properties'] = 'ipcode' tblcp['connection_info']['instance'] = 'sde:sqlserver:' tbl.updateConnectionProperties(tbl.connectionProperties, tblcp)

                        ....other modifications and service settings in updates to the staging file

                        arcpy.server.StageService(sddraft_mod_xml_file, sd_output_filename)
                        print("Start Uploading")
                            try:
                                arcpy.server.UploadServiceDefinition(sd_output_filename, ags)
                            except:
                                print(arcpy.GetMessages(1))
                                warnings = arcpy.GetMessages(2)
                                print(warnings)

                            print("Finish Publishing")
UGA-ITOSHumanitarianGIS commented 4 months ago

closing