Jenkins and SonarQube on Single Host with Nginx
Keep SonarQube run on its default port 9000
Nginx Configuration for Jenkins
server {
listen 80;
location / {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the "It appears that your reverse proxy set up is broken" error.
proxy_pass http://127.0.0.1:8080;
proxy_read_timeout 90;
proxy_redirect http://127.0.0.1:8080 http://172.21.26.20;
# Required for new HTTP-based CLI
proxy_http_version 1.1;
proxy_request_buffering off;
}
}
Sonar Configuration :
Install Sonar as per below URL :
https://hostpresto.com/community/tutorials/how-to-install-sonarqube-continuous-inspection-on-ubuntu-14-04/
- Setup MySQL Username & Password
- Create Sonarqube database in MySQL
Once above done start Sonar server. Try to browse Sonar URL http://<Server IP address>:9000/
Jenkins Configuration :
Install Plugin - SonarQube Scanner
SonarQube Servers
SonarQube Graph
Create Authentication Token in SonarQube --> MyAccont-->Security
Thank you so much for sharing this worth able content with us.
ReplyDeleteDevOps Online Training