OpenShift SonarQube: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(11 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Internal= | =Internal= | ||
* [[SonarQube]] | |||
* [[OpenShift Auxiliary Tools Operations#Operations|OpenShift Auxiliary Tools Operations]] | * [[OpenShift Auxiliary Tools Operations#Operations|OpenShift Auxiliary Tools Operations]] | ||
Line 13: | Line 14: | ||
=Installation= | =Installation= | ||
==Installation from Template== | |||
{{Internal| | Preferred method. | ||
{{External|https://github.com/NovaOrdis/playground/blob/master/openshift/templates/sonarqube-template.yaml}} | |||
oc process -f https://raw.githubusercontent.com/NovaOrdis/playground/master/openshift/templates/sonarqube-template.yaml | oc create -f - | |||
==Manual Installation== | |||
Install PostgreSQL and create a "sonar" database: | |||
{{Internal|OpenShift_PostgreSQL#Installation|OpenShift PostgreSQL Installation}} | |||
Apply the template | Apply the template | ||
Line 28: | Line 39: | ||
| oc create -f - | | oc create -f - | ||
oc rollout pause dc sonar | |||
oc expose service sonar --port=9000 | |||
oc set probe dc/sonar --liveness --failure-threshold 3 --initial-delay-seconds 40 -- echo ok | |||
oc set probe dc/sonar --readiness --failure-threshold 3 --initial-delay-seconds 20 --get-url=http://:9000/about | |||
oc set resources dc/sonar --limits=memory=2Gi --requests=memory=1Gi | |||
Memory is important. | |||
oc rollout resume dc sonar | oc rollout resume dc sonar | ||
=Operations= | =Operations= |
Latest revision as of 06:48, 19 October 2018
External
Internal
Overview
SonarQube is an open source code analysis tool. It can be invoked via Maven or Jenkis plug-ins.
Installation
Installation from Template
Preferred method.
oc process -f https://raw.githubusercontent.com/NovaOrdis/playground/master/openshift/templates/sonarqube-template.yaml | oc create -f -
Manual Installation
Install PostgreSQL and create a "sonar" database:
Apply the template
oc process -f ./sonar.yaml \ --param APPLICATION_NAME=sonar \ --param SONARQUBE_JDBC_USERNAME=sonar \ --param SONARQUBE_JDBC_PASSWORD=<replace-with-actual-password> \ --param POSTGRESQL_DATABASE=sonar \ --param POSTGRESQL_SERVICE=sonar-postgresql \ --param STORAGE_SIZE_GB=2 \ | oc create -f -
oc rollout pause dc sonar
oc expose service sonar --port=9000
oc set probe dc/sonar --liveness --failure-threshold 3 --initial-delay-seconds 40 -- echo ok oc set probe dc/sonar --readiness --failure-threshold 3 --initial-delay-seconds 20 --get-url=http://:9000/about oc set resources dc/sonar --limits=memory=2Gi --requests=memory=1Gi
Memory is important.
oc rollout resume dc sonar