Reputation: 41
I've been using Sonarqube with its embedded database for demos. Now, I need to connect it to an external Elasticsearch instance to meet the requirements of a production environment.
Which configurations I have to add on the elasticsearch.yml
and sonar.properties
?
Upvotes: 4
Views: 3798
Reputation: 974
I succeed to use a external ElasticSearch with latest sonarqube 8.9. But it's just a hack at your own risk.
First start a elastic search instance anywhere.
Modify the file
cat >> conf/sonar.properties < EOF
# your external host and port
sonar.search.port=9200
sonar.search.host=192.168.xx.xx
EOF
# create a dummy run script
cat > elasticsearch/bin/elasticsearch << EOF
#!/bin/bash
# it's a inflate sleep
cat
EOF
just start sonarqube and view indexs in your new elasticsearch.
Upvotes: 2
Reputation: 22804
For the move to production, you don't need to, and shouldn't try to connect to an external Elasticsearch instance. SonarQube starts up and manages its own instance internally.
What you do need to do is connect to an external database, and that's easily done by setting the correct properties in $SONARQUBE_HOME/conf/sonar.properties
Upvotes: 5