GithubHelp home page GithubHelp logo

markt-de / puppet-sonarqube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maestrodev/puppet-sonarqube

1.0 2.0 20.0 371 KB

Puppet module for Sonarqube

License: Apache License 2.0

Ruby 55.25% Puppet 43.47% Shell 0.77% Dockerfile 0.50%

puppet-sonarqube's Issues

Service enable fails

Hi,

just tried the module on debian 10 (buster) to install sonarqube but i'm getting the following error:

==> default: Running provisioner: puppet...
==> default: Running Puppet with environment production...
==> default: Notice: Compiled catalog for sonarqube1.vagrant.local in environment production in 3.71 seconds
==> default: Error: Could not enable sonar: 
==> default: Error: /Stage[main]/Sonarqube::Service/Service[sonarqube]/enable: change from 'false' to 'true' failed: Could not enable sonar: 
==> default: Notice: Applied catalog in 3.73 seconds
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

After changing https://github.com/markt-de/puppet-sonarqube/blob/master/manifests/service.pp#L28 to absent it worked as it should.

It looks like that at least debian does not like if there is an init.d-script and a systemd unit with the same name. As the module officially only supports distributions with systemd i would open an PR to absent the init.d-script.

SonarQube Crowd template, trouble setting realm.

The templates/sonar.properties.epp in the Crowd section it should probably say something like:
sonar.security.realm=Crowd

Also I don't see a way to set sonar.security.localUsers='admin,sonar' either.

Is there a way to add custom lines to the sonar.properties file?

SonarQube version 9.6 breaks due to incompatible changes

SonarQube version 9.4 and 9.5 work without any issues. Upgrading to 9.6.1.59531 causes the following error:

sonar.service: Can't open PID file /opt/sonar/data/SonarQube.pid (yet?) after start: Operation not permitted

If I manually change the permissions of the file system, I get the following error in the logs

The database must be manually upgraded. Please backup the database and browse /setup

But the web server never loads and /setup cannot be run.

Any ideas what the cause might be? Something different in 9.6?

Add support for additionnal sonar config entries

The current sonar.properties.epp template only support a subset of all possible sonar properties. It is for example missing the SAML options.

Adding all the possible options might not be feasible, and not future proof, it might be best to add a additional_config_options hash.

Add ldap.StartTLS parameter

The ldap.StartTLS parameter is currently missing. Adding this parameter would make it possible to secure the ldap connection using TLS.

[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143

I'm using this module into a Ubuntu 18.04 and puppet 6.17.0

This is my code...

  class { 'sonarqube':
    version       => '7.9',
    edition       => 'community',
    user          => 'sonar',
    group         => 'sonar',
    service       => 'sonar',
    installroot   => '/opt/sonar-install',
    home          => '/opt/sonar-data',
    log_folder    => '/var/log/sonar',
    download_url  => 'https://binaries.sonarsource.com/Distribution/sonarqube',
    jdbc          => {
      url         => "jdbc:mysql://${sonar_db_host}:3306/${sonar}?useUnicode=true&characterEncoding=utf8",
      username    => $sonar_db_user,
      password    => $sonar_db_pass,
    },  
    web_java_opts => '-Xmx1024m',
    updatecenter  => true
  }

This is the puppet output...

Notice: /Stage[main]/Sonarqube::Service/File_line[set PIDDIR in startup script]/ensure: created (corrective)
Notice: /Stage[main]/Sonarqube::Service/File_line[set RUN_AS_USER in startup script]/ensure: created (corrective)
Error: Could not enable sonar: 
Error: /Stage[main]/Sonarqube::Service/Service[sonarqube]/ensure: change from 'stopped' to 'running' failed: Could not enable sonar: 
Notice: /Stage[main]/Sonarqube::Service/Service[sonarqube]: Triggered 'refresh' from 1 event
Info: Class[Sonarqube::Service]: Unscheduling all events on Class[Sonarqube::Service]
Info: Stage[main]: Unscheduling all events on Stage[main]
Notice: Applied catalog in 28.60 seconds

This is the sonar log...

--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

15:17:40.440 [WrapperSimpleAppMain] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'rewriteBatchedStatements=true'
15:17:40.444 [WrapperSimpleAppMain] WARN org.sonar.application.config.JdbcSettings - JDBC URL is recommended to have the property 'useConfigs=maxPerformance'
2020.09.11 15:17:40 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonar-install/sonarqube-7.9/temp
2020.09.11 15:17:40 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.09.11 15:17:40 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonar-install/sonarqube-7.9/elasticsearch]: /opt/sonar-install/sonarqube-7.9/elasticsearch/bin/elasticsearch
2020.09.11 15:17:40 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2020.09.11 15:17:41 INFO  app[][o.e.p.PluginsService] no modules loaded
2020.09.11 15:17:41 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2020.09.11 15:17:53 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2020.09.11 15:17:53 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonar-install/sonarqube-7.9]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonar-install/sonarqube-7.9/temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx1024m -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonar-install/sonarqube-7.9/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /opt/sonar-install/sonarqube-7.9/temp/sq-process9108603129757050528properties
2020.09.11 15:17:57 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2020.09.11 15:17:57 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2020.09.11 15:17:57 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.09.11 15:17:57 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

By the way, the log is in /opt/sonar-data/logs/sonar.log nor in log_folder => '/var/log/sonar'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.