Start Free
Latest | Server installation and setup | Data Center Edition | From ZIP file

Installing Data Center Edition from the ZIP file

On this page

Don't start this journey alone! As a Data Center Edition subscriber, SonarSource will assist with the setup and configuration of your cluster. Get in touch with Sonar Support for help.

Prerequisites

You have:

  1. Prepared the cluster environment by setting up the network and provisioning the nodes and load balancer. See DCE installation requirements and recommendations.
  2. Performed the pre-installation steps. See DCE pre-installation steps.
  3. Installed your database. See Installing the database.

Step 1: Install an application node and create your ZIP installation package

1. On a single application node of the cluster, download and install SonarQube Server DCE:

    • Download the distribution
    • Unzip the downloaded ZIP file into the directory you want to use to install your SonarQube (except a directory starting with a digit). The figure below shows this directory. It is called <sonarqubeHome> in this documentation. 

2. Perform the basic setup:

    • Set access to the database.
    • If using Oracle, add the JDBC driver.
    • Set the web server connection parameters.

3. Add the cluster-related parameters to <sonarqubeHome>/conf/sonar.properties. See Sample configuration below.

4. You can perform advanced setup. In particular, store the JWT token to keep the user sessions alive on server restart. This is also a good opportunity to install plugins

5. Zip the directory <sonarqubeHome>. This archive is a customized SonarQube Server DCE package that can be copied to other nodes.

Step 2: Test your node installation

  1. On the application node where you created your ZIP package, comment out all cluster-related parameters in <sonarqubeHome>/conf/sonar.properties.
  2. Configure the load balancer to proxy with single application node.
  3. Start the node and test access through load balancer.
  4. Request license from SonarSource Sales Team.
  5. After applying license, you will have a full-featured SonarQube Server system operating on a single node.

Step 3: Deploy your ZIP package on other nodes

  1. Unzip SonarQube Server package on the other nodes.
  2. Complete the basic setup:
    • On the application nodes:
      • Set access to the database.
      • If using Oracle, add the JDBC driver.
      • Set the web server connection parameters.
    • On the search nodes:
      • Configure the Elasticsearch storage path.
  3. Configure node-specific parameters in <sonarqubeHome>/conf/sonar.properties on all search and application nodes. Make sure the cluster-related parameters are properly set.
  4. You can perform advanced setup:
    • On all nodes:
      • Adjust java executable path.
      • Enable IPv6.
    • On the application nodes:
      • Self-signed certificates.
      • Change DNS cache TTL.
      • Store JWT token in order to keep user sessions alive on server restart.
  5. Start all search nodes. See Starting SonarQube Server from the ZIP file.
  6. After all search nodes are running, start all application nodes. 
  7. Configure the load balancer to proxy with all application nodes.

Sample Configuration

The following example represents a sample configuration of a SonarQube Server Data Center Edition's sonar.properties file. The example assumes:

  • The VMs having IP addresses ip1 and ip2 (server1, server2) are application nodes
  • The VMs having IP addresses ip3, ip4, and ip5 (server3, server4 and server5) are search nodes

The system properties indicated below are described in the General section of the list of system properties specific to the Data Center Edition.

The configuration to be added to sonar.properties for each node is the following:

Application nodes

server1:

...
sonar.cluster.enabled=true
sonar.cluster.node.type=application
sonar.cluster.node.host=ip1
sonar.cluster.node.port=9003
sonar.cluster.hosts=ip1,ip2
sonar.cluster.search.hosts=ip3:9001,ip4:9001,ip5:9001
sonar.auth.jwtBase64Hs256Secret=YOURGENERATEDSECRET
...

server2

...
sonar.cluster.enabled=true
sonar.cluster.node.type=application
sonar.cluster.node.host=ip2
sonar.cluster.node.port=9003
sonar.cluster.hosts=ip1,ip2
sonar.cluster.search.hosts=ip3:9001,ip4:9001,ip5:9001
sonar.auth.jwtBase64Hs256Secret=YOURGENERATEDSECRET
...

Search nodes

server3

...
sonar.cluster.enabled=true
sonar.cluster.node.type=search
sonar.cluster.node.search.host=ip3
sonar.cluster.node.search.port=9001
sonar.cluster.node.es.host=ip3
sonar.cluster.node.es.port=9002
sonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002
...

server4

...
sonar.cluster.enabled=true
sonar.cluster.node.type=search
sonar.cluster.node.search.host=ip4
sonar.cluster.node.search.port=9001
sonar.cluster.node.es.host=ip4
sonar.cluster.node.es.port=9002
sonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002
...

server5

...
sonar.cluster.enabled=true
sonar.cluster.node.type=search
sonar.cluster.node.search.host=ip5
sonar.cluster.node.search.port=9001
sonar.cluster.node.es.host=ip5
sonar.cluster.node.es.port=9002
sonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002
...

Was this page helpful?

© 2008-2025 SonarSource SA. All rights reserved.

Creative Commons License