I try to install sonarqube container on an Azure WebApp.
It works fine as long as you use the H2 database. Unfortunately, this database is emptied each time the container restarts.
Therefore, i'm trying to use SQLServer instead of H2.
Everything works fine when the container is hosted on my machine. But on the WebApp, i get an issue form the underlying ElasticSearch:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I'm not a Linux power user, but as far as i could read, it can only be changed on the host machine which i cannot tweak.
I've tried to use different containers such as this one:
https://azure.microsoft.com/en-in/resources/templates/101-webapp-linux-sonarqube-azuresql/
I've alsofollowed this tutorial:
https://www.natmarchand.fr/sonarqube-azure-webapp-containers/
Nothing works :(
Has anyone succeeded to install a Sonarqube container on Azure with SQL Server as database? Or has anyone solved the issue mentioned above?
Thanks a lot for your feedbacks.
3 Answers
Yes. I was able to solve. There is a environment variable in SQ code - Dsonar.es.bootstrap.checks.disable if set to true will not force the bootstrap checks. We can not set this env variable from Azure apps service since azure will replace "." to "-". So the only way to make it work is to use custom docker image and pass the param -Dsonar.es.bootstrap.checks.disable in the custom run script. If you need more details please checkout my page here - https://shubhamgargcth.github.io/SonarQubeAzureAppService/
ulimits:
nofile:
soft: 65536
hard: 65536
is your friend.
This example seems to be the exact fit for your case: https://github.com/MrZoidberg/docker-sonarqube/blob/master/recipes/docker-compose-postgres-example.yml
I tried SonarQube
in my team and deployed on Azure
with SqlServer
in a linux VM.
That was simple
These are 2 articles which can help you step by step, how to deploy Sonarqube on azure.
https://www.azuredevopslabs.com/labs/vstsextend/sonarqube/sonarqube-arm/
PS: My SQLServer
was running outside of SonarQube
container/VM I deployed SQL Server and create one DB and then connect DB with SonarQube
config.