Vivoupdater subscribes to a Kafka Topic containing recently loaded Vivo triples. It will post into both Vivo and Vivo Widgets to trigger selective re-indexing of relevant people and organizations.
Dependencies are managed with Go Modules
To install:
go get github.com/OIT-ADS-Web/vivoupdater
cd $GOPATH/src/github.com/OIT-ADS-Web/vivoupdater
go install github.com/OIT-ADS-Web/vivoupdater...
This will create $GOPATH/bin/vivo_indexer and $GOPATH/bin/fake_produce.
The following environment variables are used to control behavior:
The environment the code is running in (e.g. development|acceptance|production). Also determines where Vault looks for keys (see next)
The endpoint api of your vault installation
Using the app_role auth method - this is the key value
The vault role id
The vault secret id value
default = 200
default = 10
Where the indexer should post vivo updates
For example:
http://localhost:9080/searchService/updateUrisInSearch
The vivo instance admin email, for example:
The vivo instance admin password
Where the indexer should post widgets updates
this will be be appened to with either a /person or /organization specification
for example:
http://localhost:8080/widgets/updates
widgets instance user
widgets instance password
The Kafka list of servers (as comma separated list)
The Kafka topic that has the updates - just one at this point
The kafka topic to send metrics
A kafka client name
A kafka group name
I've found pprof helpful. You can send in the flag pprof
like this:
vivo_indexer -pprof=true
and it will enable (see go pprof):
For example (with Graphviz installed):
go tool pprof -png http://localhost:8484/debug/pprof/heap > out.png