Adding SonarQube Stack (#352)
* Adding SonarQube Stack * Updating configuration
This commit is contained in:
parent
85ffaf7566
commit
16859801eb
48
templates/sonarqube/0/docker-compose.yml
Normal file
48
templates/sonarqube/0/docker-compose.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
sonarqube-data:
|
||||||
|
image: busybox
|
||||||
|
net: none
|
||||||
|
labels:
|
||||||
|
io.rancher.container.start_once: true
|
||||||
|
volumes:
|
||||||
|
- /opt/sonarqube/extensions/plugins
|
||||||
|
|
||||||
|
sonarqube:
|
||||||
|
image: sonarqube
|
||||||
|
ports:
|
||||||
|
- ${http_port}:9000
|
||||||
|
links:
|
||||||
|
- postgres
|
||||||
|
environment:
|
||||||
|
http_proxy: ${http_proxy}
|
||||||
|
https_proxy: ${https_proxy}
|
||||||
|
SONARQUBE_JDBC_USERNAME: ${postgres_user}
|
||||||
|
SONARQUBE_JDBC_PASSWORD: ${postgres_password}
|
||||||
|
SONARQUBE_JDBC_URL: jdbc:postgresql://postgres/sonar
|
||||||
|
labels:
|
||||||
|
io.rancher.sidekicks: sonarqube-data
|
||||||
|
volumes_from:
|
||||||
|
- sonarqube-data
|
||||||
|
|
||||||
|
postgres-data:
|
||||||
|
image: busybox
|
||||||
|
net: none
|
||||||
|
labels:
|
||||||
|
io.rancher.container.start_once: true
|
||||||
|
volumes:
|
||||||
|
- ${postgres_data}
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:latest
|
||||||
|
ports:
|
||||||
|
- ${postgress_port}:5432
|
||||||
|
environment:
|
||||||
|
PGDATA: ${postgres_data}
|
||||||
|
POSTGRES_DB: ${postgres_db}
|
||||||
|
POSTGRES_USER: ${postgres_user}
|
||||||
|
POSTGRES_PASSWORD: ${postgres_password}
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
labels:
|
||||||
|
io.rancher.sidekicks: postgres-data
|
||||||
|
volumes_from:
|
||||||
|
- postgres-data
|
55
templates/sonarqube/0/rancher-compose.yml
Normal file
55
templates/sonarqube/0/rancher-compose.yml
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
.catalog:
|
||||||
|
name: "SonarQube"
|
||||||
|
version: "v0.0.1"
|
||||||
|
description: "SonarQube"
|
||||||
|
uuid: sonarqube-0
|
||||||
|
minimum_rancher_version: v0.51.0
|
||||||
|
questions:
|
||||||
|
- variable: http_port
|
||||||
|
description: "HTTP port to access SonarQube UI"
|
||||||
|
label: "SonarQube HTTP Port"
|
||||||
|
required: true
|
||||||
|
default: "9000"
|
||||||
|
type: "int"
|
||||||
|
- variable: postgress_port
|
||||||
|
description: "Port for Postgres"
|
||||||
|
label: "Postgres Port"
|
||||||
|
required: true
|
||||||
|
default: "5432"
|
||||||
|
type: "int"
|
||||||
|
- variable: postgres_data
|
||||||
|
description: "Postgres Data Folder"
|
||||||
|
label: "Postgres Data"
|
||||||
|
required: true
|
||||||
|
default: "/var/lib/postgresql/data/pgdata"
|
||||||
|
type: "string"
|
||||||
|
- variable: postgres_db
|
||||||
|
description: "Postgres Database"
|
||||||
|
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: "string"
|
||||||
|
- variable: http_proxy
|
||||||
|
description: "In case you are at corporate network, setup http_proxy variable"
|
||||||
|
label: "http_proxy"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: "string"
|
||||||
|
- variable: https_proxy
|
||||||
|
description: "In case you are at corporate network, setup https_proxy variable"
|
||||||
|
label: "https_proxy"
|
||||||
|
required: false
|
||||||
|
default: ""
|
||||||
|
type: "string"
|
17
templates/sonarqube/README.md
Normal file
17
templates/sonarqube/README.md
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
## 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 stack will create "sonar" postgres database with sonar user.
|
||||||
|
* Additional variables `http_proxy` and `https_proxy` are included, which can be helpfull in some cases.
|
||||||
|
* Once SonarQube will start, make sure you setup correct information in setup page.
|
||||||
|
* For easy upgrades there are sidekicks for both postgress and SonarQube 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.
|
BIN
templates/sonarqube/catalogIcon-sonarqube.png
Normal file
BIN
templates/sonarqube/catalogIcon-sonarqube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
5
templates/sonarqube/config.yml
Normal file
5
templates/sonarqube/config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: SonarQube
|
||||||
|
description: |
|
||||||
|
SonarQube - an open source quality management platform.
|
||||||
|
version: v0.0.1
|
||||||
|
category: Test Automation
|
Loading…
x
Reference in New Issue
Block a user