Adding SonarQube Stack (#352)

* Adding SonarQube Stack

* Updating configuration
This commit is contained in:
Mateusz Trojak 2016-12-12 18:29:46 +01:00 committed by Hussein Galal
parent 85ffaf7566
commit 16859801eb
5 changed files with 125 additions and 0 deletions

View 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

View 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"

View 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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,5 @@
name: SonarQube
description: |
SonarQube - an open source quality management platform.
version: v0.0.1
category: Test Automation