Upgrade SonarQube to version 6.7
This commit is contained in:
parent
685be4d53a
commit
bdee66ca74
19
templates/sonarqube/2/README.md
Normal file
19
templates/sonarqube/2/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
## What is inside SonarQube Stack?
|
||||
* [SonarQube Server](http://www.sonarqube.org/) + Sidekick for storing plugins
|
||||
* Postgres Database + Sidekick for storing data
|
||||
|
||||
## Info
|
||||
* In default SonarQube package will install alpine docker version and will create "sonar" postgres database, user and password.
|
||||
* SonarQube service is exposed by a loadbalancer.
|
||||
* Optional, you could install non alpine version. Use it if your software needs glibc.
|
||||
* Optional, you could use an external postgres database link.
|
||||
* Once SonarQube will start, make sure you setup correct information in setup page.
|
||||
* For easy upgrades there are sidekicks for postgres data with dedicated storage.
|
||||
|
||||
## Installing Plugins Manually
|
||||
* Go to [Plugin Library](http://docs.sonarqube.org/display/PLUG/Plugin+Library) and find your favourite plugins
|
||||
* Execute `docker exec -it [sonarqube-data bash]`, go to /opt/sonarqube/extensions/plugins and put your plugins here
|
||||
* Restart SonarQube container.
|
||||
|
||||
## First Start
|
||||
* Use admin/admin to login to the SonarQube interface.
|
67
templates/sonarqube/2/docker-compose.yml.tpl
Normal file
67
templates/sonarqube/2/docker-compose.yml.tpl
Normal file
@ -0,0 +1,67 @@
|
||||
version: '2'
|
||||
services:
|
||||
sonarqube-lb:
|
||||
image: rancher/lb-service-haproxy:v0.7.6
|
||||
ports:
|
||||
- ${http_port}:${http_port}
|
||||
sonarqube-storage:
|
||||
network_mode: none
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.container.start_once: true
|
||||
environment:
|
||||
- SERVICE_UID=0
|
||||
- SERVICE_GID=0
|
||||
- SERVICE_VOLUME=/opt/sonarqube/extensions/plugins
|
||||
volumes:
|
||||
- sonarqube-plugin:/opt/sonarqube/extensions/plugins
|
||||
image: rawmind/alpine-volume:0.0.2-1
|
||||
sonarqube:
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.sidekicks: sonarqube-storage
|
||||
image: sonarqube:${docker_version}
|
||||
environment:
|
||||
SONARQUBE_WEB_JVM_OPTS: ${jvm_opts}
|
||||
SONARQUBE_JDBC_USERNAME: ${postgres_user}
|
||||
SONARQUBE_JDBC_PASSWORD: ${postgres_password}
|
||||
SONARQUBE_JDBC_URL: jdbc:postgresql://db:${postgres_port}/${postgres_db}
|
||||
volumes_from:
|
||||
- sonarqube-storage
|
||||
{{- if ne .Values.postgres_link ""}}
|
||||
external_links:
|
||||
- ${postgres_link}:db
|
||||
{{- else}}
|
||||
links:
|
||||
- db:db
|
||||
db:
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.sidekicks: db-storage
|
||||
image: postgres:9.6.3-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${postgres_user}
|
||||
POSTGRES_PASSWORD: ${postgres_password}
|
||||
POSTGRES_DB: ${postgres_db}
|
||||
volumes_from:
|
||||
- db-storage
|
||||
db-storage:
|
||||
network_mode: none
|
||||
labels:
|
||||
io.rancher.container.hostname_override: container_name
|
||||
io.rancher.container.start_once: true
|
||||
environment:
|
||||
- SERVICE_UID=0
|
||||
- SERVICE_GID=0
|
||||
- SERVICE_VOLUME=/var/lib/postgresql
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql
|
||||
image: rawmind/alpine-volume:0.0.2-1
|
||||
{{- end}}
|
||||
volumes:
|
||||
sonarqube-plugin:
|
||||
driver: local
|
||||
{{- if eq .Values.postgres_link ""}}
|
||||
db-data:
|
||||
driver: local
|
||||
{{- end}}
|
84
templates/sonarqube/2/rancher-compose.yml
Normal file
84
templates/sonarqube/2/rancher-compose.yml
Normal file
@ -0,0 +1,84 @@
|
||||
version: '2'
|
||||
catalog:
|
||||
name: "SonarQube"
|
||||
version: "v6.7"
|
||||
description: "SonarQube"
|
||||
uuid: sonarqube-0
|
||||
minimum_rancher_version: v0.51.0
|
||||
questions:
|
||||
- variable: docker_version
|
||||
description: "SonarQube docker version"
|
||||
label: "SonarQube docker version"
|
||||
required: true
|
||||
default: "6.7-alpine"
|
||||
type: "enum"
|
||||
options:
|
||||
- 6.7-alpine
|
||||
- 6.7
|
||||
- variable: http_port
|
||||
description: "SonarQube http port"
|
||||
label: "SonarQube http Port"
|
||||
required: true
|
||||
default: "9000"
|
||||
type: "int"
|
||||
- variable: jvm_opts
|
||||
description: "SonarQube web jvm options"
|
||||
label: "SonarQube web jvm options"
|
||||
required: false
|
||||
default: ""
|
||||
type: "string"
|
||||
- variable: postgres_port
|
||||
description: "Postgres Port"
|
||||
label: "Postgres Port"
|
||||
required: true
|
||||
default: "5432"
|
||||
type: "int"
|
||||
- variable: postgres_db
|
||||
description: "Postgres Database Name"
|
||||
label: "Postgres Database"
|
||||
required: true
|
||||
default: "sonar"
|
||||
type: "string"
|
||||
- variable: postgres_user
|
||||
description: "Postgres User"
|
||||
label: "Postgres User"
|
||||
required: true
|
||||
default: "sonar"
|
||||
type: "string"
|
||||
- variable: postgres_password
|
||||
description: "Postgres Password"
|
||||
label: "Postgres Password"
|
||||
required: true
|
||||
default: "sonar"
|
||||
type: "password"
|
||||
- variable: "postgres_link"
|
||||
description: |
|
||||
Optional external postgres service to use.
|
||||
label: "Postgres stack/service"
|
||||
default: ""
|
||||
required: false
|
||||
type: "service"
|
||||
services:
|
||||
sonarqube-lb:
|
||||
scale: 1
|
||||
lb_config:
|
||||
port_rules:
|
||||
- protocol: http
|
||||
service: sonarqube
|
||||
source_port: ${http_port}
|
||||
target_port: 9000
|
||||
health_check:
|
||||
response_timeout: 2000
|
||||
healthy_threshold: 2
|
||||
port: 42
|
||||
unhealthy_threshold: 3
|
||||
sonarqube:
|
||||
scale: 1
|
||||
retain_ip: true
|
||||
health_check:
|
||||
port: 9000
|
||||
interval: 5000
|
||||
unhealthy_threshold: 3
|
||||
request_line: 'GET / HTTP/1.0'
|
||||
healthy_threshold: 2
|
||||
response_timeout: 5000
|
@ -1,5 +1,5 @@
|
||||
name: SonarQube
|
||||
description: |
|
||||
SonarQube - an open source quality management platform.
|
||||
version: v6.5
|
||||
version: v6.7
|
||||
category: Test Automation
|
||||
|
Loading…
x
Reference in New Issue
Block a user