<commit_before>Puppet-SonarQube
================

[![Build Status](https://travis-ci.org/maestrodev/puppet-sonarqube.svg?branch=master)](https://travis-ci.org/maestrodev/puppet-sonarqube)
[![Puppet Forge](https://img.shields.io/puppetforge/v/maestrodev/sonarqube.svg)](https://forge.puppetlabs.com/maestrodev/sonarqube)
[![Puppet Forge](https://img.shields.io/puppetforge/f/maestrodev/sonarqube.svg)](https://forge.puppetlabs.com/maestrodev/sonarqube)


A puppet recipe to install SonarQube (former Sonar)


# Usage

    class { 'java': }
    class { 'sonarqube' :
      version => '5.1',
    }

or

    $jdbc = {
      url      => 'jdbc:h2:tcp://localhost:9092/sonar',
      username => 'sonar',
      password => '<PASSWORD>',
    }

    class { 'sonarqube' :
      arch          => 'linux-x86-64',
      version       => '5.1,
      user          => 'sonar',
      group         => 'sonar',
      service       => 'sonar',
      installroot   => '/usr/local',
      home          => '/var/local/sonar',
      download_url  => 'http://downloads.sonarsource.com/sonarqube',
      jdbc          => $jdbc,
      web_java_opts => '-Xmx1024m',
      log_folder    => '/var/local/sonar/logs',
      updatecenter  => 'true',
      http_proxy    => {
      	host        => 'proxy.example.com',
      	port        => '8080',
      	ntlm_domain => '',
      	user        => '',
      	password    => '',
      }
    }

## SonarQube Plugins

The `sonarqube::plugin` defined type can also be used to install SonarQube plugins. Note that Maven is required to download the plugins then.

    class { 'java': }
    class { 'maven::maven' : }
    ->
    class { 'sonarqube' : }
    
    sonarqube::plugin { 'sonar-twitter-plugin' :
      groupid    => 'org.codehaus.sonar-plugins',
      artifactid => 'sonar-twitter-plugin',
      version    => '0.1',
      notify     => Service['sonarqube'],
    }
    

### LDAP Plugin

The `sonarqube` class actually includes "built-in" support for the LDAP plugin to make it easier to use, e.g.:

    $ldap = {
      url          => 'ldap://myserver.mycompany.com',
      user_base_dn => 'ou=Users,dc=mycompany,dc=com',
      local_users  => ['foo', 'bar'],
    }<commit_msg>Fix README about service notification from plugin declaration not needed.<commit_after>Puppet-SonarQube
================

[![Build Status](https://travis-ci.org/maestrodev/puppet-sonarqube.svg?branch=master)](https://travis-ci.org/maestrodev/puppet-sonarqube)
[![Puppet Forge](https://img.shields.io/puppetforge/v/maestrodev/sonarqube.svg)](https://forge.puppetlabs.com/maestrodev/sonarqube)
[![Puppet Forge](https://img.shields.io/puppetforge/f/maestrodev/sonarqube.svg)](https://forge.puppetlabs.com/maestrodev/sonarqube)


A puppet recipe to install SonarQube (former Sonar)


# Usage

    class { 'java': }
    class { 'sonarqube' :
      version => '5.1',
    }

or

    $jdbc = {
      url      => 'jdbc:h2:tcp://localhost:9092/sonar',
      username => 'sonar',
      password => '<PASSWORD>',
    }

    class { 'sonarqube' :
      arch          => 'linux-x86-64',
      version       => '5.1,
      user          => 'sonar',
      group         => 'sonar',
      service       => 'sonar',
      installroot   => '/usr/local',
      home          => '/var/local/sonar',
      download_url  => 'http://downloads.sonarsource.com/sonarqube',
      jdbc          => $jdbc,
      web_java_opts => '-Xmx1024m',
      log_folder    => '/var/local/sonar/logs',
      updatecenter  => 'true',
      http_proxy    => {
      	host        => 'proxy.example.com',
      	port        => '8080',
      	ntlm_domain => '',
      	user        => '',
      	password    => '',
      }
    }

## SonarQube Plugins

The `sonarqube::plugin` defined type can also be used to install SonarQube plugins. Note that Maven is required to download the plugins then.

    class { 'java': }
    class { 'maven::maven' : }
    ->
    class { 'sonarqube' : }
    
    sonarqube::plugin { 'sonar-twitter-plugin' :
      groupid    => 'org.codehaus.sonar-plugins',
      artifactid => 'sonar-twitter-plugin',
      version    => '0.1',
    }
    

### LDAP Plugin

The `sonarqube` class actually includes "built-in" support for the LDAP plugin to make it easier to use, e.g.:

    $ldap = {
      url          => 'ldap://myserver.mycompany.com',
      user_base_dn => 'ou=Users,dc=mycompany,dc=com',
      local_users  => ['foo', 'bar'],
    }
{'fraction_non_alphanumeric': 0.16613852421910366, 'fraction_numerical': 0.01041195110909914, 'mean_word_length': 2.312593703148426, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 64, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '434437', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1543, 'n_words': 271}