Configure ArcGIS Notebook Server directories
ArcGIS Notebook Server stores the file-based configurations and content needed for its operations in server directories. These directories can be added during the installation and configuration of ArcGIS Notebook Server, or later using ArcGIS Notebook Server Manager.
There are four types of directories, each of which plays a specific role in server operations: the workspace directory, the data directory, the output directory, and the system directory. The workspace and data directories are described below; the output and system directories are for purposes internal to ArcGIS Notebook Server.
Workspace directory
The workspace directory allows notebook authors to store and read the files used in their notebooks. Each notebook author in the ArcGIS Enterprise portal has a unique folder within the workspace directory. Your unique folder is mounted in each of your notebooks, so the notebook can read and write to the workspace directory. A notebook can only read and write information in its user's respective workspace directory folder; that folder cannot be accessed from other users' notebooks.
By default, users' private workspace directories are created in the /directories/arcgisworkspace/<userid> folders, with permissions set as -rwxrwxrwx. That permission level is necessary because by default, the Linux user account running inside the container will have a different UID and GID (group ID) than your OS user account running the ArcGIS Notebook Server daemon.
If you do not want to use the open permission model for security reasons, you can change the model using a system property named applyDefaultUserWorkspacePermissions. When this property is set to true, workspace directories will be created using your system's default setting, such as -rwx------, rather than the open -rwxrwxrwx setting.
To use this feature, the OS user running the ArcGIS Notebook Server daemon must have a UID of 1050 and a GID of 100 (to match the UID and the GID of the container user).
Sign in to the Administrator Directory.
The URL is formatted
https://notebookserver.domain.com:11443/arcgis/admin.Browse to System > Properties and click Edit.
Add the following JSON string to the properties box and save the edit:
{ "applyDefaultUserWorkspacePermissions":"true" }
Data directory
Data is essential to ArcGIS Notebooks. When authoring notebooks, you can add data layers from items in the ArcGIS Enterprise portal, from external GIS servers, or from local file directories.
A local directory containing data can be made available to notebooks as a file path by being registered with their ArcGIS Notebook Server site. Once a data directory has been registered with your ArcGIS Notebook Server site, it can be accessed and used by every notebook running in that site. Data directories can be accessed from the Files tab in the notebook editor. Multiple data directories can be registered with a server site.
Notebooks that use raster analytics workflows have a particular use for data directories. You can register a file-based raster store as a data directory, making the output of raster analytics tools immediately available in notebooks.
Considerations for data directories
For notebooks to have access to a registered data directory, the directory must allow read and execute permissions to all users.
For notebooks to have access to a registered data directory, set 755-mode permissions for the directory.
All notebook authors in your organization can add data from all registered data directories to their notebooks. You cannot limit data directories to certain users or groups in the portal.
In deep-learning workflows that involve the generation of image chips to train a model, rather than registering the raster store, it is recommended that you use your raster store to generate the chips, then upload the generated chips to your Notebook Server workspace. Once the chips have been uploaded, you can process the data and train your model from within your notebook.
Data in a registered data directory is not part of the ArcGIS Enterprise portal. Accordingly, when a notebook is shared, ensure that all users who will view the shared notebook have access to any registered data directory the notebook references.
Register a data directory
Registering a data directory allows notebook authors to access a shared folder on disk from the site, such as project files, datasets, or raster outputs. A registered data directory is available to all notebook users in the site.
Sign in to your ArcGIS Enterprise organization as an administrator and open ArcGIS Notebook Server Manager.
Open the Settings page, and click Directories.
Click Register data directory to open the registration dialog box.
Provide the name of the directory and its full path on your machine.
Note:
To upload or write files to this custom data directory, the directory must be writable by the arcgis user in the users group inside the notebook container. If the folder is not writable by this user, notebooks cannot save files to it.
In a multi-machine site, the directory path must be accessible from every machine in the site. A path that is only local to one machine is not valid for shared site use unless it is exposed through shared storage.
Click Register data directory to confirm.
Note:
After registering a data directory, existing notebook containers must be refreshed before the directory is visible. Close any open notebooks, delete any running containers, and reopen the notebooks.
You can edit the path of a registered data directory. To change its name, you must unregister the existing directory and register it again.
Specify a new location for a server directory
You can edit an existing directory in Manager to change its location. Use this method when expanding to a multiple-machine site to place your directories on shared file paths.
Note:
Use a local directory path for the arcgisworkspace directory and any custom data directories that your users register with the site. The same directory path must exist on each machine in a multiple-machine site.
Sign in to your ArcGIS Enterprise portal as an administrator and open ArcGIS Notebook Server Manager.
Open the Settings page, and click Directories.
Choose the directory you want to modify, and click the Edit
button under Actions.Replace the existing Path value with the new path of the directory. Click Save to confirm.
After the site restarts, it uses the new path to access the directory.
Copy and paste the contents of the existing directory to its new location.
Add a UNC path or shared folder as a data directory on Windows containers
To add a UNC path or shared folder as a data directory on Windows containers, follow the steps below:
Follow steps 1 through 5 in Set up a mapped network drive for the workspace directory section to create a mapped drive with the UNC path.
Follow the steps in the Register a data directory section above to register the new mapped drive.
Repeat these steps for each directory you want to update.
Note:
If the arcgisworkspace directory location is updated, you must rerun the installation utility to extract sample data to the new workspace directory location.