![]() ![]() Make sure you're using volumes as shown with the above commands, and not bind mounts. $> docker volume create -name sonarqube_extensions $> docker volume create -name sonarqube_logs sonarqube_extensions: will contain any plugins you install and the Oracle JDBC driver if necessary.Ĭreate the volumes with the following commands: $> docker volume create -name sonarqube_data.sonarqube_logs: contains SonarQube logs about access, web process, CE process, and Elasticsearch. ![]() sonarqube_data: contains data files, such as the embedded H2 database and Elasticsearch indexes.Creating the following volumes helps prevent the loss of information when updating to a new version or upgrading to a higher edition:.We recommend using Docker Engine version 20.10 and above.įollow these steps for your first installation: SonarQube docker images support running both on the amd64 architecture and on arm64-based Apple Silicon. Installing SonarQube from the Docker image Monitoring and adjusting Java process memory.Running SonarQube as a service on Windows or Linux.It is possible to overwrite the default Java executable by setting the environmental variable SONAR_JAVA_PATH. If there are multiple versions of Java installed on your server, you may need to explicitly define which version of Java is used. Adjusting the Java installationīy default, the scripts will use the Java executable available in the PATH. You can now browse SonarQube at (the default system administrator credentials are admin/ admin). On Windows: /bin/windows-x86-64/StartSonar.bat.On macOS: /bin/macosx-universal-64/sonar.sh start.On Linux: /bin/linux-x86-64/sonar.sh start.These values can be changed in /conf/sonar.properties: =192.168.0.1Įxecute the following script to start the server: The default port is 9000 and the context path is /. The user used to launch SonarQube must have read and write access to those directories. Beyond maintaining acceptable performance, doing so will also ease the upgrade of SonarQube.Įdit /conf/sonar.properties to configure the following settings: =/var/sonarqube/data Instead, you should store this data elsewhere, ideally in a dedicated volume with fast I/O. Configuring the Elasticsearch storage pathīy default, Elasticsearch data is stored in /data, but this is not recommended for production instances. Do not replace the provided drivers they are the only ones supported.įor Oracle, copy the JDBC driver into /extensions/jdbc-driver/oracle. =jdbc:postgresql://localhost/sonarqube Adding the JDBC driverĭrivers for the supported databases (except Oracle) are already provided. Just uncomment and configure the template you need and comment out the lines dedicated to H2: Example for PostgreSQL Templates are available for every supported database. Setting access to the databaseĮdit /conf/sonar.properties to configure the database settings. (below) refers to the path to the directory where the SonarQube distribution has been unzipped. SonarQube cannot be run as root on Unix-based systems, so create a dedicated user account for SonarQube if necessary. Then download and unzip the distribution (do not unzip into a directory starting with a digit). PostgreSQL Installing SonarQube from the ZIP fileįirst, check the requirements. Grant this sonarqube user permissions to create, update, and delete objects for this schema. They are real requirements not recommendations.Ĭreate an empty schema and a sonarqube user. Be sure to follow the requirements listed for your database. Several external database engines are supported. The server and database hosts should be located on the same network.Īll hosts must be time-synchronized. One or more scanners running on your build or continuous integration servers to analyze projects.įor optimal performance, the SonarQube server and database should be installed on separate hosts, and the server host should be dedicated.Metrics and issues for code quality and security generated during code scans.The compute engine in charge of processing code analysis reports and saving them in the SonarQube database.A search server based on Elasticsearch.A web server that serves the SonarQube user interface.The SonarQube server running the following processes:. ![]()
0 Comments
Leave a Reply. |