This repository has been archived by the owner on Jun 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/mesos-0.28
- Loading branch information
Showing
18 changed files
with
144 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM sonarqube:5.3 | ||
MAINTAINER Container Solutions BV <[email protected]> | ||
|
||
ADD sonar-plugins/sonar-github-plugin-1.1.jar /opt/sonarqube/extensions/plugins | ||
ADD sonar-plugins/sonar-java-plugin-3.7.1.jar /opt/sonarqube/extensions/plugins | ||
ADD sonar-plugins/sonar-scm-git-plugin-1.0.jar /opt/sonarqube/extensions/plugins | ||
ADD sonar-plugins/sonar-scm-svn-plugin-1.2.jar /opt/sonarqube/extensions/plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### Create Persistent Disk | ||
`gcloud compute disks create --size 200GB minimesos-sonar-postgres-disk` | ||
|
||
### Attach created disk to linux instance for formatting and data transfer | ||
`gcloud compute instances attach-disk jenkins-ci-4 --disk minimesos-sonar-postgres-disk --device-name postgresdisk` | ||
|
||
### Mount and format disk | ||
``/usr/share/google/safe_format_and_mount /dev/disk/by-id/google-postgresdisk /postgresdisk` | ||
|
||
### Detach Disk from linux instance | ||
`gcloud compute instances detach-disk jenkins-ci-4 --disk minimesos-sonar-postgres-disk` | ||
|
||
### Create cluster | ||
|
||
Did this one from the web console, so couldn't record the command. Here are the details of the cluster: | ||
Cluster size: 1 | ||
Node type: n1-standard-2 (2 vCPUs, 7.5 GB memory) | ||
Master zone: europe-west1-d | ||
Node zones: europe-west1-d | ||
Network: ci-network | ||
|
||
### Create database password secret | ||
This password gets applied to the postgres database on first start, changin it later is not possible as it's persisted | ||
to the persistent disk | ||
|
||
echo -n "thepassword" > password | ||
`kubectl create secret generic postgres-pwd --from-file=./password` | ||
|
||
### TODO | ||
|
||
1. Create new domain name as old one can't be shared anymore between Jenkins and Sonar. sonar.minimesos.ci.container-solutions.com | ||
2. Make https work for sonar | ||
3. User management in sonar? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: sonar | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: sonar | ||
labels: | ||
name: sonar | ||
spec: | ||
containers: | ||
- image: containersol/minimesos-sonar | ||
args: | ||
- -Dsonar.web.context=/sonar | ||
name: sonar | ||
env: | ||
- name: SONARQUBE_JDBC_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-pwd | ||
key: password | ||
- name: SONARQUBE_JDBC_URL | ||
value: jdbc:postgresql://sonar-postgres:5432/sonar | ||
ports: | ||
- containerPort: 9000 | ||
name: sonar |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: sonar-postgres | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
name: sonar-postgres | ||
labels: | ||
name: sonar-postgres | ||
spec: | ||
containers: | ||
- image: postgres:9.5.3 | ||
name: sonar-postgres | ||
env: | ||
- name: POSTGRES_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: postgres-pwd | ||
key: password | ||
- name: POSTGRES_USER | ||
value: sonar | ||
ports: | ||
- containerPort: 5432 | ||
name: postgresport | ||
volumeMounts: | ||
# This name must match the volumes.name below. | ||
- name: data-disk | ||
mountPath: /var/lib/postgresql/data | ||
volumes: | ||
- name: data-disk | ||
gcePersistentDisk: | ||
# This disk must already exist. | ||
pdName: minimesos-sonar-postgres-disk | ||
fsType: ext4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
name: sonar-postgres | ||
name: sonar-postgres | ||
spec: | ||
ports: | ||
- port: 5432 | ||
selector: | ||
name: sonar-postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
name: sonar | ||
name: sonar | ||
spec: | ||
ports: | ||
- port: 80 | ||
targetPort: 9000 | ||
name: sonarport | ||
selector: | ||
name: sonar | ||
type: LoadBalancer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters