このドキュメントでは、Edge コンポーネントの再インストールと復元について説明します。バックアップから復元する前に、Edge コンポーネントを再インストールする必要がある場合は、この手順を使用します。
Apache ZooKeeper
スタンドアロンのノードを 1 つ復元する
- ZooKeeper を停止します。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper stop
- 既存の ZooKeeper ディレクトリを削除します。
/opt/apigee/data/apigee-zookeeper /opt/apigee/etc/apigee-zookeeper.d
- ZooKeeper を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
- ZooKeeper を復元します。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - すべてのコンポーネントを再起動します。
/opt/apigee/apigee-service/bin/apigee-all restart
クラスタノードを 1 つ復元する
ZooKeeper アンサンブルのうちのノードの 1 つに障害が発生した場合、同じホスト名/IP アドレスで新しいノードを作成し、ZooKeeper を再インストールできます。新しい ZooKeeper ノードが ZooKeeper アンサンブルに参加すると、リーダーから最新のスナップショットを取得して、クライアントへの提供を始めることができます。このインスタンスにデータを復元する必要はありません。
- ZooKeeper を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper install
- 元のノードをインストールするときに使用したのと同じ構成ファイルを使用して、ZooKeeper ノードでセットアップを実行します。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper setup -f configFile
- ZooKeeper を起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper start
クラスタ全体を復元する
- クラスタ全体を停止させます。
- 上記の単一ノードの場合と同様に、バックアップ ファイルからすべての ZooKeeper ノードを復元します。
- ZooKeeper クラスタを起動します。
- すべてのコンポーネントを再起動します。
Apache Cassandra
スタンドアロンのノードを 1 つ復元する
- Cassandra を停止します。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
- 既存の Cassandra ディレクトリを削除します。
/opt/apigee/data/apigee-cassandra
- Cassandra を再インストールします。
/apigee/apigee-service/bin/apigee-service apigee-cassandra install
- Cassandra を復元します。
/apigee/apigee-service/bin/apigee-service apigee-cassandra restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - すべてのコンポーネントを再起動します。
/apigee/apigee-service/bin/apigee-all restart
クラスタノードを 1 つ復元する
アンサンブルに属する Cassandra ノードの 1 つに障害が発生した場合は、同じホスト名/IP アドレスで新しいノードを作成できます。必要な作業は Cassandra を再インストールすることと、いくつかの追加の手順を行うことだけです。バックアップからデータを復元する必要はありません。他のノードで使用可能なレプリカを使用して、障害が発生したノードのデータを復元できます。通常、これらの手順は、ハードウェアの誤動作などが原因で Cassandra クラスタのノードがクラッシュした場合に適用されます。
障害が発生したノードにアクセスできなくなった場合は、ノードを破棄し、ネットワークを分離して、誤って Cassandra クラスタに再参加できないようにします。次に、元のノードと同じ IP アドレスで新しいノードを起動し、通常の Apigee ブートストラップ手順を実行します。
ノードにまだアクセスでき、再利用する場合は、次の操作を行います。
- ノードで Cassandra プロセスを停止します。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra stop
- ノードから Cassandra ソフトウェアをアンインストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra uninstall
- ノードからデータ ディレクトリをワイプします。
rm -rf /opt/apigee/data/apigee-cassandra
上記の手順を完了すると、障害が発生したノードと同じ IP アドレスを持つノードが作成され、Apigee ソフトウェアのインストールが可能になります。次の手順を行います。
- データセンターのシードノードを特定します。
-
復元するノードと同じデータセンター内の動作中の Cassandra ノードで、次のコマンドを実行します。
apigee-service apigee-cassandra configure -search conf_cassandra_seeds
-
次のような出力が表示されます。
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
- 出力の最後の行を参照してください。カンマ区切りの IP アドレスは、このデータセンターのノードで使用されるシードノードです。
-
復元するノードと同じデータセンター内の動作中の Cassandra ノードで、次のコマンドを実行します。
- 復元する新しいノードで、次のファイルを作成または編集します。
vi /opt/apigee/customer/application/cassandra.properties
- Add the following line:
conf_jvm_options_custom_settings=-Dcassandra.replace_address=<ip-address-of-dead-node>
- このノードがシードノードの 1 つである場合(ノードの IP アドレスがステップ 1 のシードノード リストに表示される場合)、ファイルに別の行を追加します。
conf_cassandra_seeds="<comma-separated-seed-list-except-this-node’s-ip>"
- たとえば、上記のインスタンスでは、シードリストに 2 つの IP(10.1.0.1 と 10.1.0.2)があります。復元するノードが 10.1.0.1 の場合は、次のような行を追加します。
conf_cassandra_seeds="10.1.0.2"
- たとえば、上記のインスタンスでは、シードリストに 2 つの IP(10.1.0.1 と 10.1.0.2)があります。復元するノードが 10.1.0.1 の場合は、次のような行を追加します。
- ファイルを保存し、Apigee ユーザーが所有して読み取れることを確認します。
chown apigee:apigee /opt/apigee/customer/application/cassandra.properties
- Cassandra ソフトウェアをインストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra install
- Cassandra の設定を実行します。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra setup -f <configFile>
- セットアップは、内部で Cassandra サービスのブートストラップを試みます。他のノードからストリーミングするデータの量やネットワーク スループットなどによっては、時間がかかることがあります。
- [高度なオプション] ノードで次の nodetool コマンドを実行すると、データのストリーミングを高速化できます。
nodetool setstreamthroughput <value> nodetool setcompactionthroughput <value>
- Cassandra ノードが復旧したら、次のような標準コマンドを使用して、ノードがリングに正常に参加したことを確認します。
/opt/apigee/apigee-cassandra/bin/nodetool ring /opt/apigee/apigee-cassandra/bin/nodetool status
- ノードが正常に起動して実行されていることを確認したら、
/opt/apigee/customer/application/cassandra.properties
ファイルを再度編集し、この手順のステップ 3 と 4 で追加した行を削除します。 - ノードで Cassandra サービスを再起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restart
クラスタ全体を復元する
- クラスタ全体を停止させます。
- バックアップ ファイルから、すべての Cassandra ノードを復元します。
- Cassandra クラスタを起動します。
- すべてのコンポーネントを再起動します。
PostgreSQL データベース
PosgreSQL をスタンドアロンまたはマスターとして実行する
- すべてのノードで Management Server、Qpid Server、Postgres Server を停止します。
/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
- PostgreSQL データベースを再インストールします。
/apigee/apigee-service/bin/apigee-service apigee-postgresql install
- PostgreSQL を起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
- バックアップ ファイルから PostgreSQL データベースを復元します。
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql restore 2019.03.17,14.40.41
PostgreSQL コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「.dump」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - すべてのノードで Management Server、Qpid Server、Postgres Server を起動します。
/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
PosgreSQL をスタンバイとして実行する
- PostgreSQL データベースを再インストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql install
- インストールの際と同じ構成ファイルを使用して、PostgreSQL データベースを再構成します。
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql setup -f configFile
- PostgreSQL を起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-postgresql start
Postgres Server
- すべてのマスターノードとスタンバイ ノードで Postgres Server を停止します。
/opt/apigee/apigee-service/bin/apigee-service edge-postgres-server stop
- 既存の Postgres Server ディレクトリを削除します。
/opt/apigee/data/edge-postgres-server /opt/apigee/etc/edge-postgres-server.d
- Postgres Server を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-postgres-server install
- バックアップ ファイルから Postgres Server を復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-postgre-server restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - すべてのマスターノードとスタンバイ ノードで Postgres Server を起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-postgres-server start
Qpid Server と Qpidd
- すべてのノードで Qpidd、Qpid Server、Postgres Server を停止します。
/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
- 既存の Qpid Server と 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
- Qpidd を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-qpidd install
- Qpidd を復元します。
/opt/apigee/apigee-service/bin/apigee-service apigee-qpidd restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - Qpidd を起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-qpidd start
- Qpid Server を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-qpid-server install
- Qpid Server を復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - すべてのノードで Qpid Server、Qpidd、Postgres Server を再起動します。
/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
- SymasLDAP を停止します。
/opt/apigee/apigee-service/bin/apigee-service apigee-openldap stop
- SymasLDAP を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service apigee-openldap install
- 既存の SymasLDAP ディレクトリを削除します。
/opt/apigee/data/apigee-openldap /opt/apigee/etc/apigee-openldap.d
- SymasLDAP を復元します。
/opt/apigee/apigee-service/bin/apigee-service apigee-openldap restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - SymasLDAP を再起動します。
/opt/apigee/apigee-service/bin/apigee-service apigee-openldap start
- すべての Management Server を再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restart
管理サーバー
- Management Server を停止します。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server stop
- 既存の Management Server ディレクトリを削除します。
/opt/apigee/data/edge-management-server /opt/apigee/etc/edge-management-server.d
- Management Server を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server install
- バックアップ ファイルから Management Server を復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - Management Server を再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-management-server start
Message Processor
- Message Processor を停止します。
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor stop
- 既存の Message Processor ディレクトリを削除します。
/opt/apigee/data/edge-message-processor /opt/apigee/etc/edge-message-processor.d
- Message Processor を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor install
- バックアップ ファイルから Message Processor を復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - Message Processor を再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-message-processor start
ルーター
- ルーターを停止します。
/opt/apigee/apigee-service/bin/apigee-service edge-router stop
- 既存のルーターのディレクトリを削除します。
/opt/apigee/data/edge-router /opt/apigee/etc/edge-router.d
- Router を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-router install
- バックアップ ファイルからルーターを復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-router restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - ルーターを再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-router start
Edge UI
- UI を停止します。
/opt/apigee/apigee-service/bin/apigee-service edge-ui stop
- 既存の UI のディレクトリを削除します。
/opt/apigee/data/edge-ui /opt/apigee/etc/edge-ui.d
- UI を再インストールします。
/opt/apigee/apigee-service/bin/apigee-service edge-ui install
- バックアップ ファイルから UI を復元します。
/opt/apigee/apigee-service/bin/apigee-service edge-ui restore 2019.03.17,14.40.41
コンポーネントを復元する場合、バックアップ ファイルにディレクトリ パスを指定しないでください。また、「backup-」接頭辞や「.tar.gz」接尾辞を指定しないでください。バックアップ ファイル名の日付と時刻のみを指定します。
必要に応じて、
restore
コマンドのバックアップ ファイルを省略できます。その場合、コンポーネントのバックアップ ディレクトリ内の最新のバックアップ ファイルが使用されます。 - UI を再起動します。
/opt/apigee/apigee-service/bin/apigee-service edge-ui start
Site Recovery を完了する
- すべてのコンポーネント ノードを停止します。サブシステムを停止する順序は重要なので注意してください。先にすべての Edge ノードを停止し、その後すべてのデータストア ノードを停止します。
- 上記のように、すべてのコンポーネントを復元します。
- 次に、すべてのコンポーネントを次の順序で起動します。サブシステムの起動順序は重要です。
- ZooKeeper クラスタを起動する
- Cassandra クラスタを起動する
- SymasLDAP が稼働していることを確認する
- qpid を起動します。
- PostgreSQL データベースが起動していることを確認します。
- Management Server を起動する
- ルーターと Message Processor を起動する
- Qpid Server を起動します。
- Postgres Server を起動する
- Apigee UI を起動する