구성요소 재설치 및 복원하기

이 문서에서는 Edge 구성요소의 재설치 및 복원을 다룹니다. 백업을 복원하기 전에 Edge 구성요소를 다시 설치해야 하는 경우 이 절차를 사용하세요.

Apache ZooKeeper

독립형 노드 하나 복원

  1. ZooKeeper를 중지합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper stop
  2. 이전 ZooKeeper 디렉터리를 삭제합니다.
    /opt/apigee/data/apigee-zookeeper
    /opt/apigee/etc/apigee-zookeeper.d
  3. ZooKeeper를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
  4. ZooKeeper 복원:
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 모든 구성요소를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-all restart

클러스터 노드 하나 복원

앙상블에 속한 단일 ZooKeeper 노드에 장애가 발생하면 동일한 호스트 이름/IP 주소로 새 노드를 만들고 ZooKeeper를 다시 설치하면 됩니다. 새 ZooKeeper 노드가 ZooKeeper 앙상블에 참여하면 리더로부터 최신 스냅샷을 가져와 클라이언트에 서비스를 제공하기 시작합니다. 이 인스턴스에서 데이터를 복원할 필요가 없습니다.

  1. ZooKeeper를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
  2. 원래 노드를 설치할 때 사용한 것과 동일한 구성 파일을 사용하여 ZooKeeper 노드에서 설정을 실행합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper setup -f configFile
  3. ZooKeeper를 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper start

전체 클러스터 복원

  1. 전체 클러스터를 중지합니다.
  2. 단일 노드에 대해 위에서 설명한 대로 백업 파일에서 모든 ZooKeeper 노드를 복원합니다.
  3. ZooKeeper 클러스터를 시작합니다.
  4. 모든 구성요소를 다시 시작합니다.

Apache Cassandra

독립형 노드 하나 복원

  1. Cassandra를 중지합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
  2. 이전 Cassandra 디렉터리를 삭제합니다.
    /opt/apigee/data/apigee-cassandra
  3. Cassandra를 다시 설치합니다.
    /apigee/apigee-service/bin/apigee-service apigee-cassandra install
  4. Cassandra 복원:
    /apigee/apigee-service/bin/apigee-service apigee-cassandra restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 모든 구성요소를 다시 시작합니다.
    /apigee/apigee-service/bin/apigee-all restart

클러스터 노드 하나 복원

앙상블에 속한 단일 Cassandra 노드가 실패하면 동일한 호스트 이름/IP 주소로 새 노드를 만들 수 있습니다. Cassandra를 다시 설치하고 몇 가지 추가 단계를 따르면 됩니다. 백업에서 데이터를 복원할 필요가 없습니다. 다른 노드에서 사용할 수 있는 복제본을 사용하여 장애가 발생한 노드의 데이터를 복원할 수 있습니다. 이 단계는 일반적으로 Cassandra 클러스터의 노드가 하드웨어 오작동 등으로 인해 비정상 종료되는 경우에 적용됩니다.

실패한 노드에 더 이상 액세스할 수 없는 경우 노드를 삭제하고 네트워크를 격리하여 실수로 Cassandra 클러스터에 다시 참여하지 않도록 합니다. 그런 다음 원래 노드와 동일한 IP 주소로 새 노드를 가져와서 일반적인 Apigee 부트스트랩 단계를 실행합니다.

노드에 계속 액세스할 수 있고 노드를 재사용하려면 다음 단계를 따르세요.

  1. 노드에서 Cassandra 프로세스를 중지합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
  2. 노드에서 Cassandra 소프트웨어를 제거합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra uninstall
  3. 노드에서 데이터 디렉터리를 삭제합니다.
    rm -rf /opt/apigee/data/apigee-cassandra

