Esri / arcgis-cookbook

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

How to download setups from my ESRI using arcgis-repository cookbook ? #341

Closed Ayushyadav19 closed 1 year ago

Ayushyadav19 commented 1 year ago

Hi @cameronkroeker,

I am using arcgis-repository cookbook to download ArcGIS setups from https://my.esri.com and prepare the chef role file for the same. Attached below is the chef role file. download_setups.txt

I am encountering an error - _FATAL: URI::InvalidURIError: arcgis_repositoryfiles[Download files from remote repository] (arcgis-repository::files line 27) had an error: URI::InvalidURIError: bad URI(is not URI?): "https://my.esri.com/classic/#/downloads/ArcGIS%20Enterprise%20(Windows)/11.0/dms/rest/download/secured/ArcGIS Web Adaptor (IIS)"

Can you please help me out with what I am missing? or what should be the correct set of attributes required to download setups from https://my.esri.com and store them in our local repository and further use for the installation?

Any help will be highly appreciated!

Thanks Ayush

cameronkroeker commented 1 year ago

Hi @Ayushyadav19,

Let's remove arcgis.repository.server.url, and arcgis.repository.server.token_service_url attributes from the json. Also, the subfolder contains an invalid path. Try using the exact json below, all you need to do is insert your ArcGIS Online built-in account username and password. The cookbooks will generate the token, and construct the download url auto-magically.

https://github.com/Esri/arcgis-cookbook/blob/237b0e39fca0a3b5988b997430bf7beb3637e039/templates/arcgis-webadaptor/11.0/windows/arcgis-webadaptor-files.json#L1-L21

Ayushyadav19 commented 1 year ago

Hi @cameronkroeker,

Thanks for your reply.

I have a couple of questions to ask:-

  1. I have realized that it is working for version 11.0 but not for version 10.9.1. Is this functionality only available for version 11.0 or for other versions too? If available for other versions then please provide the sample template for version 10.9.1.
  2. Passing my ESRI credentials in a chef JSON role file might be a security risk. So is there any way we can pass tokens instead of credentials or use any other authentication method?

Thanks Ayush

cameronkroeker commented 1 year ago

Hi @Ayushyadav19,

In theory it should also work for 10.8 through 11.0. Essentially just need to change the setup archive file name, and version in the subfolder path. Here is an example one to try for 10.9.1:

{
  "arcgis": {
    "repository": {
      "local_archives": "C:\\Software\\Archives",
      "shared": false,
      "server": {
        "username": "changeit",
        "password": "changeit"
      },
      "files": {
        "ArcGIS_Server_Windows_1091_180041.exe": {
          "subfolder": "software/arcgis/10.9.1"
        },
        "Portal_for_ArcGIS_Windows_1091_180052.exe": {
          "subfolder": "software/arcgis/10.9.1"
        },
        "Portal_for_ArcGIS_Web_Styles_Windows_1091_180053.exe": {
          "subfolder": "software/arcgis/10.9.1"
        },
        "ArcGIS_DataStore_Windows_1091_180054.exe": {
          "subfolder": "software/arcgis/10.9.1"
        },
        "ArcGIS_Web_Adaptor_for_Microsoft_IIS_1091_180055.exe": {
          "subfolder": "software/arcgis/10.9.1"
        }
      }
    }
  },
  "run_list": [
    "recipe[arcgis-repository::fileserver]",
    "recipe[arcgis-repository::files]"
  ]
}

Currently, username/password are the only options available in the cookbooks. However, we do realize the security concerns and would like to eventually provide a more secure option as it is on our long term roadmap.

Thanks, Cameron K.

Ayushyadav19 commented 1 year ago

Hi @cameronkroeker

Thanks for your reply. It worked for version 10.9.1. Just wanted to ask one last question do we have the support/functionality/cookbook available for ArcGIS Monitor 2023 if not then is it in your roadmap? and can we expect this in the next release of cookbooks?

Thanks Ayush

cameronkroeker commented 1 year ago

Thanks @Ayushyadav19, glad to hear that worked! ArcGIS Monitor 2023 will not be included in the next release of the cookbooks. It is something that will need further evaluation.