This is the only doc I can find for installing Search on ADS app server. Alas, it is ambiguous and, I fear, is missing some info I need to get ADS search (Code, Wiki, Work Item) to work from my disaster recovery site ADS App Server.
Here is the setup. The WSFC and AOAG are configured and are working as expected. Note that APP01 and APP02 are not in a WSFC.
Using the ADS Admin Console on APP01, I successfully installed and configured Code, Wiki, and Work Item Search. With DB01 as the AOAG primary, when I search from the APP01 ADS web portal, results come back as expected:
Now, I want to be able to do the same search from APP02. My first try was to use the ADS Admin Console on APP02 to configure Search the same way I did on APP01. Search installed ok, but when I search from the APP02 ADS web portal, I get an error:
I went back and re-read the doc that I referenced above and came to the conclusion that I instead should have copied the contents of APP01 {drive}:\Program Files\Azure DevOps Server 2020\Search\zip
to APP02 and followed the instructions in the readme.txt file. So, I uninstalled search from APP01 and APP02, reinstalled it on APP01, and then copied the contents of APP01 {drive}:\Program Files\Azure DevOps Server 2020\Search\zip
to APP02 and followed the instructions in the readme.txt file, i.e., I ran Configure-TFSSeach.ps1
on APP02. Search seemed to install ok - all good messages from the .ps1, no errors. But, when I ran the search from the APP02 ADS web portal, Same error as before.
How do I get search to work from the APP02 ADS Web Portal?
Ok, so this scenario isn't well documented on Microsoft's side. They don't explain how to configure elastic search to scale across multiple nodes and Microsoft support closes every ticket out there on the devcommunity with the notice: "Not a supported scenario, reach out to Elastic for guidance".
The scenario that is supported it to install Elastic Search on the Application Tier for a Single Tier installation of Azure DevOps Server. That's basically what happens when you select to install Search as part of you application tier.
For security, Elastic Search is bound to the local loopback IP and no firewall ports are opened up on the first server (A), so when you install a second application tier (B), there is no way to point that at the instance of Elastic Search on A.
So, in your scenario, where you already know you need to scale, the process would be as follows:
Or completely ignore Search during installation:
network.host
value in C:\Program Files\Azure DevOps Server 2019\Search\ES\elasticsearchv6.2\config\elasticsearch.yml
to bind to a non-local IP address.If you already have Elastic Search installed on either Server A or Server B you can go into the Azure DevOps Admin console and remove the Search feature from the server (won't actually uninstall Elastic Search, will just remove the configuration):
Then change the network binding:
Then restart the Elastic Search service:
Make sure you point to the Fully Qualified Domain Name of the server running ElasticSearch, or its IP address. If you only enter the host name, the installation wizard will revert your settings back to localhost
for some obscure reason.
See also: