Esri / arcgis-cookbook

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

BUG/Enhancement: Recipe arcgis-enterprise datasources not working with cinc client #300

Closed jesa-esrich closed 2 years ago

jesa-esrich commented 2 years ago

The registering of datasources does not work when using the cinc-client in ArcGIS Chef Cookbooks 10.9.1.

Main cause:

Expected Behavior:

cameronkroeker commented 2 years ago

@jesa-esrich Great catch! As a workaround you can extract the cookbooks to C:\Chefwhen using cinc-client or cinc-solo.

You can pass in the path to the cookbook by using the following commands:

chef-client -z --config-option "cookbook_path=C:\chef\cookbooks" -j C:\path_to\your_json_config_file.json

or

cinc-solo --config-option "cookbook_path=C:\chef\cookbooks" -j C:\path_to\your_json_config_file.json
cameronkroeker commented 2 years ago

Hi @jesa-esrich,

I looked into this a bit more. You can actually still use C:\cinc as your cookbook directory and C:\cinc\misc_scripts (or any directory of your choice). To do this you will need to define the node['arcgis']['misc']['scripts_dir'] attribute within your json config file so that it overrides the default value:

https://github.com/Esri/arcgis-cookbook/blob/1c7f39341a4a967c6c73a20ee0b6bbb5b2a3dc53/cookbooks/arcgis-enterprise/attributes/datasources.rb#L21

For example:

{
    "arcgis": {
        "version": "10.9.1",
        "server": {

        },
    "datasources": {

        },
    "misc": {
        "scripts_dir": "C:\\cinc\\misc_scripts"
    }
    },
    "run_list": [
        "recipe[arcgis-enterprise::datasources]"
    ]
}

Thanks, Cameron K.

jesa-esrich commented 2 years ago

Hi @cameronkroeker

Thanks, that is good to know.

cameronkroeker commented 2 years ago

Updated the recipe to include node['arcgis']['misc']['scripts_dir'] attribute.

https://github.com/Esri/arcgis-cookbook/wiki/arcgis%E2%80%90enterprise-Cookbook-Recipes#datasources