Esri / arcgis-cookbook

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

chef hostsfile #237

Closed drobinson13 closed 3 years ago

drobinson13 commented 4 years ago

Hi,

In the context of an arcgis enterprise upgrade on windows - does chef utilise the hostsfile deployed on the system - C:\Windows\System32\Drivers\etc\hosts

Or does it require its own hostsfile be populated?

I am keen to QA our upgrades by using the hostsfile (retaining the production DNS).

Nickolaitc commented 4 years ago

Hey @drobinson13

Chef can make a host update if designated within the roles file.

We will need to access the roles file being utilized and in the "arcgis" segment, we will need to include "hosts" , bracket, hostname inclusion, and an empty quote (empty quotes = local IP). Please check the example below:

"arcgis":{ "run_as_user":"usernamethings", "run_as_password":"passwordthings", "version":"10.7.1", "hosts":{ "trevor.test.com": "" }

We will want to make sure that within the run_list we have "recipe[arcgis-enterprise::system]" in there as the system cookbook is what kicks off the /etc/hosts file manipulation.

pbobov commented 4 years ago

Changes to C:\Windows\System32\Drivers\etc\hosts make the system-wide effect. They definitely can affect ArcGIS Enterprise upgrades with Chef.

For ArcGIS Enterprise deployment in certain cases we use hosts file to alias certain host and domain names, for example:

  1. Use fixed alias like FILESERVER instead of actual file server machine hostname or IP address, so the file server machine can be easily replaced/recovered without other configuration changes.
  2. Loop back the load balancer's domain name to the local IP address to shorten the loop and to prevent chicken-egg sort of problems with the load balancer's health checks.
cameronkroeker commented 3 years ago

Closing since original question was addressed.