Esri / arcgis-cookbook

Chef cookbooks for ArcGIS
Apache License 2.0
300 stars 116 forks source link

Configure Data Store server_url #216

Closed ClaesGIS closed 5 years ago

ClaesGIS commented 5 years ago

I got a question regarding the configuration of ArcGIS Data Store. The datastore recipe refer to the server with domain_name instead of the actual server url. Is that intended? For example the portal-recpie use node['arcgis']['portal']['url'].

This is troublesome in our current configuration because the domain_name is only running the webadaptor and not the arcgisserver. So nothing is listening on server_url 'https://' + node['arcgis']['server']['domain_name'] + ':6443/arcgis'. Keep in mind, we might be using domain_name wrong, if so please enlighten me.

Relevant code: https://github.com/Esri/arcgis-cookbook/blob/0fb2143442cb57f2022b85c80742bdef89db4374/cookbooks/arcgis-enterprise/recipes/datastore.rb#L41

pbobov commented 5 years ago

That is a valid question. The datastore recipe constructs server_url instead if using private_url attribute because few releases ago Data Store configuration tool required the URL to end with ':6443/arcgis' and server/private_url might not.

It's probably time to revisit that. Does configuredatastore tool in ArcGIS Data Store 10.7 still require the ArcGIS Server URL to end with ':6443/arcgis'?

cameronkroeker commented 5 years ago

That is a valid question. The datastore recipe constructs server_url instead if using private_url attribute because few releases ago Data Store configuration tool required the URL to end with ':6443/arcgis' and server/private_url might not.

It's probably time to revisit that. Does configuredatastore tool in ArcGIS Data Store 10.7 still require the ArcGIS Server URL to end with ':6443/arcgis'?

The ArcGIS Server admin URL format has changed a bit. It no longer needs the '/arcgis' but does require ':6443'.

The ArcGIS Server admin URL is in the format https://gisserver.domain.com:6443. Note that even if your GIS Server site uses a web adaptor, you must provide the URL in the aforementioned format.

pbobov commented 5 years ago

configuredatastore tool does not needs the '/arcgis' part because it always adds '/arcgis' to the server URL, and that is the problem.

pbobov commented 5 years ago

arcgis-enterprise cookbook uses uniform URLs like <protocol>://<domain>[:<port>]/<context> for server and portal URLs. That does not work for configuredatastore tool because it requires <context> = 'arcgis'.

ClaesGIS commented 5 years ago

I should have mentioned we are still on 1.6.1 (cookbook version 3.2.1). The deployment will look similar to the one mentioned at the bottom of this page (image).

Both Portal and Arcgis servers are exposed by the same WA running on the same host as portal. I guess I'll have to manually modify recipe to meet our needs.

Feel free to close this issue unless you guys have any additional ideas on how I should proceed.

ClaesGIS commented 5 years ago

Solved by changing :configure to use node['arcgis']['server']['url'] instead of server_url 'https://' + node['arcgis']['server']['domain_name'] + ':6443/arcgis'

Result:

...
arcgis_enterprise_datastore 'Configure ArcGIS Data Store' do
  install_dir node['arcgis']['data_store']['install_dir']
  data_dir node['arcgis']['data_store']['data_dir']
  types node['arcgis']['data_store']['types']
  run_as_user node['arcgis']['run_as_user']
  server_url node['arcgis']['server']['url']
  username node['arcgis']['server']['admin_username']
  password node['arcgis']['server']['admin_password']
  retries 5
  retry_delay 60
  action :configure
end
...