In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
SonarQube is an open source platform for code quality management to manage the quality of source code. Through the plug-in form, you can support code quality management and testing in more than 20 programming languages, including java, Cobol, JavaScrip, Groovy and so on.
1. Overview SonarQube platform consists of four components:
A SonarQube Server starts three main processes:
Web server for developers and managers to browse high-quality snapshots and configure SonarQube instances
Elasticsearch-based Search Server for backward search from UI
Compute Engine server, responsible for processing code analysis reports and saving them in the SonarQube database
An SonarQube database stores:
Configuration of SonarQube instance (security, plug-in settings, etc.)
A quality snapshot of a project, view, etc.
Several SonarQube plug-ins are installed on the server, which may include language, SCM, integration, authentication and management plug-ins
Run one or more SonarScanner on the build / continuous integration server to analyze the project
2. Architecture the following architecture shows how SonarQube integrates with other ALM tools and the location of various components that use SonarQube.
Developers code in their IDE and run local analysis using SonarLint.
Developers put their code in their favorite SCM: git,SVN,TFVC and so on.
Continuous Integration Server triggers automatic generation and executes the SonarScanner required to run SonarQube analysis.
The analysis report is sent to the SonarQube server for processing.
SonarQube Server processes the results of the analysis report, stores them in the SonarQube database, and displays the results in UI.
Developers review, comment, and challenge their problems through SonarQube UI to manage and reduce technical debt.
The manager receives the report from the analysis. Ops uses API to automate configuration and extract data from SonarQube. Operators use JMX to monitor SonarQube Server.
3. About servers the SonarQube platform cannot have multiple SonarQube servers (although the server can be installed as a cluster) and a SonarQube database.
For best performance, each component (server, database, scanner) should be installed on a separate computer, and the server computer should be dedicated.
SonarScanners extends by adding machines.
All machines must be synchronized.
The SonarQube server and the SonarQube database must be on the same network
SonarScanners does not need to be on the same network as SonarQube Server.
There is no communication between SonarScanners and SonarQube databases.
4. K8s cluster and helm are required for installation.
Helm pull stable/sonarqube
Tar xvf sonarqube-3.2.7.tgz
Vim sonarqube/values.yam
Set user and password
The reason for the helm install sonarqube. / sonarqube# error is that my cluster is version 1.16. Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
Grep-irl "extensions/v1beta1" sonarqube | grep deployment
Grep-irl "extensions/v1beta1" sonarqube | grep deploy | xargs sed-I's expansion extension of xargs sed-I's expansion extension of V1beta1 incremental appsl and v1millig'
Perform the installation again
Helm install sonarqube. / sonarqubeError: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError (Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec
Grep-irl "apps/v1" sonarqube | grep deployment
Modify the above files in turn.
Vim sonarqube/templates/deployment.yaml
Vim sonarqube/charts/postgresql/templates/deployment.yaml
Vim sonarqube/charts/mysql/templates/deployment.yaml
Perform the installation again
Pod needs to request pv. Hostpath is used here.
Cat pv/pv1.yaml apiVersion: v1kind: PersistentVolumemetadata: name: sonarqube-pv1spec: capacity: storage: 10Gi volumeMode: Filesystem accessModes:-ReadWriteOnce persistentVolumeReclaimPolicy: Retain hostPath: path: / helm/sonarqube/pv1 you can see the pod status in a moment
A perfect end!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.