이 문서는 복수개의 SonarQube instance를 하나의 OS에 설치하는 방법을 정리한다.
목차 |
---|
...
SonarQube
...
7.2.x 이상
사전 준비
시스템 설정
...
코드 블럭 |
---|
wrapper.single_invocation=false |
SonarQube 10.x 버전
사전 준비
시스템 설정
포트 설정
SonarQube가 사용하는 포트를 다중 인스턴스를 고려해 구성한다.
<install-dir>/conf/sonar.properties
port | sonaqueb-a | sonarqube-b | ... |
---|---|---|---|
sonar.web.port | 9000 | 9100 | |
sonar.search.port | 9001 | 9101 | |
sonar.embeddedDatabase.port (H2DB 사용시) | 9092 | 9192 |
<install-dir>/elasticsearch/config/elasticsearch.yml
port | sonaqueb-a | sonarqube-b | ... |
---|---|---|---|
http.port | 9200 | 9210 |
sonarqube-b 추가 설정
다음 로직을 주석 처리하거나 삭제는 하나의 서버 인스턴스만 하면되며, 이때 주석처리 되지 않은 인스턴스부터 실행한다.
Linux 프로세스 체크 로직 제거
<install-dir>/bin/windows-x86-64/StartSonar.bat
코드 블럭 |
---|
start() {
echo "Starting $APP_NAME..."
#
# getpid
# if [ "X$pid" = "X" ]
# then
# exec nohup $COMMAND_LINE >../../logs/nohup.log 2>&1 &
# echo $! > $PIDFILE
# else
# echo "$APP_NAME is already running."
# exit 1
# fi
# |
Windows 프로세스 체크 로직 제거
<install-dir>/bin/windows-x86-64/StartSonar.bat
코드 블럭 |
---|
rem call :check_if_sonar_is_running FAIL || goto:eof |