Esri / arcgis-cookbook

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

Does Notebook Server support using a cloud-native config-store? #282

Closed anandak closed 3 years ago

anandak commented 3 years ago

The readme for ArcGIS Notebook Server mentions that the config store could be of type AMAZON and AZURE in addition to FILESYSTEM which is default.

node['arcgis']['notebook_server']['config_store_type'] = ArcGIS Notebook Server config store type (FILESYSTEM|AMAZON|AZURE). Default value is FILESYSTEM.

However, I could not locate ArcGIS Notebook help documentation which mentions we can use a cloud based resource as the config-store like the other server roles we have created in AWS that make use of dynamodb and S3.

Additionally, when I look at the admin directory of my Notebook Server, it shows FILESYTEM as the only option available in the dropdown. Please see image below. This is at 10.8.1.

image

cameronkroeker commented 3 years ago

Hello @anandak,

Placing the ArcGIS Notebook Server config-store in Amazon S3 is supported, but will need to be done during create_site. If the site already exists, I do not believe the config-store can be moved to Amazon S3.

Here is a link to the create site api doc that gives some example usage:

https://developers.arcgis.com/rest/enterprise-administration/notebook/create-site.htm

We can apply the principles from the link above to construct our chef role json file attributes:

"notebook_server": {
            "directories_root": "/net/FILESERVER/gisdata/notebookserver/directories",
            "workspace": "/net/FILESERVER/gisdata/notebookserver/directories/arcgisworkspace",
            "config_store_type": "AMAZON",
            "config_store_connection_string": "NAMESPACE=namespace;REGION=us-east-1","username"="<ACCESS_KEY_ID>","password"="<SECRET_KEY>"
        }

Hope this helps!

anandak commented 3 years ago

Thanks! Understood that config-store once created on filesystem cannot be moved to cloud and thats why I see only one option in the dropdown.

We have been using v3.6.1 of cookbooks to set up 10.8.1. Does v3.6.1 also support placing the config-store for Notebook in Amazon S3. An example will be greatly appreciated as I notice some extra attributes are added in latest release.

Why is such detailed documentation with examples available on developers.arcgis.com instead of enterprise.arcgis.com as that is usually our go to resource for product documentation?

cameronkroeker commented 3 years ago

Thanks! Understood that config-store once created on filesystem cannot be moved to cloud and thats why I see only one option in the dropdown.

We have been using v3.6.1 of cookbooks to set up 10.8.1. Does v3.6.1 also support placing the config-store for Notebook in Amazon S3. An example will be greatly appreciated as I notice some extra attributes are added in latest release.

Why is such detailed documentation with examples available on developers.arcgis.com instead of enterprise.arcgis.com as that is usually our go to resource for product documentation?

Hi @anandak,

You will need to use cookbook v3.7.0 in order to deploy ArcGIS Notebook Server 10.8.1 Config-Store in Amazon S3. This is because cookbook v3.6.1 uses the Create Site Utility which does not support putting Config-Store in Amazon S3, whereas in v3.7.0 it instead will use the Create Site API.

Unfortunately, I am not sure why there isn't detailed examples within the enterprise.arcgis.com documentation. You may have to reach out to Esri Technical Support and request a documentation enhancement. Alternatively or in addition to, you can submit documentation feedback here:

https://enterprise.arcgis.com/feedback/

Thanks!

anandak commented 3 years ago

@cameronkroeker thank you so much for clarifying that we need to use v3.7.0 for using S3 for Notebook config-store.

anandak commented 3 years ago

@cameronkroeker we were able to configure Notebook Server with config-store in dynamodb/S3. Initially we tried using the following format as shown in the documentation example create-site

['arcgis']['notebook_server']['config_store_type']="AMAZON"
['arcgis']['notebook_server']['config_store_connection_string']="NAMESPACE=notebook;REGION=us-east-2\",\"username\"=\"ACCESS_KEY_ID\",\"password\"=\"ACCESS_KEY"
['arcgis']['notebook_server']['config_store_class_name']="com.esri.arcgis.carbon.persistence.impl.amazon.AmazonConfigPersistence"

but it produced this error and you can see the malformed url Request endpoint must have a valid hostname, but it did not: https://dynamodb.us-east-2","username"="ACCESS_KEY_ID","password"="ACCESS_KEY.amazonaws.com. "

then we tried using pre10.8 example for config_store_connection_string and this worked without issue for 10.8.1

"config_store_connection_string": "NAMESPACE=notebook;REGION=us-east-2;ACCESS_KEY_ID=text;SECRET_KEY=text",

cameronkroeker commented 3 years ago

Hi @anandak,

This is an interesting find. The create-site is a bit misleading, perhaps it means "pre 10.8.x" values. At any rate, glad you were able to successfully deploy ArcGIS Notebook Server 10.8.1 with config-store in dynamodb/S3 using v3.7.0.

Pre 10.8.x:

['arcgis']['notebook_server']['config_store_connection_string']="NAMESPACE=notebook;REGION=us-east-2;ACCESS_KEY_ID=text;SECRET_KEY=text"

10.9:

['arcgis']['notebook_server']['config_store_connection_string']= "NAMESPACE=namespace;REGION=us-east-1","username"="<ACCESS_KEY_ID>","password"="<SECRET_KEY>"

Happy Automating, Cameron K.