#sonarqube
####Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with sonarqube
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
##Overview
This is the sonarqube module. It deliver SonarQube (previously known as Sonar), the Open Source platform to manage code quality (see http://www.sonarqube.org/).
##Module Description
The module creates a local sonarqube mysql db, adds the SonarQube Debian/Ubuntu repository, installs the software, configures logs and db parameters, and enable the service to start at boot.
##Setup
###What sonarqube affects
-
installs packages
openjdk-7-jdk,mysql-serverandmysql-clientif not yet installed -
creates a new
sonarqubedb (access withsonarqube/sonarqube) to be used by the SonarQube software to record the quality metrics -
adds to the system the Debian/Ubuntu repository for SonarQube distribution (creates a file
sonarqube.listin/etc/apt/sources.list.d) -
installs the package
sonarfrom the newly configured repo -
creates
/var/log/sonardirectory owned bysonar:adm -
link
/opt/sonar/logsto the log directory created under/var -
configures the software by providing username, password, url and driver class name to access the db
-
enable a new service sonar to start at boot and listen for http request on port 9000.
###Setup Requirements
This modules requires the following other modules to be installed:
-
dsestero/javato install a suitable java development environment -
puppetlabs/mysqlto install mysql db -
puppetlabs/aptin order to add the SonarQube repository -
puppetlabs/stdlibto have additional resource type likefile_line, useful for configuring the software
###Beginning with sonarqube
To install sonarqube as a service with default configuration, it is possible to use a declaration as the following:
include sonarqube
##Usage
At the moment there are no customizations.
##Reference
###Public Classes
sonarqube::sonarqube: Manages sonarqube
###Private Classes
sonarqube::params: Specifies the module defaultssonarqube::install: Installs the module artifactssonarqube::config: Configures the module artifactssonarqube::service: Sets up the service
###sonarqube::sonarqube
Installs, configure and sets up a sonarqube service.
##Limitations
At the moment the module targets only OpenJDK on Ubuntu platforms. Specifically, it was tested only on Ubuntu 12.04 and Ubuntu 16.04 64 bit distributions, although probably it will work also on more recent versions and different architectures.
##Development
If you need some feature please send me a (pull) request or send me an email at: dsestero 'at' gmail 'dot' com.