diff --git a/data/deployments/staging/common.yaml b/data/deployments/staging/common.yaml --- a/data/deployments/staging/common.yaml +++ b/data/deployments/staging/common.yaml @@ -258,3 +258,17 @@ elasticsearch::jvm_options::heap_size: 8g elasticsearch::config::prometheus::indices: true + +swh::elasticsearch::nodes: + - host: search-esnode0.internal.staging.swh.network + port: 9200 + +swh::deploy::search::backend::listen::host: 0.0.0.0 +swh::remote_service::search::config: + cls: remote + url: "http://search0.internal.staging.swh.network:%{hiera('swh::remote_service::search::port')}/" + +# The webapp can query elasticsearch to get some info related to scheduler +# tasks associated to save code now request. Modifying this so the staging +# webapp does not access the production indexes +swh::deploy::webapp::config::es_workers_index_url: http://search-esnode0.internal.staging.swh.network:9200/swh_workers-* diff --git a/data/subnets/vagrant.yaml b/data/subnets/vagrant.yaml --- a/data/subnets/vagrant.yaml +++ b/data/subnets/vagrant.yaml @@ -119,3 +119,5 @@ host: journal0.internal.staging.swh.network 10.168.130.80: host: search-esnode0.internal.staging.swh.network + 10.168.130.90: + host: search0.internal.staging.swh.network diff --git a/manifests/site.pp b/manifests/site.pp --- a/manifests/site.pp +++ b/manifests/site.pp @@ -164,6 +164,10 @@ include role::swh_elasticsearch } +node /^search\d\.internal\.staging\.swh\.network$/ { + include role::swh_search +} + node 'webapp.internal.staging.swh.network' { include role::swh_webapp } diff --git a/site-modules/role/manifests/swh_search.pp b/site-modules/role/manifests/swh_search.pp new file mode 100644 --- /dev/null +++ b/site-modules/role/manifests/swh_search.pp @@ -0,0 +1,3 @@ +class role::swh_search inherits role::swh_server { + include ::profile::swh::deploy::search +}