위 단계를 완료하면 실패한 노드와 동일한 IP 주소를 가진 노드가 Apigee 소프트웨어 설치를 위해 준비됩니다. 다음 단계를 따르세요.

  1. 데이터 센터의 시드 노드를 식별합니다.
    1. 복원되는 노드와 동일한 데이터 센터에 있는 운영 Cassandra 노드에서 다음 명령어를 실행합니다.
      apigee-service apigee-cassandra configure -search conf_cassandra_seeds
    2. 다음과 같이 출력됩니다.
      Found key conf_cassandra_seeds, with value, "127.0.0.1", in /opt/apigee/apigee-cassandra/token/default.properties
      Found key conf_cassandra_seeds, with value, 127.0.0.1, in /opt/apigee/apigee-cassandra/token/application/cassandra.properties
      Found key conf_cassandra_seeds, with value, "10.1.0.1,10.1.0.2", in /opt/apigee/token/application/cassandra.properties
      apigee-configutil: apigee-cassandra: # OK
    3. 출력의 마지막 줄을 참고하세요. 쉼표로 구분된 IP 주소는 이 데이터 센터의 노드에서 사용되는 시드 노드입니다.
  2. 복원되는 새 노드에서 다음 파일을 만들거나 수정합니다.
    vi /opt/apigee/customer/application/cassandra.properties
  3. Add the following line:
    conf_jvm_options_custom_settings=-Dcassandra.replace_address=<ip-address-of-dead-node>
  4. 이 노드가 시드 노드 중 하나인 경우 (1단계의 시드 노드 목록에 노드의 IP 주소가 표시됨) 파일에 다른 줄을 추가합니다.
    conf_cassandra_seeds="<comma-separated-seed-list-except-this-node’s-ip>"
    1. 예를 들어 위의 인스턴스에서 시드 목록에는 10.1.0.1 및 10.1.0.2라는 2개의 IP가 있습니다. 복원되는 노드가 10.1.0.1인 경우 다음과 같은 줄을 추가합니다.
      conf_cassandra_seeds="10.1.0.2"
  5. 파일을 저장하고 Apigee 사용자(
    )가 파일을 소유하고 읽을 수 있는지 확인합니다.
    chown apigee:apigee /opt/apigee/customer/application/cassandra.properties
  6. Cassandra 소프트웨어를 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install
  7. Cassandra 설정을 실행합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra setup -f <configFile>
  8. 설정에서는 내부적으로 Cassandra 서비스를 부트스트랩하려고 시도합니다. 다른 노드에서 스트리밍할 데이터 양, 네트워크 처리량 등에 따라 시간이 오래 걸릴 수 있습니다.
  9. [고급 옵션] 노드에서 다음 nodetool 명령어를 실행하여 데이터 스트리밍을 가속화할 수 있습니다.
    nodetool setstreamthroughput <value>
    nodetool setcompactionthroughput <value>
  10. Cassandra 노드가 다시 시작되면 아래와 같은 표준 명령어를 사용하여 노드가 링에 성공적으로 조인되었는지 확인합니다.
    /opt/apigee/apigee-cassandra/bin/nodetool ring
    /opt/apigee/apigee-cassandra/bin/nodetool status
  11. 노드가 성공적으로 실행 중인지 확인한 후 /opt/apigee/customer/application/cassandra.properties 파일을 다시 수정하고 이 절차의 3단계와 4단계에서 이전에 추가한 줄을 삭제합니다.
  12. 노드에서 Cassandra 서비스를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restart

전체 클러스터 복원

  1. 전체 클러스터를 중지합니다.
  2. 백업 파일에서 모든 Cassandra 노드를 복원합니다.
  3. Cassandra 클러스터를 시작합니다.
  4. 모든 구성요소를 다시 시작합니다.

PostgreSQL 데이터베이스

PostgreSQL이 독립형으로 실행되거나 마스터로 실행됨

  1. 모든 노드에서 관리 서버, Qpid 서버, Postgres 서버를 중지합니다.
    /apigee/apigee-service/bin/apigee-service edge-management-server stop
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
  2. PostgreSQL 데이터베이스를 다시 설치합니다.
    /apigee/apigee-service/bin/apigee-service apigee-postgresql install 
  3. PostgreSQL을 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
  4. 백업 파일에서 PostgreSQL 데이터베이스를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2019.03.17,14.40.41

    PostgreSQL 구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 '.dump' 접미사도 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 모든 노드에서 관리 서버, Qpid 서버, Postgres 서버를 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server start
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server start
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start

대기 모드로 실행되는 PostgreSQL

  1. PostgreSQL 데이터베이스를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install
  2. 설치하는 데 사용한 것과 동일한 구성 파일을 사용하여 PostgreSQL 데이터베이스를 재구성합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup -f configFile
  3. PostgreSQL을 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start 

