Esri / arcgis-cookbook

Chef cookbooks for ArcGIS
Apache License 2.0
290 stars 115 forks source link

Permission issue ? #353

Closed simongis closed 1 year ago

simongis commented 1 year ago

Tring to learn Chef and setting up a base ArcGIS Enteprise Deployment 11.1, on Ubuntu Server 22.04, on VirtualBox, and have snapshots to easily roll back.

Have been following the tutorial, and also added my user is in adm, sudo groups.

With files/auth downloaded into the right folders, I start the process with:

simon@sycamore:/opt/cinc$ sudo cinc-client -z -j arcgis-enterprise-primary.json

First error encountered is:

 RuntimeError
    ------------
    Cannot read from directory path '/gisdata/arcgisportal'. Please check that the location is valid and that the Portal service account has permissions to the location.

I assumed the script would handle creating the relevant permissions for the portal service account? Other than adding my user into the sudoers file, is there anything else I have missed? Sure it will be something simple.

Have attached the ouptut and the arcgis-enterprise-primary.json file with passwords removed.

At this stage I am trying with allowing the script to generate self-signed certs, once that rolls through ok, will then look to apply some certs with acme.sh and some fiddling with DNS.

sudoers file: %sudo ALL=(ALL:ALL) ALL myuser ALL=(ALL:ALL) NOPASSWD: ALL OutputFromTerminal.txt

arcgis-enterprise-primary.txt

cameronkroeker commented 1 year ago

Hi @simongis,

When using a non-default directory for portal's content (/gisdata/arcgisportal) it will need to exist prior to running arcgis-enterprise-primary.json. It can either be created manually, or by using the arcgis-enterprise-fileserver.json.

The default portal content directory on linux is /<arcgis.portal.install_dir>/arcgis/portal/usr/arcgisportal/content. For example:

"content_store_connection_string": "/opt/arcgis/portal/usr/arcgisportal/content",

I can see how this bit is confusing and will look to getting the documentation updated.

Thanks, Cameron K.

simongis commented 1 year ago

Thanks @cameronkroeker for the details.

I get a few errors and no gisdata folder created or its sub folders.

Was hoping to avoid creating the folder structure manually if possible. Any tips? First time using Chef, and suspect it is again something trivial.

Output_Error_Running_FileserverJSON.txt

image

simongis commented 1 year ago

Let me know if you have any ideas if this looks like something simple @cameronkroeker Will be dedicating some time over the weekend to troubleshoot further.

cameronkroeker commented 1 year ago

Hi @simongis,

ArcGIS Cookbooks v4.1.0 use NFS cookbook 2.6.4 for the fileserver recipe in arcgis-enterprise-fileserver.json.

https://github.com/Esri/arcgis-cookbook/blob/b6eba15c34cd5bbb192df830f395b3d5aea0e735/cookbooks/arcgis-enterprise/metadata.rb#L16

I've found that NFS cookbook 2.6 and 3.0 fail on Ubuntu 22.04 (with the error you described above), but works on Ubuntu 18.04 and 20.04. I suspect it is similar to the issue described here:

https://github.com/sous-chefs/nfs/issues/118

I've tested NFS cookbook 5.0 on Ubuntu 22.04 and it works, however it requires chef_version '>= 15.3'. This means if we were to upgrade the NFS cookbook from 2.6 to 5.0 in our ArcGIS cookbooks we would have to drop support for Chef 14.

https://github.com/Esri/arcgis-cookbook/blob/b6eba15c34cd5bbb192df830f395b3d5aea0e735/cookbooks/arcgis-enterprise/metadata.rb#L8

We've started a discussion here about the possibility of dropping support for Chef 14 in the future: https://github.com/Esri/arcgis-cookbook/discussions/352

Here are the platforms we've tested/verified that work with the arcgis-enterprise-base 11.1 template: https://esri.github.io/arcgis-cookbook/templates/arcgis-enterprise-base/11.1.html#supported-platforms

Thanks, Cameron K.

simongis commented 1 year ago

Thanks Cameron. I did spot 22.04 was not on the list before starting but took a gamble, a bad one.

Based upon what’s in the recipes for this step, I think ill start from scratch with a supported OS.

Thanks for your help. On the plus side, learnt a few things from this mistake.