Watson Discovery クラスターでのカスタム・クローラー・プラグインの管理

scripts/manage_crawler_plugin.sh スクリプトを使用して、一般的なプラグイン管理操作を実行することができます。 scripts/manage_crawler_plugin.sh スクリプトは、クローラー・プラグインの SDK パッケージの中にあります。 コマンドでこのスクリプトを使用する場合は、Discovery クラスターのエンドポイント URL と、IBM Cloud Pak® for Data インスタンスのユーザー名とパスワードが必要です。

IBM Cloud Pak for Data IBM Software Hub

この情報は、インストールされたデプロイメントにのみ適用されます。

クローラー・プラグインを管理するためのコマンドとオプション

scripts/manage_crawler_plugin.sh --help と入力すると、スクリプトの中にある以下のヘルプ・メッセージを表示できます。

Usage: scripts/manage_crawler_plugin.sh --endpoint endpoint --user username [--password password] command

Watson Discovery Crawler Plug-in Manager

This script will help you deploy, undeploy, and list your crawler plug-ins for Watson Discovery.

Commands:
deploy        Add a new crawler plug-in to your Watson Discovery instance
undeploy      Undeploy your crawler plug-in by ID
list          List all crawler plug-ins for your Watson Discovery instance (default)

Options:
-e --endpoint         The endpoint URL for your cluster and add-on service instance
                      (https://{cpd_cluster_host}{: port}/discovery/{release}/instances/{instance_id}/api)
-u --user             The user name of your Cloud Pak instance
-p --password         The user password of your Cloud Pak instance
                      If the password is not specified, the command line prompts to input
-n --name             The name of the crawler plug-in to upload (deploy only)
-f --file             The path of the crawler plug-in package to upload (deploy only)
--id                  The crawler_resource_id value to delete the crawler plug-in (undeploy only)
--help                Show this message

以下のコマンドを使用して、クローラー・プラグインのデプロイ、アンデプロイ、およびリスト表示を行うことができます。 変数参照 {variable} を必要な情報に置き換える:

  • クローラー・プラグインのデプロイ: scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} deploy --name {plugin_name}
  • クローラー・プラグインのアンデプロイ: scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} undeploy --id {crawler_resource_id}
  • デプロイされたクローラー・プラグインのリスト: scripts/manage_crawler_plugin.sh --endpoint {endpoint_URL} --user {username} list

scripts/manage_crawler_plugin.sh スクリプトを使用してクローラー・プラグインをデプロイした後、コレクション作成時に Discovery ツールでプラグインを選択することができます。 Discovery のクローラー・プラグインの設定について詳しくは、クローラー・プラグインの設定を参照してください。