Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Upgrading Search in TFS 2018 Update 3

In TFS 2018 Update 2 and 3, Elasticsearch support was updated to ES 5.4.1. If you are upgrading from any earlier version of TFS, a Search re-indexing will be required. TFS 2018 Update 3 also introduced basic auth support for connecting to Elasticsearch. To sum up the matrix –

Pre-TFS 2018 Update 2  -> TFS 2018 Update 2 : Re-indexing required
Pre-TFS 2018 Update 2  -> TFS 2018 Update 3 : Re-indexing required + Basic auth support for ES
TFS 2018 Update 2  -> TFS 2018 Update 3 : Basic auth support for ES

Performing an upgrade should be straight forward. I’ll however cover a bit of internals here and some guidance to steps in case the upgrade does not go as expected. The flow I’ve explained below is one of a remote Elasticsearch scenario (i.e. ES and TFS are installed in separated machines).

General Upgrade flow –

  • Unconfigure Search and Application Tier
  • Install new version of TFS
  • Configure Application Tier (on all AT machines in case it’s a multi-AT setup)
  • Configure Search on the primary AT machine (refer this blog post on configuring Search in multi-AT scenario)

While configuring, you need to opt-in to install and configure search.

The existing Search Service URL (i.e. Elasticsearch URL) will be pre-populated. Follow the instruction as mentioned to copy the package to the Elasticsearch machine and run the Configure-TFSSearch.ps1 script

.Configure-TFSSearch.ps1 -Operation update -User {username} -Password {password}

The script will stop the existing ES service, rename the index data folder to something like {IndexDataFolder}.{Timestamp}.old, install the ES 5.4.1 version and start the service.

Input the same username/password in the configuration wizard and proceed with the configuration on the primary AT box.

When the configuration is complete, re-indexing would have been triggered for the entities. You can verify the same quickly in the configuration logs (C:ProgramDataMicrosoftTeam FoundationServer ConfigurationLogs)

[Info   @12:55:16.098] +-+-+-+-+-| Running CodeReindexingJob: Triggering Code Search indexing on existing collections ... |+-+-+-+-+-
[Info   @12:55:16.099]
[Info   @12:55:16.099] +-+-+-+-+-| Triggering Code Search indexing on existing collections ... |+-+-+-+-+-
[Info   @12:55:16.099] Starting Node: CTRIGGERCODESEARCHINDEXINGONEXISTINGCOLLECTION
[Info   @12:55:16.099] NodePath : Container/Conditional/BestEffort/CTRIGGERCODESEARCHINDEXINGONEXISTINGCOLLECTION
[Info   @12:55:16.983] Node returned: Success

(Similar logs will show up Work Item and WIKI entities)

Note, no manual uninstall and re-install of extensions was required as part of the upgrade process. Complete re-indexing duration will depend on the volume of entity data. You can check this blog post on how to monitor the indexing progress.

In the scenario where search is not working post upgrade, you can try uninstalling and re-installing the search entity extension. Go through the detailed reset instructions mentioned in the “Re-index at Collection level: Extension Uninstall and Install” section in the this blog post.

Share the post

Upgrading Search in TFS 2018 Update 3

×

Subscribe to Msdn Blogs | Get The Latest Information, Insights, Announcements, And News From Microsoft Experts And Developers In The Msdn Blogs.

Get updates delivered right to your inbox!

Thank you for your subscription

×