Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
borderColor#C3CCD7
bgColor#FCFCFC

Table of Contents

Table of Contents
indent16px


SonarQube has no built-in feature allowing to setup an SonarQube는 active-active or 혹은 active-passive 클러스터(cluster. It's up to you to setup it. Here are guidelines to setup an active-passive cluster) 생성을 기본적으로 지원하지 않습니다. 사용자는 해당 설정을 직접 수행할 수 있습니다.

다음 가이드를 따라 active-passive 클러스터를 설정할 수 있습니다.

Note:

  • this page is for SonarQube Server only and doesn't deal with database.
  • Server1 is active and Server2 is passive

Setup

  1. Server1 is started and connected to DB : ServerID is generated and Licenses are correctly set
  2. Server2 is a copy of Server1 and is stopped
  3. Change Server2 JDBC configuration to use the default embedded H2 DB
  4. Start Server2 and generate the ServerID
  5. Ask to contact@sonarsource.com the licenses corresponding to Server2's ServerID
  6. Stop Server2
  7. Change Server2 JDBC configuration to the real DB

BAU Process

  1. Have a rsync that syncs $SONAR_HOME/conf and $SONAR_HOME/extensions directories, between Server1 and Server2 every X hours
  2. Every nights, backup ES indices to avoid long rebuild of them: 
    1. Stop SonarQube Server1
    2. Do a rsync that syncs $SONAR_HOME/data/es of Server1 and Server2
    3. Start SonarQube Server1

In Case of Failure

Server1 is down.

  • Start Server2
  • Have a script using the SQ API to set the Organisation, IP, ServerID and Licenses gathered during the Setup phase
    • 본 섹션에서는 SonarQube 서버만을 다룹니다. Database는 다루지 않습니다.
    • Server1은 active, Server2는 passive 입니다.

    설정

    1. Server1은 DB에 연결되어 구동된 상태입니다: ServerID 생성 및 Licenses들이 정상적으로 설정되었습니다.
    2. Server2는 Server1을 복제한 것으로, 구동되지 않은 상태입니다.
    3. Server2가 기본 내장 데이터베이스인 H2 데이터베이스를 사용하도록 JDBC 환경을 수정합니다.
    4. Server2를 시작시킨 후 ServerID를 생성합니다.
    5. contact@sonarsrouce.com에 Server2의 ServerID와 관련된 라이선스를 문의합니다.
    6. Server2를 정지합니다.
    7. Server2가 실제 Database를 사용하도록 JDBC 환경을 수정합니다.

    BAU 프로세스

    1. Server1과 Server2의 $SONARHOME/conf와 $SONARHOME/extentions 디렉토리를 X 시간 주기로 동기화하는 rsync를 설정합니다.
    2. 매일 ES 인덱스를 백업하여 인덱스를 장시간 재생성하지 않도록 합니다:
      1. SonarQube Server1을 정지합니다.
      2. rsync로 Server1, Server2의 $SONAR_HOME/data/es 디렉토리를 동기화합니다.
      3. SonarQube Server1을 재시작합니다.

    실패하는 경우

    Server1이 다운됩니다.

    1. Server2를 시작합니다.
    2. 설정하기 단계에서 수집된 Organisation, IP, ServerID License들을 설정하도록 SQ API를 사용해 스크립트를 작성합니다.

    Web API URLS Sample

    _
    • id.ip
    _ where $1 is the key of a commercial plugin and $LICENSE its license
    • ($1 은 상용 플러그인의 키값, $LICENSE는 해당 플러그인의 라이선스입니다)