このドキュメントでは、Apigee の最新の RPM とサポート ファイルを使用するように既存の 4.16.01 インストールを更新する手順について説明します。この手順では、update.sh ユーティリティを使用して更新を行います。
最新の 4.16.01 リリースに更新できる Edge バージョン
既存の Apigee Edge バージョン 4.16.01.x のインストールは、最新の 4.16.01 リリースのみに更新できます。
現在 Edge バージョン 4.15.07.0x 以前を実行している場合は、まず 4.16.01 に移行する必要があります。バージョン 4.15.07.0x 以前からバージョン 4.16.01 に移行する方法については、Apigee ftp サイト ftp://ftp.apigee.com/ にある Apigee Edge 4.16.01 のインストール ガイドをご覧ください。
更新を行えるユーザー
更新を行うユーザーは、最初に Edge をインストールしたユーザーまたは root ユーザーである必要があります。
Edge RPM をインストールした後は、すべてのユーザーがそれを構成できます。
更新に必要なディスク容量
更新を行う前に、1 GB 以上の空きディスク容量があることを確認してください。
4.16.01.x からのプロパティ設定の自動伝播
/opt/apigee/customer/application の .properties ファイルを編集してプロパティを設定した場合、それらの値は更新の際にも保持されます。
更新の前提条件
Apigee Edge をアップグレードする前に、次の前提条件を確認してください。
- すべてのノードをバックアップする
安全上の理由から、更新する前にすべてのノードの完全なバックアップを行うことをおすすめします。現在の Edge バージョンのバックアップ手順に沿ってください。
これにより、新しいバージョンへの更新が失敗した場合に備えてバックアップ計画を立てることができます。バックアップの詳細については、Apigee Edge 4.16.01 操作ガイドをご覧ください。Apigee FTP サイト: ftp://ftp.apigee.com/ - Edge が実行中であることを確認する
更新プロセス中に、次のコマンドを使用して Edge が実行中であることを確認します。
> /<inst_root>/apigee/apigee-service/bin/apigee-all status
失敗した更新の処理
アップデートが失敗した場合は、問題を修正してから update.sh を再度実行してください。更新を複数回実行することができ、最後に終了したところから続行されます。
失敗した結果、前のバージョンへのロールバックが必要になった場合は、Apigee FTP サイト(ftp://ftp.apigee.com/)にある Apigee Edge 4.16.01 のインストール ガイドをご覧ください。
更新情報のロギング
デフォルトでは、update.sh ユーティリティはログ情報を次のファイルに書き込みます。
/opt/apigee/var/log/apigee-setup/update.log
update.sh ユーティリティを実行しているユーザーにこのディレクトリへのアクセス権がない場合は、/tmp ディレクトリに update_username.log という名前のファイルとしてログが書き込まれます。
ユーザーが /tmp にアクセスできない場合、update.sh ユーティリティは失敗します。
ゼロ ダウンタイムでの更新
ゼロ ダウンタイム更新またはローリング アップデートを使用すると、Edge をダウンさせることなく Edge のインストールを更新できます。
ゼロ ダウンタイムでアップグレードするには、各 Router を 1 つずつロードバランサから削除する必要があります。削除した Router と、その同じマシンにあるすべてのコンポーネントを更新してから、Router をロードバランサに再び追加します。
- 以下の「マシンの更新順序」に記載された正しい順序でマシンを更新してください。
- Router を更新するときには、任意の Router を 1 つ選択し、次のセクション「Router と Message Processor を到達不能な状態にします。
- 選択した Router と、その Router と同じマシンにあるすべての Edge コンポーネントを更新します。すべての Edge 構成で、同じノードに Router と Message Processor が表示されます。
- Router を到達可能な状態に戻します。
- 残りのルーターについても、手順 2 ~ 4 を繰り返します。
- インストール中の残りのすべてのマシンで更新を続行します。
Router と Message Processor を到達不能にする
本番環境では、最適なパフォーマンスを得るために、複数の Router と Message Processor を用意し、更新前と更新後に Router と Message Processor のネットワーク到達性を有効または無効にする必要があります。
以下の API 呼び出しでは、ノードを到達可能またはアクセス不能として構成します。
> curl -u adminEmail:pWord -X POST "http://<ms_IP>:8080/v1/servers/UUID" -d "reachable=true|false"
ここで、UUID は Message Processor または Router の UUID で、reachable が true または false に設定されている。
Router の UUID を確認する必要がある場合は、次の cURL コマンドを使用します。
> curl http://<routerIP>:8081/v1/servers/self
Message Processor の UUID を確認する必要がある場合は、次の cURL コマンドを使用します。
> curl http://<mpIP>:8082/v1/servers/self
更新の前後で次の点に注意してください。
- Router と Message Processor の共存ノード:
- 更新する前に、以下を行います。
- 上記の API 呼び出しを使用して Router を到達不能な状態にします。
- Message Processor を到達不能な状態にします。
- 更新したら、次の操作を行います。
- Message Processor を到達可能な状態にします。
- Router を到達可能な状態にします。
- 更新する前に、以下を行います。
- Router 単独のノード:
- 更新前に、Router を到達可能な状態にします。
- 更新後に Router を到達可能な状態にします。
- Message Processor 単独のノード:
- 更新前に、Message Processor を到達不能な状態にします。
- 更新後に、Message Processor を到達可能な状態にします。
サイレント構成ファイルの使用
サイレント構成ファイルを更新コマンドに渡す必要があります。サイレント構成ファイルは、Edge 4.16.01 のインストールに使用したものと同じである必要があります。
外部インターネット接続があるノードで 4.16.01 を更新する手順
ノードで Edge コンポーネントを更新する手順は次のとおりです。
- 更新が完了するまで、Cassandra で修復オペレーションを行うように構成された CRON ジョブがあれば無効にします。
- root としてノードにログインし、Edge RPM をインストールします。
注: RPM のインストールには root 権限が必要ですが、Edge の構成には root 権限は不要です。 - Apigee Edge 4.16.01 のインストール ガイドの説明に従って、SELinux を無効にします。Apigee FTP サイト: ftp://ftp.apigee.com/ で入手できます。
- すべての Yum キャッシュをクリーンアップします。
> sudo yum clean all - 最新の Edge bootstrap.sh ファイルを /tmp/bootstrap.sh にダウンロードします。
> curl https://software.apigee.com/bootstrap.sh -o /tmp/bootstrap.sh - Edge apigee-service ユーティリティと依存関係を更新します。
> sudo bash /tmp/bootstrap.sh apigeeuser=uName apigeepassword=pWord
ここで、uName:pWord は Apigee から受け取ったユーザー名とパスワードです。pWord を省略すると、パスワードの入力を求められます。 - apigee-service を使用して apigee-setup ユーティリティを更新します。
> /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
この apigee-service へのアップデートにより、update.sh ユーティリティが <inst_dir>/apigee/apigee-setup/bin にインストールされます。 - 以下の「マシンの更新順序」に記載された順序でノードにアップデート ユーティリティを実行します。
> /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile
構成ファイルに関する唯一の要件として、構成ファイルが apigee ユーザーからアクセス可能または読み取り可能である必要があります。たとえば、ファイルをノードの /tmp ディレクトリに配置します。
「-c」オプションを使用して、更新するコンポーネントを指定します。該当するコンポーネントは次のとおりです。- ldap = OpenLDAP
- cs = Cassandr
- zk = Zookeeper
- qpid = qpidd
- ps = postgresql
- edge =Edge UI を除くすべての Edge コンポーネント: Management Server、Message Processor、Router、QPID サーバー、Postgres Server
- ui = Edge UI
- all = マシン上のすべてのコンポーネントを更新します(Edge aio インストール プロファイルまたは API BaaS asa インストール プロファイルでのみ使用)。
- e = ElasticSearch
- b = API BaaS スタック
- p = API BaaS ポータル
- ebp = ElasticSearch、API BaaS Stack、API BaaS ポータル(同じノード上)
- Apigee Edge 4.16.01 のインストール ガイド(Apigee FTP サイト: ftp://ftp.apigee.com/)の説明に従って、Message Processor で apigee-validate ユーティリティを実行して更新をテストします。
ローカル リポジトリから 4.16.01 を更新する手順
Edge ノードがファイアウォールの内側にあるか、インターネット経由での Apigee リポジトリ アクセスが禁止されている場合は、Apigee リポジトリのローカル リポジトリ(つまりミラー)から更新を行うことができます。
ローカル Edge リポジトリを作成した後、ローカル リポジトリから Edge を更新するには、次の 2 つの方法があります。
- リポジトリの .tar ファイルを作成してノードにコピーし、その .tar ファイルから Edge を更新します。
- ローカル リポジトリを持つノードにウェブサーバーをインストールし、他のノードからアクセスできるようにします。Apigee から提供されているウェブサーバーは Nginx ですが、他のウェブサーバーを使用してもかまいません。
ローカルの 4.16.01 リポジトリから更新するには:
- Apigee Edge 4.16.01 のインストール ガイド(Apigee FTP サイト: ftp://ftp.apigee.com/)の説明に従って、4.16.01 リポジトリを用意します。
- ローカル リポジトリを更新します。
- 最新の Edge bootstrap.sh ファイルを /tmp/bootstrap.sh にダウンロードします。
> curl https://software.apigee.com/bootstrap.sh -o /tmp/bootstrap.sh - 同期を実行します。
> /opt/apigee/apigee-service/bin/apigee-service apigee-mirror sync --only-new-rpms
- 最新の Edge bootstrap.sh ファイルを /tmp/bootstrap.sh にダウンロードします。
-
.tar ファイルから apigee-service をインストールするには:
- ローカル リポジトリが存在するノードで次のコマンドを使用し、ローカル リポジトリを /opt/apigee/data/apigee-mirror/apigee-4 .16.01.tar.gz という名前の単一の.tar ファイルにパッケージ化します。
> /opt/apigee/apigee-service/bin/apigee-service apigee-mirror package - Edge を更新する対象のノードに .tar ファイルをコピーします。たとえば、新しいノードの /tmp ディレクトリにコピーします。
- 新しいノードで、tar ファイルを解凍し、/tmp ディレクトリに展開します。
> tar -xzf apigee-4.16.01.tar.gz
このコマンドは、.tar ファイルを含むディレクトリに repos という名前の新しいディレクトリを作成します。たとえば、/tmp/repos のようになります。 - root としてノードにログインし、Edge RPM をインストールします。
注: RPM のインストールには root 権限が必要ですが、Edge の構成には root 権限は不要です。 - Apigee Edge 4.16.01 のインストール ガイドの説明に従って、SELinux を無効にします。Apigee FTP サイト: ftp://ftp.apigee.com/ で入手できます。
- /tmp/repos から Edge apigee-service ユーティリティと依存関係をインストールします。
> sudo bash /tmp/repos/bootstrap.sh apigeeprotocol="file://" apigeerepobasepath=/tmp/repos
このコマンドに repos ディレクトリへのパスが含まれていることに注意してください。
- ローカル リポジトリが存在するノードで次のコマンドを使用し、ローカル リポジトリを /opt/apigee/data/apigee-mirror/apigee-4 .16.01.tar.gz という名前の単一の.tar ファイルにパッケージ化します。
-
Nginx ウェブサーバーを使用して apigee-service をインストールするには:
- Apigee FTP サイト(ftp://ftp.apigee.com/)で、Edge 4.16.01 のインストール ガイドの「Nginx ウェブサーバーを使用してリポジトリからインストールする」の手順に沿って、Nginx ウェブサーバーを構成します。
- リモートノードで、Edge bootstrap.sh ファイルを /tmp/bootstrap.sh にダウンロードします。
> /usr/bin/curl http://uName:pWord@remoteRepo:3939/bootstrap.sh -o /tmp/bootstrap.sh
where uName:pWord are the username and password you set above for the repo, and remoteRepo is the IP address or DNS name of the repo node.
- Log in to your node as root to install the Edge RPMs
Note: While RPM installation requires root access, you can perform Edge configuration without root access. - Disable SELinux as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
- On the remote node, install the Edge apigee-service utility and
dependencies:
> sudo bash /tmp/bootstrap.sh apigeerepohost=remoteRepo:3939 apigeeuser=uName apigeepassword=pWord apigeeprotocol=http://
where uName:pWord are the repo username and password.
- If present, disable any CRON jobs configured to perform a repair operation on Cassandra until after the update completes.
- Use apigee-service to update the apigee-setup utility:
> /opt/apigee/apigee-service/bin/apigee-service apigee-setup update
This update to apigee-service installs the update.sh utility in <inst_dir>/apigee/apigee-setup/bin. - Run the update utility on your nodes in the order described below in "Order of machine
update" below:
> /opt/apigee/apigee-setup/bin/update.sh -c component -f configFile
The only requirement on the config file is that the configuration file must be accessible or readable by the "apigee" user. For example, put the file in the /tmp directory on the node.
Use the “-c” option to specify the component to update. The list of possible components includes:- ldap = OpenLDAP
- cs = Cassandr
- zk = Zookeeper
- qpid = qpidd
- ps = postgresql
- edge =All Edge components except Edge UI: Management Server, Message Processor, Router, QPID Server, Postgres Server
- ui = Edge UI
- all = update all components on machine (only use for an Edge aio installation profile or an API BaaS asa installation profile)
- e = ElasticSearch
- b = API BaaS Stack
- p = API BaaS Portal
- ebp = ElasticSearch, API BaaS Stack, and API BaaS Portal on the same node
- Test the update by running the apigee-validate utility on the Message Processor, as described in the Apigee Edge 4.16.01 Installation Guide, available on the Apigee FTP site: ftp://ftp.apigee.com/
Order of machine update
The order that you update the machines in an Edge installation is important. The most important considerations to an update are:
- You must update all Cassandra and ZooKeeper nodes before you update any other nodes.
- You must update all qpidd and postgresql nodes before you update any Router and Message Processor nodes.
- For any machine with multiple Edge components (Management Server, Message Processor, Router, QPID Server, Postgres Server), use the "-c edge" option to update them all at the same time.
- If a step specifies that it should be performed on multiple machines, perform it in the specified machine order.
- There is no separate step to update Monetization. It is updated when you specify the "-c edge" option.
- After you update a Router node, you must remove all files from the /opt/nginx/conf.d directory, and then restart the Router.
For a 1-host standalone installation
- Update machine 1:
> /opt/apigee/apigee-setup/bin/update.sh -c all -f configFile
- /opt/nginx/conf.d にあるファイルをすべて削除します。
> rm -f /opt/nginx/conf.d/* - Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
2 ホスト スタンドアロン インストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- マシン 1 の Cassandra と ZooKeeper を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- マシン 2 の qpidd と postgresql を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c qpid,ps -f configFile
- マシン 1 の LDAP を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- マシン 2 とマシン 1 の Edge コンポーネントを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- ノード 1 で次の操作を行います。
/opt/nginx/conf.d
内のすべてのファイルを削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- マシン 1 の UI を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
5 ホストクラスタ インストールの場合
Edge のトポロジとノード番号の一覧については、Apigee FTP サイト(ftp://ftp.apigee.com/)で入手できる Apigee Edge 4.16.01 のインストール ガイドをご覧ください。
- マシン 1、2、3 の Cassandra と ZooKeeper を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- マシン 4 と 5 の qpidd と postgresql を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c qpid,ps -f configFile
- マシン 1 の LDAP を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- マシン 4、5、1、2、3 の Edge コンポーネントを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- ノード 2 と 3:
/opt/nginx/conf.d
内のすべてのファイルを削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- マシン 1 の UI を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
9 ホストクラスタ インストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- マシン 1、2、3 の Cassandra と ZooKeeper を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- マシン 6 と 7 の qpidd を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
- マシン 8 と 9 の postgresql を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
- マシン 1 の LDAP を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- マシン 6、7、8、9、1、4、5 の順序で Edge コンポーネントを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- ノード 4 と 5 で次の操作を行います。
/opt/nginx/conf.d
内のすべてのファイルを削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- マシン 1 の UI を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
13 ホストクラスタ インストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- マシン 1、2、3 の Cassandra と ZooKeeper を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- マシン 12 と 13 の qpidd を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
- マシン 8 と 9 の postgresql を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
- マシン 4、5 の LDAP を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- マシン 12、13、8、9、6、7、10、11 の順序で Edge コンポーネントを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- ノード 10 と 11 で次のコマンドを実行します。
/opt/nginx/conf.d
内のすべてのファイルを削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- マシン 6 と 7 の UI を更新:
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
12 ホストクラスタ インストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- Cassandra と ZooKeeper を更新します。
- データセンター 1 のマシン 1、2、3 で次のコマンドを実行します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- データセンター 2 のマシン 7、8、9 では次のようになります。
> /opt/apigee/apigee-setup/bin/update.sh -c cs,zk -f configFile
- データセンター 1 のマシン 1、2、3 で次のコマンドを実行します。
- qpidd を更新します。
- データセンター 1 のマシン 4、5
> /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
- データセンター 2 のマシン 10、11
> /opt/apigee/apigee-setup/bin/update.sh -c qpid -f configFile
- データセンター 1 のマシン 4、5
- postgresql を更新します。
- データセンター 1 のマシン 6
> /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
- データセンター 2 のマシン 12
> /opt/apigee/apigee-setup/bin/update.sh -c ps -f configFile
- データセンター 1 のマシン 6
- LDAP を更新します。
- データセンター 1 のマシン 1
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- データセンター 2 のマシン 7 です。
> /opt/apigee/apigee-setup/bin/update.sh -c ldap -f configFile
- データセンター 1 のマシン 1
- Edge コンポーネントを更新します。
- データセンター 1 のマシン 4、5、6、1、2、3
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- データセンター 2 のマシン 10、11、12、7、8、9
> /opt/apigee/apigee-setup/bin/update.sh -c edge -f configFile
- ノード 2、3、8、9 で次のコマンドを実行します。
/opt/nginx/conf.d
のファイルをすべて削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- データセンター 1 のマシン 4、5、6、1、2、3
- UI を更新します。
- データセンター 1 のマシン 1 です。
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
- データセンター 2 のマシン 7 です。
> /opt/apigee/apigee-setup/bin/update.sh -c ui -f configFile
- データセンター 1 のマシン 1 です。
7 ホストの API BaaS のインストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- マシン 5、6、7 の Cassandra を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
- マシン 1、2、3 の ElasticSearch と API BaaS Stack を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c e,b -f configFile
- マシン 4 の API BaaS ポータルを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile
10 ホストの API BaaS インストールの場合
Apigee FTP サイトで入手可能な Apigee Edge 4.16.01 インストール ガイドをご覧ください。ftp://ftp.apigee.com/Edge のトポロジとノード番号の一覧については、
- マシン 8、9、10 の Cassandra を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c cs -f configFile
- マシン 1、2、3 の ElasticSearch を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c e -f configFile
- マシン 4、5、6 の API BaaS Stack を更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c b -f configFile
- マシン 7 の API BaaS ポータルを更新します。
> /opt/apigee/apigee-setup/bin/update.sh -c p -f configFile
標準以外のインストールの場合
標準以外のインストールの場合は、次の順序で Edge コンポーネントを更新します。
- ZooKeeper
- Cassandra
- Qpidd
- postgresql
- LDAP
- Edge。つまり、Qpid、Postgres、Management Server、Message Processor、Router の順で、すべてのノードの「-c edge」プロファイルを意味します。
- すべての Router ノードで次のコマンドを実行します。
/opt/nginx/conf.d
内のファイルを削除します。> rm -f /opt/nginx/conf.d/*
- Edge Router を再起動します。
> /<inst_root>/apigee/apigee-service/bin/apigee-service edge-router restart
- UI