aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-docs/src/pages')
-rw-r--r--server/sonar-docs/src/pages/setup/install-cluster.md166
-rw-r--r--server/sonar-docs/src/pages/setup/install-server.md2
-rw-r--r--server/sonar-docs/src/pages/setup/sonar-properties.md31
3 files changed, 193 insertions, 6 deletions
diff --git a/server/sonar-docs/src/pages/setup/install-cluster.md b/server/sonar-docs/src/pages/setup/install-cluster.md
index 7a658a40a3f..5baad811b6c 100644
--- a/server/sonar-docs/src/pages/setup/install-cluster.md
+++ b/server/sonar-docs/src/pages/setup/install-cluster.md
@@ -56,6 +56,25 @@ SonarSource does not provide specific recommendations for reverse proxy / load b
- Ability to balance HTTP requests (load) between the application nodes configured in the SonarQube cluster.
- If terminating HTTPS, meets the requirements set out in [Securing SonarQube Behind a Proxy](/setup/operate-server/).
- No requirement to preserve or sticky sessions; this is handled by the built-in JWT mechanism.
+- Ability to check for node health for routing
+
+#### Example with HAProxy
+
+```
+frontend http-in
+ bind *:80
+ bind *:443 ssl crt /etc/ssl/private/<server_certificate>
+ http-request redirect scheme https unless { ssl_fc }
+ default_backend sonarqube_server
+backend sonarqube_server
+ balance roundrobin
+ http-request set-header X-Forwarded-Proto https
+ option httpchk GET /api/system/status
+ http-check expect rstring UP|DB_MIGRATION_NEEDED|DB_MIGRATION_RUNNING
+ default-server check maxconn 200
+ server node1 <server_endpoint_1>
+ server node2 <server_endpoint_2>
+```
### License
@@ -65,7 +84,7 @@ You need a dedicated license to activate the Data Center Edition. If you don't h
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 [SonarSource Support](https://support.sonarsource.com) for help.
-## Configuration
+## Installing SonarQube from the ZIP file
Additional parameters are required to activate clustering capabilities and specialize each node. These parameters are in addition to standard configuration properties used in a single-node configuration.
@@ -155,7 +174,7 @@ sonar.cluster.es.hosts=ip3:9002,ip4:9002,ip5:9002
...
```
-## Sample Installation Process
+### Sample Installation Process
The following is an example of the default SonarQube cluster installation process. You need to tailor your installation to the specifics of the target installation environment and the operational requirements of the hosting organization.
@@ -187,4 +206,145 @@ The following is an example of the default SonarQube cluster installation proces
4. After all search nodes are running, start all application nodes.
5. Configure the load balancer to proxy with both application nodes.
-Congratulations, you have a fully-functional SonarQube cluster. Once you've complete these steps, you can [Operate your Cluster](/setup/operate-cluster/).
+## Installing SonarQube from the Docker Image
+
+You can also install a cluster using our docker images. The general setup is the same but is shifted to a docker specific terminology.
+
+## Requirements
+
+### Network
+
+All containers should be in the same network. This includes search and application nodes.
+For the best performance, it is advised to check for low latency between the database and the cluster nodes.
+
+### Limits
+
+The limits of each container depend on the workload that each container has. A good starting point would be:
+
+* cpus: 0.5
+* mem_limit: 4096M
+* mem_reservation: 1024M
+
+The 4Gb mem_limit should not be lower as this is the minimal value for Elasticsearch.
+
+### Logs
+
+The sonarqube_logs volume will be populated with a new folder depending on the containers hostname and all logs of this container will be put into this folder.
+This behavior also happens when a custom log path is specified via the [Docker Environment Variables](/setup/environment-variables/).
+
+### Search and Application nodes
+
+The Application nodes can be scaled using replicas. Please note that this is not the case for the Search nodes: Elasticsearch will not become ready.
+
+## Example Docker Compose configuration
+
+[[collapse]]
+| ## docker-compose.yml file example
+|
+| ```yaml
+|version: "3"
+|
+|services:
+| sonarqube:
+| image: sonarqube:8.6-datacenter-app
+| depends_on:
+| - db
+| - search-1
+| - search-2
+| - search-3
+| networks:
+| - sonar-network
+| deploy:
+| replicas: 2
+| environment:
+| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
+| SONAR_JDBC_USERNAME: sonar
+| SONAR_JDBC_PASSWORD: sonar
+| SONAR_WEB_PORT: 9000
+| SONAR_CLUSTER_SEARCH_HOSTS: "search-1,search-2,search-3"
+| SONAR_CLUSTER_HOSTS: "sonarqube"
+| SONAR_AUTH_JWTBASE64HS256SECRET: "dZ0EB0KxnF++nr5+4vfTCaun/eWbv6gOoXodiAMqcFo="
+| VIRTUAL_HOST: sonarqube.dev.local
+| VIRTUAL_PORT: 9000
+| volumes:
+| - sonarqube_data:/opt/sonarqube/data
+| - sonarqube_extensions:/opt/sonarqube/extensions
+| - sonarqube_logs:/opt/sonarqube/logs
+| search-1:
+| image: sonarqube:8.6-datacenter-search
+| hostname: "search-1"
+| depends_on:
+| - db
+| networks:
+| - sonar-network
+| environment:
+| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
+| SONAR_JDBC_USERNAME: sonar
+| SONAR_JDBC_PASSWORD: sonar
+| SONAR_CLUSTER_ES_HOSTS: "search-1,search-2,search-3"
+| SONAR_CLUSTER_NODE_NAME: "search-1"
+| search-2:
+| image: sonarqube:8.6-datacenter-search
+| hostname: "search-2"
+| depends_on:
+| - db
+| networks:
+| - sonar-network
+| environment:
+| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
+| SONAR_JDBC_USERNAME: sonar
+| SONAR_JDBC_PASSWORD: sonar
+| SONAR_CLUSTER_ES_HOSTS: "search-1,search-2,search-3"
+| SONAR_CLUSTER_NODE_NAME: "search-2"
+| search-3:
+| image: sonarqube:8.6-datacenter-search
+| hostname: "search-3"
+| depends_on:
+| - db
+| networks:
+| - sonar-network
+| environment:
+| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar
+| SONAR_JDBC_USERNAME: sonar
+| SONAR_JDBC_PASSWORD: sonar
+| SONAR_CLUSTER_ES_HOSTS: "search-1,search-2,search-3"
+| SONAR_CLUSTER_NODE_NAME: "search-3"
+| db:
+| image: postgres:12
+| networks:
+| - sonar-network
+| environment:
+| POSTGRES_USER: sonar
+| POSTGRES_PASSWORD: sonar
+| volumes:
+| - postgresql:/var/lib/postgresql
+| - postgresql_data:/var/lib/postgresql/data
+| proxy:
+| image: jwilder/nginx-proxy
+| ports:
+| - "80:80"
+| volumes:
+| - /var/run/docker.sock:/tmp/docker.sock:ro
+| networks:
+| - sonar-network
+| - sonar-public
+|
+|networks:
+| sonar-network:
+| ipam:
+| driver: default
+| config:
+| - subnet: 172.28.2.0/24
+| sonar-public:
+| driver: bridge
+|
+|volumes:
+| sonarqube_data:
+| sonarqube_extensions:
+| sonarqube_logs:
+| postgresql:
+| postgresql_data:
+| ```
+
+## Next Steps
+Once you've complete these steps, check out the [Operate your Cluster](/setup/operate-cluster/) documentation.
diff --git a/server/sonar-docs/src/pages/setup/install-server.md b/server/sonar-docs/src/pages/setup/install-server.md
index c6375a80b0e..441d0bf8422 100644
--- a/server/sonar-docs/src/pages/setup/install-server.md
+++ b/server/sonar-docs/src/pages/setup/install-server.md
@@ -249,7 +249,6 @@ If you're using [Docker Compose](https://docs.docker.com/compose/), use the foll
| - sonarqube_data:/opt/sonarqube/data
| - sonarqube_extensions:/opt/sonarqube/extensions
| - sonarqube_logs:/opt/sonarqube/logs
-| - sonarqube_temp:/opt/sonarqube/temp
| ports:
| - "9000:9000"
| db:
@@ -265,7 +264,6 @@ If you're using [Docker Compose](https://docs.docker.com/compose/), use the foll
| sonarqube_data:
| sonarqube_extensions:
| sonarqube_logs:
-| sonarqube_temp:
| postgresql:
| postgresql_data:
| ```
diff --git a/server/sonar-docs/src/pages/setup/sonar-properties.md b/server/sonar-docs/src/pages/setup/sonar-properties.md
index 860eba21b22..adf1b5ef2a3 100644
--- a/server/sonar-docs/src/pages/setup/sonar-properties.md
+++ b/server/sonar-docs/src/pages/setup/sonar-properties.md
@@ -341,6 +341,36 @@ If SonarQube is behind a reverse proxy, then the following value allows to displ
Default value (which was "combined" before version 6.2) is equivalent to "combined + SQ HTTP request ID":
`SONAR_WEB_ACCESSLOGS_PATTERN=%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}"`
+## DataCenter Edition
+
+**`SONAR_CLUSTER_NAME=sonarqube`**
+
+The name of the cluster. Required if multiple clusters are present on the same network. For example, this prevents mixing Production and Preproduction clusters. This will be the name stored in the Hazelcast cluster and used as the name of the Elasticsearch cluster.
+
+**`SONAR_CLUSTER_SEARCH_HOSTS`**
+
+Comma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port, but not both. The item format is `ip/hostname` for host only or`ip/hostname:port` for host and port. `ip/hostname` can also be set to the service name of the search containers .
+
+### Search Nodes Only
+
+**`SONAR_CLUSTER_ES_HOSTS`**
+
+Comma-delimited list of search hosts in the cluster. The list can contain either the host or the host and port but not both. The item format is `ip/hostname` for host only or`ip/hostname:port` for host and port, while `ip/hostname` can also be set to the service name of the search containers.
+
+**`SONAR_CLUSTER_NODE_NAME`**
+
+The name of the node that is used on Elasticsearch and stored in Hazelcast member attribute (NODE_NAME)
+
+### Application Nodes Only
+
+**`SONAR_CLUSTER_HOSTS`**
+
+Comma-delimited list of all **application** hosts in the cluster. This value must contain **only application hosts**. Each item in the list must contain the port if the default `SONAR_CLUSTER_NODE_PORT` value is not used. Item format is `ip/hostname`, `ip/hostname:port`. `ip/hostname` can also be set to the service name of the application containers.
+
+**`SONAR_CLUSTER_NODE_PORT`**
+
+The Hazelcast port for communication with each application member of the cluster. Default: `9003`
+
## Others
**`SONAR_NOTIFICATIONS_DELAY=60`**
@@ -359,4 +389,3 @@ Telemetry - Share anonymous SonarQube statistics. By sharing anonymous SonarQube
**`SONAR_SEARCH_HTTPPORT=-1`**
Elasticsearch HTTP connector
-