Skip to content

Commit

Permalink
Merge branch '40-forwardMessageElasticsearchMapping'
Browse files Browse the repository at this point in the history
See #40.
  • Loading branch information
dr0i committed Oct 29, 2020
2 parents 56f9bb0 + a04fc01 commit 93ba124
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ named as `private.pem` and `public.pem`.

[^1]: Actor names are considered relative to the hostname of the server.

# elasticsearch
## elasticsearch
You need to run a properly configured `elasticsearch` instance by
setting `cluster.name: skohub`. See the provided [elasticsearch.yml](scripts/etc/elasticsearch/elasticsearch.yml).
setting `cluster.name: skohub`. See the provided [elasticsearch.yml](scripts/etc/elasticsearch/elasticsearch.yml). Also, in some contexts, it's mandatory to initialize elasticsearch
with a proper [index-mapping](scripts/elasticsearch-mappings.json).

## start scripts
You may want to use the start script in `scripts/start.sh`. This script ensures the proper
installation of skohub-pubsub and the configuration of elasticsearch. There also reside
further scripts to manage the starting/stopping of the skohub-pubsub via init and to
monitor the processes with `monit`.
15 changes: 15 additions & 0 deletions scripts/elasticsearch-mappings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"mappings" : {
"_doc" : {
"properties" : {
"attachment" : {
"properties" : {
"@context" : {
"enabled" : false
}
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ cd $HOME/git/$NAME/scripts
###
# nothing to change from here
###
# ensure elasticsearch index exists
curl -XPUT $ES_NODE/skohub
# ensure elasticsearch index exists and initialize proper mappings
curl -XPUT $ES_NODE/skohub -H 'Content-Type: application/json' -d "@elasticsearch-mappings.json"

npm install
# start skohub-pubsub
Expand Down

0 comments on commit 93ba124

Please sign in to comment.