vespa-engine / vespa

AI + Data, online. https://vespa.ai
https://vespa.ai
Apache License 2.0
5.59k stars 586 forks source link

Support multiple hosts.xml files in application package #10353

Open frodelu opened 5 years ago

frodelu commented 5 years ago

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.

kkraune commented 5 years ago

client side ...

zhaakhi commented 4 years ago

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.