OpenShift SonarQube: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 28: Line 28:
   | oc create -f -
   | oc create -f -


oc rollout pause dc sonar


  oc rollout pause dc sonar
  oc expose service sonar --port=9000


  oc rollout resume dc sonar
  oc rollout resume dc sonar
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


=Operations=
=Operations=

Revision as of 04:19, 26 November 2017

External

Internal

Overview

SonarQube is an open source code analysis tool. It can be invoked via Maven or Jenkis plug-ins.

Installation

Install Postgres and create a "sonar" database:

OpenShift Postgres Installation

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 rollout resume dc sonar
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

Operations