While the pre-process directives in services.xml allows you a lot of flexibility when configuring Vespa, it fails to easily address a common use-case for many applications; having the exact same setup in two different regions where only hostnames differ.
While this possibly could be modeled using pre-process directives, it becomes unnecessarily complex given the straight-forward use-case. We should support multiple hosts.xml files in the application package (e.g. hosts-east.xml and hosts-west.xml) and then have deployment API (and vespa-deploy) take a parameter indicating appropriate file to use.
We currently do this with a script that swaps out hosts.xml in the application.zip file - our CI system inserts the right hosts.xml file depending on where we're deploying.
While the pre-process directives in
services.xml
allows you a lot of flexibility when configuring Vespa, it fails to easily address a common use-case for many applications; having the exact same setup in two different regions where only hostnames differ.While this possibly could be modeled using pre-process directives, it becomes unnecessarily complex given the straight-forward use-case. We should support multiple
hosts.xml
files in the application package (e.g.hosts-east.xml
andhosts-west.xml
) and then have deployment API (andvespa-deploy
) take a parameter indicating appropriate file to use.