Deploy from Development to Production Environment

463
3
Jump to solution
10-17-2021 11:57 AM
RoseZhou2
Occasional Contributor

Hello,

We have two ArcGIS Enterprise 10.8.1 environment: development and production. I have built an app using ArcGIS Experience Builder Developer Edition in our development environment. Next I need to deploy the app to our production environment. What's the best way to do this? I have published the map services using the same names, created web maps  etc in both environment.

Thanks

Rose

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
LongDinh
Occasional Contributor II

Hi @RoseZhou2 ,

This may require a bit programming if you wish to repeat and scale your deployment processes. Otherwise, the processes can be done manually through a mix of portal interfaces, ago-assistant and the portal's /arcgis/sharing/rest apis.

You will need to be logged in as a named user, the owner of the item and have administrative privileges.

Note that the itemId of each item in each environment will be different. The goal of this process is remap your applications's:

  1. maps itemids, 
  2. services urls, and
  3. other development targets to production(e.g. icon urls, widgets urls...etc) 

Such that  your application is targeting your production item ids.

Steps to Extract your Development and Production Web Apps, Web Maps, and Feature Layers:

1. For each item in development, get the item data and save as a JSON file from https://{portalUrl}/arcgis/sharing/rest/content/items/{itemId}/data. See: https://developers.arcgis.com/rest/users-groups-and-items/item-data.htm 

2. For the Web Map, and Feature Layers in production, get the item data using the same method above. Note the itemIds and urls will be different.

The next step should be to prepare a production version of your application by remapping your development application item's data to the production targets (e.g. remap itemIds and urls to production values).

Add a Default and Update Application in Production:

1. Once you have completed remapping your application's data, you can create an Application (as a placeholder) in Portal manually or using the API at https://{portalUrl}/arcgis/sharing/rest/content/users/[userName]/addItem. The default configuration can be found at https://{portalUrl}/arcgis/apps/webappbuilder/stemapp/predefined-apps/default/config.json See: https://developers.arcgis.com/rest/users-groups-and-items/add-item.htm 

2. Update the item using AGO-assistant or using the API at  https://{portalUrl}/arcgis//content/users/[userName]/items/[itemID]/update. You should set the text parameter as the new production data See: https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm 

The same process can be done to apply the item's itemData (e.g. Metadata - summary, description tags etc.) It is slightly easier for Map Services with the arcpy/arcgis Python APIs if you wish to automate.

Hopefully this provides some insights to consistent in regard to portal deployment processes.

View solution in original post

0 Kudos
3 Replies
LongDinh
Occasional Contributor II

Hi @RoseZhou2 ,

This may require a bit programming if you wish to repeat and scale your deployment processes. Otherwise, the processes can be done manually through a mix of portal interfaces, ago-assistant and the portal's /arcgis/sharing/rest apis.

You will need to be logged in as a named user, the owner of the item and have administrative privileges.

Note that the itemId of each item in each environment will be different. The goal of this process is remap your applications's:

  1. maps itemids, 
  2. services urls, and
  3. other development targets to production(e.g. icon urls, widgets urls...etc) 

Such that  your application is targeting your production item ids.

Steps to Extract your Development and Production Web Apps, Web Maps, and Feature Layers:

1. For each item in development, get the item data and save as a JSON file from https://{portalUrl}/arcgis/sharing/rest/content/items/{itemId}/data. See: https://developers.arcgis.com/rest/users-groups-and-items/item-data.htm 

2. For the Web Map, and Feature Layers in production, get the item data using the same method above. Note the itemIds and urls will be different.

The next step should be to prepare a production version of your application by remapping your development application item's data to the production targets (e.g. remap itemIds and urls to production values).

Add a Default and Update Application in Production:

1. Once you have completed remapping your application's data, you can create an Application (as a placeholder) in Portal manually or using the API at https://{portalUrl}/arcgis/sharing/rest/content/users/[userName]/addItem. The default configuration can be found at https://{portalUrl}/arcgis/apps/webappbuilder/stemapp/predefined-apps/default/config.json See: https://developers.arcgis.com/rest/users-groups-and-items/add-item.htm 

2. Update the item using AGO-assistant or using the API at  https://{portalUrl}/arcgis//content/users/[userName]/items/[itemID]/update. You should set the text parameter as the new production data See: https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm 

The same process can be done to apply the item's itemData (e.g. Metadata - summary, description tags etc.) It is slightly easier for Map Services with the arcpy/arcgis Python APIs if you wish to automate.

Hopefully this provides some insights to consistent in regard to portal deployment processes.

0 Kudos
PaulCharsley
New Contributor II

Hi Rose,

We are also working to setup an automated  process for deploying our experience builder app (and its associated content in the ArcGis portal) from a development environment to production. We intend to use the Python APIs to do this.

The clone_items method in the arcgis.gis module is designed specifically for this purpose. Within the Python API distribution there is a Jupyter Notebook page at arcgis-python-api/guide/03-the-gis/cloning-content.ipynb that provides good documentation on how to use the method for staging/cloning content between portals.

After we have cloned our content, the second stage of our process will be to build the experience builder web app using the production values (item ids) from the cloned content. We believe we can do this through a search and replace process in the files info.json and config.json that are contained in the public/apps/0 folder of our web app.

I hope this is helpful,

Paul

0 Kudos
RoseZhou2
Occasional Contributor

Thanks @PaulCharsley , we also used Python API to clone the items from dev to prod.

Rose

0 Kudos