Oteemo / charts

Helm chart repository
https://oteemo.github.io/charts
MIT License
181 stars 232 forks source link

[sonarqube] Unable to install plugin since helm chart 9.xx #206

Closed Guimove closed 3 years ago

Guimove commented 4 years ago

Hello,

Since we have updated to helm chart 9.xx, Sonarqube is unable to start and stuck in crashloop.

Here is the list of plugins we try to install :

plugins:
  install:
      - "https://binaries.sonarsource.com/Distribution/sonar-csharp-plugin/sonar-csharp-plugin-8.9.0.19135.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-css-plugin/sonar-css-plugin-1.3.1.1642.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-flex-plugin/sonar-flex-plugin-2.6.0.2294.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-go-plugin/sonar-go-plugin-1.8.0.1775.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-html-plugin/sonar-html-plugin-3.2.0.2082.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-java-plugin/sonar-java-plugin-6.9.0.23563.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-javascript-plugin/sonar-javascript-plugin-6.6.0.13923.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-php-plugin/sonar-php-plugin-3.9.0.6331.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-python-plugin/sonar-python-plugin-3.1.0.7619.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-typescript-plugin/sonar-typescript-plugin-2.1.0.4359.jar"
      - "https://binaries.sonarsource.com/Distribution/sonar-xml-plugin/sonar-xml-plugin-2.0.1.2020.jar"
      - "https://github.com/sbaudoin/sonar-yaml/releases/download/v1.5.1/sonar-yaml-plugin-1.5.1.jar"
      - "https://github.com/willemsrb/sonar-issueresolver-plugin/releases/download/sonar-issueresolver-plugin-1.0.2/sonar-issueresolver-plugin-1.0.2.jar"
      - "https://github.com/InfoSec812/sonar-auth-google/releases/download/untagged-b38ce896a2ef581af1ee/sonar-auth-googleoauth-plugin-1.6.4-SNAPSHOT.jar"
      - "https://github.com/sbaudoin/sonar-ansible/releases/download/v2.3.0/sonar-ansible-plugin-2.3.0.jar"
      - "https://github.com/checkstyle/sonar-checkstyle/releases/download/8.35/checkstyle-sonar-plugin-8.35.jar"
      - "https://github.com/spotbugs/sonar-findbugs/releases/download/4.0.0/sonar-findbugs-plugin-4.0.0.jar"
      - "https://github.com/kwoding/sonar-webdriver-plugin/releases/download/sonar-webdriver-plugin-1.0.7/sonar-webdriver-plugin-1.0.7.jar"
      - "https://github.com/sleroy/sonar-slack-notifier-plugin/releases/download/8.0.0-beta/sonar-slack-notifier-8.0.0-beta.jar"
      - "https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/2.0.6/sonar-dependency-check-plugin-2.0.6.jar"
  lib: []

Cloud you please provide some help ?

Kampfmoehre commented 4 years ago

Go to the sonarqube-sonarqube-install-plugins config-map and remove the line rm /opt/sonarqube/extensions/downloads/* from it. Then it should work. After it booted up you can add the line again.

robojones commented 4 years ago

We should add the -f flag to this line. Then this would not fail when it does not find any files in the downloads directory.

rm -f /opt/sonarqube/extensions/downloads/*

I'll create a PR for this

robojones commented 4 years ago

I discovered that this should already be fixed in version 9.1.2 of the chart. Somehow Helm still pulls 9.1.1 and it does not find 9.1.2.

user@computer ~ $ helm show chart oteemocharts/sonarqube
apiVersion: v1
appVersion: 8.5.1-community
dependencies:
- condition: postgresql.enabled
  name: postgresql
  repository: https://charts.bitnami.com/bitnami
  version: 8.6.4
description: SonarQube is an open sourced code quality scanning tool
home: https://www.sonarqube.org/
icon: https://www.sonarqube.org/assets/logo-31ad3115b1b4b120f3d1efd63e6b13ac9f1f89437f0cf6881cc4d8b5603a52b4.svg
keywords:
- coverage
- security
- code
- quality
maintainers:
- email: rjkernick@gmail.com
  name: rjkernick
- email: tsiddique@live.com
  name: tsiddique
name: sonarqube
sources:
- https://github.com/SonarSource/docker-sonarqube
version: 9.1.1
rjkernick commented 4 years ago

You might have to run "helm repo update" before you run "helm show chart"

robojones commented 3 years ago

Thanks @rjkernick I think this issue is fixed in 9.1.2 and can be closed now

Guimove commented 3 years ago

I confirm, for me it's resolved.

The other issue I get is that now built in plugins generate an error when installing the plugin with the same key. So I was mandatory to remove some plugins from the list in my values.yml to be able to start sonar.

The error was not clear because we've deployed Sonar on a Google Kubernetes Cluster using Terraform and all logs were not exported in stackdriver (the GCP log management tool) but after looking on the file web.log (after opening a bash session on my container), I was able to find errors like : Web server startup failed: Fail to update plugin: <XXX> Code Quality and Security. Built-in feature with same key already exists: <XXX>. Move or delete plugin from extensions/downloads directory

So now it's working fine. Thanks