From de7c3df3e65284e650000c60436de98a2deeaaa4 Mon Sep 17 00:00:00 2001 From: Vinuja Date: Wed, 27 Nov 2024 01:46:18 +0000 Subject: [PATCH 1/2] add sonarqube to marketplace --- sonarqube/install.sh | 9 +++++++++ sonarqube/logo.png | Bin 0 -> 7768 bytes sonarqube/manifest.yaml | 7 +++++++ sonarqube/post_install.md | 35 +++++++++++++++++++++++++++++++++++ sonarqube/uninstall.sh | 5 +++++ 5 files changed, 56 insertions(+) create mode 100644 sonarqube/install.sh create mode 100644 sonarqube/logo.png create mode 100644 sonarqube/manifest.yaml create mode 100644 sonarqube/post_install.md create mode 100644 sonarqube/uninstall.sh diff --git a/sonarqube/install.sh b/sonarqube/install.sh new file mode 100644 index 00000000..619daf39 --- /dev/null +++ b/sonarqube/install.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +helm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube + +helm repo update + +kubectl create namespace sonarqube + +helm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube \ No newline at end of file diff --git a/sonarqube/logo.png b/sonarqube/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1ba1e0ab9d12ac872ddc07d9d80e237e8afcb1a1 GIT binary patch literal 7768 zcmai3byQT{*S>T}sDL=6NOwyM2nYj1rywODB_Q3cbm$-=H8cz@B1jG(C7>XsC|yGj zDIMP(-tYh4tTk)qth>*SXYYIVbN7wa(NZNRr6UCZfE=o(tOo!%;9neom=OGV>VbTY zU3u!MJ_4!+8P>oBzP+NRA^_AR-#E7>0M{fh)t-0)07WPEi_`0dv;_dhEvT}hfuF@z zHc116VQQ~61FhGTt~(=jFL`&cudVXSXBNgsH#kI-B=7UY--w$d<8gX*@@~gbS^3+B z86$$^G*6L`1&^2~J~q6i>B|i3X7eV68nqf*++wC@nf6jEW^~-}qN%L>^dfZj=;|xn zbGvdq&~^IX6eH-+|NN-+z{QOpKEAvK2<7aYYve3L0!!?t-fH}+@PBu153~p6I&GF3 z&T7{3pe_u(?T$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%yqX8Sc0 zn;IXaMw_Ph0R?y(9D&CbmkgrD*C~mq1p6p-4G_pHGQrG_e%(!M{;wW-%(0~?E85un zAD)w=;+)A;0wg$AYOCyGCSdQlwkd`$X#`?34nBNeuMyj*GHeO|-m$(eN)NOk7->ny zHpLw*Uf2^0ED@TZ>jICmx!3^xO^v$9x(;W20uP&|g8zz(_+#6`T+LpB%zrn7sqgmh zELjVmbgU?u+xl>JOYO}&WMM4fZs+45U|P4a2A;G8b!xHla$3B5jD2?qX6Ao>^lCdP Zt|;RV_la2(X%eyGP!%oZsz+84{|E2Jrn~?E literal 0 HcmV?d00001 diff --git a/sonarqube/manifest.yaml b/sonarqube/manifest.yaml new file mode 100644 index 00000000..1615e48f --- /dev/null +++ b/sonarqube/manifest.yaml @@ -0,0 +1,7 @@ +name: sonarqube +version: 10.7 +maintainer: "@VinujaKhatode" +description: SonarQube is an open-source, on-premise code analysis tool that enables developers to detect bugs, code smells, and security vulnerabilities across 30+ programming languages. +url: https://www.sonarsource.com/open-source-editions/sonarqube-community-edition/ +category: management + diff --git a/sonarqube/post_install.md b/sonarqube/post_install.md new file mode 100644 index 00000000..6bc9769d --- /dev/null +++ b/sonarqube/post_install.md @@ -0,0 +1,35 @@ +# Post Installation Instructions for SonarQube + +SonarQube is an open-source platform developed by SonarSource for continuous inspection of code quality. It performs automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 30+ programming languages. It provides a quality gate which can be integrated in to the CI pipelines. + +## 1. Get the Application URL + +To access the SonarQube application, follow these steps: + +### a. Retrieve the SonarQube Pod Name + +```sh +export POD_NAME=$(kubectl get pods --namespace sonarqube -l "app=sonarqube,release=sonarqube" -o jsonpath="{.items[0].metadata.name}") +``` +### b. Forward the Port + +```kubectl port-forward $POD_NAME 8080:9000 -n sonarqube``` + +### c. Access the Application + +Visit to the localhost from your browser: + +```http://127.0.0.1:8080``` + +## 2. Default Credentials +The default credentials for SonarQube are: + +Username: admin +Password: admin + +SonarQube prompts to change the default password after the first login. + +## 3. User Guide & Official Documentation + +For more information, visit the [SonarQube Documentation.](https://docs.sonarsource.com/sonarqube/latest/) + diff --git a/sonarqube/uninstall.sh b/sonarqube/uninstall.sh new file mode 100644 index 00000000..02aff91e --- /dev/null +++ b/sonarqube/uninstall.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +helm uninstall -n sonarqube sonarqube + +kubectl delete namespace sonarqube \ No newline at end of file From 613f8796cd4c7468f08862ed77a762f314136ff3 Mon Sep 17 00:00:00 2001 From: Vinuja Date: Tue, 24 Dec 2024 14:14:18 +0000 Subject: [PATCH 2/2] chore: update sonarqube service type --- sonarqube/install.sh | 2 +- sonarqube/post_install.md | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sonarqube/install.sh b/sonarqube/install.sh index 619daf39..3d511d86 100644 --- a/sonarqube/install.sh +++ b/sonarqube/install.sh @@ -6,4 +6,4 @@ helm repo update kubectl create namespace sonarqube -helm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube \ No newline at end of file +helm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube --set service.type=LoadBalancer \ No newline at end of file diff --git a/sonarqube/post_install.md b/sonarqube/post_install.md index 6bc9769d..698b7b26 100644 --- a/sonarqube/post_install.md +++ b/sonarqube/post_install.md @@ -6,26 +6,25 @@ SonarQube is an open-source platform developed by SonarSource for continuous ins To access the SonarQube application, follow these steps: -### a. Retrieve the SonarQube Pod Name +### a. Retrieve the Load Balancer IP ```sh -export POD_NAME=$(kubectl get pods --namespace sonarqube -l "app=sonarqube,release=sonarqube" -o jsonpath="{.items[0].metadata.name}") +export SERVICE_IP=$(kubectl get svc --namespace sonarqube sonarqube-sonarqube -o jsonpath='{.status.loadBalancer.ingress[0].ip}') ``` -### b. Forward the Port -```kubectl port-forward $POD_NAME 8080:9000 -n sonarqube``` - -### c. Access the Application +### b. Access the Application Visit to the localhost from your browser: -```http://127.0.0.1:8080``` +` echo http://$SERVICE_IP:9000 ` + +Example - `http://74.220.19.252:9000` ## 2. Default Credentials The default credentials for SonarQube are: -Username: admin -Password: admin +Username: `admin` \ +Password: `admin` SonarQube prompts to change the default password after the first login.