Esri / arcgis-cookbook

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

silent run & autostart service before install complete #71

Closed afoxi911 closed 7 years ago

afoxi911 commented 7 years ago

ok. newbie here for forgive the questions. I've got the environment issues out of the way now and running client 12.17.44

i'm running the webgis-windows.json role with my local settings

but 2 things are happening from default install. 1: it doesn't run silently the arcgis server install gui loads and asks all the questions i have preset in the json config 2: the chef receipe tries to autostart the service before the service is installed and of course fails

what am i missing?

pbobov commented 7 years ago

Chef runs setups with /qb option. It should not pop up any GUI dialog boxes. Could you check the command line parameters of the ArcGIS server's setup.exe when it pops up a dialog box? Also make sure that "version" attribute in webgis-windows.json file matches the version of ArcGIS setups.

geosom commented 7 years ago

I think you use the compressed version of the .exe. By default the setup delivered is compressed and it does not work in silent mode. It would be necessary to execute it the first time the .exe which will uncompressed the files to use in the directory of your chef config.

pbobov commented 7 years ago

The cookbook supports two types of setups:

The paths to setup archive files (like ArcGIS_Server_Windows_105_154004.exe) is defined by 'setup_archive' attributes. The paths to actual setups (Setup.exe) is defined by 'setup' attributes.

Alternatively, you could copy all the setup archives in one folder (local ArcGIS software repository) and just specify the folder by arcgis/repository/archives attribute.

This is new in 3.0.0 cookbook and not very well documented.

node['arcgis']['repository']['archives'] attribute defines path to local ArcGIS software repository with ArcGIS software setup archives. If setup archive for the specified software version is found in the local repository and node['arcgis'][...]['setup'] path is not explicitly specified, the setup is extracted from the archive to the setups repository specified by node['arcgis']['repository']['setups'] attribute and is used to install the software.

pbobov commented 7 years ago

Here is a sample JSON.

Folder \\repo\software\Esri must contain the 10.5 setup archives (ArcGIS_Server_Windows_105_154004.exe, Portal_for_ArcGIS_Windows_105_154005.exe, Web_Adaptor_for_Microsoft_IIS_105_154007.exe, ArcGIS_DataStore_Windows_105_154006.exe, ...).

{
  "arcgis":{
    "run_as_password":"changeit",
    "run_as_user":"arcgis",
    "version":"10.5",
    "repository":{
      "archives":"\\\\repo\\software\\Esri"
    },
    "web_adaptor":{
      "admin_access":true
    },
    "server":{
      "admin_username":"admin",
      "admin_password":"changeit",
      "authorization_file":"\\\\repo\\licenses\\version10.5\\server.prvc"
    },
    "portal":{
      "admin_username":"admin",
      "admin_password":"changeit",
      "admin_email":"admin@mydomain.com",
      "security_question":"Your favorite ice cream flavor?",
      "security_question_answer":"vanilla",
      "authorization_file":"\\\\repo\\licenses\\version10.5\\portal.prvc"
    }
  },
  "run_list":[
    "recipe[arcgis-enterprise::system]",
    "recipe[esri-iis]",
    "recipe[arcgis-enterprise::portal]",
    "recipe[arcgis-enterprise::portal_wa]",
    "recipe[arcgis-enterprise::server]",
    "recipe[arcgis-enterprise::server_wa]",
    "recipe[arcgis-enterprise::datastore]",
    "recipe[arcgis-enterprise::federation]"
  ]
}
afoxi911 commented 7 years ago

thanks for the clarification and new info. I'll run with that.

The previous issue i had running cookbook 3.0 under the latest chef - 12.19 was solved by going back to 17.44.

However this has suddenly after running an uninstall to do a prep of this new setup re-appeared. I get class or module required. recipe compile error at portal.rb.

What would make this re-appear still running 12.17.44 ??

Update: This has just happened on a brand new VM.

Steps:

  1. ran install (1st time) - hit an error with SSL - needed fixing - fixed in json file
  2. ran uninstall process - chef - uninstall
  3. re-ran install and got the same error as above

image

pbobov commented 7 years ago

Interesting... This is a recipe compilation error. It supposed to be the same on the first and the second runs.

Could you share the content of chef-stacktrace.out?

pbobov commented 7 years ago

I just tried the cookbooks with Chef Client version 12.19.36. It worked for me (with lots of warning log messages).

afoxi911 commented 7 years ago

chef-stacktrace.txt

pbobov commented 7 years ago

This issue has something to do with :object_store attribute with a pretty unique :kind_of settings.

TypeError: class or module required
C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/mixin/params_validate.rb:187:in `kind_of?'
...
C:/opscode/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44-universal-mingw32/lib/chef/property.rb:526:in `object_store'

Could you try to change /arcgis-enterprise/resources/portal.rb this way https://github.com/Esri/arcgis-cookbook/pull/74/files and try again?

afoxi911 commented 7 years ago

image

pbobov commented 7 years ago

Try to set arcgis/portal/object_store attribute to "" in the JSON file.

{ 
  "arcgis" : {
      ...
      "portal" : {
          ...
          "object_store" : ""
       }
    }
}
afoxi911 commented 7 years ago

ok. its running now.. will let you know how it finishes