Postgres 서버

  1. 모든 마스터 및 대기 노드에서 Postgres 서버를 중지합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
  2. 이전 Postgres 서버 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-postgres-server /opt/apigee/etc/edge-postgres-server.d
  3. Postgres 서버를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server install
  4. 백업 파일에서 Postgres 서버를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-postgre-server restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 모든 마스터 및 대기 노드에서 Postgres 서버를 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start

Qpid 서버 및 Qpidd

  1. 모든 노드에서 Qpidd, Qpid 서버, Postgres 서버를 중지합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server stop
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd stop
  2. 이전 Qpid 서버 및 Qpidd 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-qpid-server
    /opt/apigee/etc/edge-qpid-server.d
    /opt/apigee/data/apigee-qpidd
    /opt/apigee/etc/apigee-qpidd.d 
  3. Qpidd를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd install 
  4. Qpidd 복원:
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. Qpidd를 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start 
  6. Qpid 서버를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server install
  7. Qpid 서버 복원:
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  8. 모든 노드에서 Qpid 서버, Qpidd, Postgres 서버를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart

SymasLDAP

  1. SymasLDAP 중지:
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap stop
  2. SymasLDAP를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap install
  3. 이전 SymasLDAP 디렉터리를 삭제합니다.
    /opt/apigee/data/apigee-openldap /opt/apigee/etc/apigee-openldap.d
  4. SymasLDAP 복원:
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. SymasLDAP를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service apigee-openldap start
  6. 모든 관리 서버를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restart

관리 서버

  1. 관리 서버 중지:
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
  2. 이전 관리 서버 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-management-server /opt/apigee/etc/edge-management-server.d
  3. 관리 서버를 다시 설치합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server install
  4. 백업 파일에서 관리 서버를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 관리 서버를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-management-server start

메시지 프로세서

  1. 메시지 프로세서 중지:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
  2. 이전 메시지 프로세서 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-message-processor
    /opt/apigee/etc/edge-message-processor.d
  3. 메시지 프로세서 다시 설치:
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor install
  4. 백업 파일에서 메시지 프로세서를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 메시지 프로세서를 다시 시작합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-message-processor start

라우터

  1. 라우터 중지:
    /opt/apigee/apigee-service/bin/apigee-service edge-router stop
  2. 이전 라우터 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-router
    /opt/apigee/etc/edge-router.d
  3. 라우터 재설치:
    /opt/apigee/apigee-service/bin/apigee-service edge-router install
  4. 백업 파일에서 라우터를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-router restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. 라우터 다시 시작:
    /opt/apigee/apigee-service/bin/apigee-service edge-router start

Edge UI

  1. UI 중지:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui stop
  2. 이전 UI 디렉터리를 삭제합니다.
    /opt/apigee/data/edge-ui
    /opt/apigee/etc/edge-ui.d
  3. UI 재설치:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui install
  4. 백업 파일에서 UI를 복원합니다.
    /opt/apigee/apigee-service/bin/apigee-service edge-ui restore 2019.03.17,14.40.41

    구성요소를 복원할 때는 백업 파일의 디렉터리 경로를 지정하지 않으며 'backup-' 접두사나 '.tar.gz' 접미사를 지정하지 않습니다. 백업 파일 이름의 날짜/시간 부분만 지정합니다.

    원하는 경우 restore 명령어에서 백업 파일을 생략할 수 있으며 Edge는 구성요소의 백업 디렉터리에서 가장 최근 백업 파일을 사용합니다.

  5. UI 다시 시작:
    /opt/apigee/apigee-service/bin/apigee-service edge-ui start

전체 사이트 복구

  1. 모든 구성요소 노드를 중지합니다. 서브시스템 중지 순서가 중요합니다. 먼저 모든 Edge 노드를 중지한 다음 모든 데이터 저장소 노드를 중지합니다.
  2. 위에서 설명한 대로 모든 구성요소를 복원합니다.
  3. 이제 다음 순서로 모든 구성요소를 시작합니다. 하위 시스템 시작 순서가 중요합니다.
    1. ZooKeeper 클러스터 시작
    2. Cassandra 클러스터 시작
    3. SymasLDAP가 실행 중인지 확인
    4. qpid 시작
    5. PostgreSQL 데이터베이스가 실행 중인지 확인합니다.
    6. 관리 서버 시작
    7. 라우터 및 메시지 프로세서 시작
    8. Qpid 서버 시작
    9. Postgres 서버 시작
    10. Apigee UI 시작