Skip to content

Service Sonar

Cintia Del Rio edited this page Jul 15, 2022 · 8 revisions

Location

Deprecated

License

No license.

Description of the service

Code quality reports. The data comes from Bamboo builds.

How to access it

https://sonar.openmrs.org/sonar/ There's an admin user in our shared credentials, and Rafal has an admin user too.

How to restart it

sudo service sonar restart

Logs location

/opt/sonar/logs/sonar.logs

Setup

Install 3.x puppet from apt.puppetlabs.com if on 12.04
# dpkg-i puppet*.deb
# apt-get update
apt-get install puppet
# puppet module install maestrodev-sonarqube
Download puppet manifest from here and modify as needed
# puppet apply sonar.pp
# service stop sonar
Add additional settings to conf file
vim /opt/sonar/conf/sonar.properties
sonar.ajp.port: 9009
wrapper.java.additional.X=-server
Set up apache proxy
        ProxyPass /sonar ajp://localhost:9009/sonar retry=0
        ProxyPassReverse /sonar ajp://localhost:9009/sonar retry=0
Set up SSL support for proxy
vim /etc/apache2/sites-available/ci.openmrs.org
RequestHeader set X_FORWARDED_PROTO 'https'
Modify maven settings.xml for agents (This was changed in the puppet module)
Set up mysql to bind to 0.0.0.0
also grant sonar @ % access to sonar db

** Firewall Rules ** allow sonar mysql db to be accessible from remote agents (e.g.) sudo ufw allow from 149.165.228.105 to any port 3306 proto tcp sudo ufw allow from 149.165.228.106 to any port 3306 proto tcp

Clone this wiki locally