「Automation Action Issue」センサーの有効化と設定
「Automation Action」のイシューセンサーは、「自動化の管理」をサポートしています。 このセンサーを使用すると、 Instana エージェントに「 GitHub イシュー」、「 GitLab イシュー」、および「Jiraタスク」アクションを実行させるよう設定できます。
詳細については、 「自動化の管理」 を参照してください。
Instana エージェントをインストールすると、センサーが自動的に展開され、インストールされます。 このセンサーは、Ticket Automationコネクタを使用して、 GitHub, ( GitLab, )およびJiraに接続します。
前提条件
センサーを使用可能にする前に、以下の前提条件が満たされていることを確認してください。
- 「自動化フレームワークの安全な使用方法」 に記載されている情報を確認してください。
- クラウド環境:Issue Sensorバージョン 1.0.58 以前の場合、このセンサーはIssue Automation Connectorイメージを使用するため、 Instana エージェント上で Docker や Podman などのコンテナ管理エンジンを利用できます。
- 自己ホスト型 (オンプレミス) 環境: 自動化機能フラグ が有効になっています。
センサーを有効にする
自動化アクション問題センサーは、デフォルトでは無効になっています。 センサーを有効にするには、次の例に示すように、 エージェントの設定ファイル ( instanaAgentDir /etc/instana/configuration.yaml)を更新してください
com.instana.plugin.action.issue:
enabled: true # by default is false
オートメーションコネクタの設定(Issue Sensor バージョン 1.0.58 以前で必要)
センサーは、GitHub, GitLab, および Jira に接続するためのオートメーション コネクタ イメージを使用して、必要な操作を実行します。 センサーがアクティブ化されると、自動化コネクター・イメージが icr.io/instana/actions レジストリーからプルされます。
エージェントマシンがイメージレジストリ icr.io にアクセスできない場合は、センサーの設定で を offline=true 設定し、 オートメーションコネクタのイメージをエージェントシステムのローカルレジストリにロードしてください。
自動化コネクターを構成するには、以下の例に示すようにエージェント構成ファイルを更新します。
com.instana.plugin.action.issue:
enabled: true
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
offline: false|true # optional, default is false
GitHub の構成
GitHub Issue アクションを実行するようにセンサーを構成するには、以下の例に示すようにエージェント構成ファイルを更新します。 例に示すように accessToken 、 Vault を使用してアクセストークンを保護してください:
com.instana.plugin.action.issue:
enabled: true
github:
baseUrl: <github_url> # i.e. https://api.github.com
accessToken:
configuration_from:
type: vault
secret_key:
path: <secret_path>
key: <secret_key>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
プレーンテキストのトークンは安全ではないので使用しないでください。 以下の例は、コンフィギュレーションにおけるプレーン・テキスト・トークンの使用例を示すものであり、あくまで参考用である。
com.instana.plugin.action.issue:
enabled: true
github:
baseUrl: <github_url> # i.e. https://api.github.com
accessToken: <github_access_token>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
GitLab の構成
GitLab Issueアクションを実行するようにセンサーを設定するには、次の例のようにエージェント設定ファイルを更新します。 以下の例に示すように accessToken 、 Vault を使用できます。 accessTokenにはvaultを使うのが安全で好ましい。
com.instana.plugin.action.issue:
enabled: true
gitlab:
baseUrl: <gitlab_url>
accessToken:
configuration_from:
type: vault
secret_key:
path: <secret_path>
key: <secret_key>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
プレーンテキストのトークンは安全ではないので使用しないでください。 以下の例は、コンフィギュレーションにおけるプレーン・テキスト・トークンの使用例を示すものであり、あくまで参考用である。
com.instana.plugin.action.issue:
enabled: true
gitlab:
baseUrl: <gitlab_url>
accessToken: <gitlab_access_token>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
JIRA の構成
Jiraタスクアクションを実行するようにセンサーを設定するには、次の例に示すようにエージェントの設定ファイルを更新してください。次の例に示すように apiToken 、 Vault を使用できます。 apiTokenにはvaultを使うのが安全で好ましい。
com.instana.plugin.action.issue:
enabled: true
jira:
baseUrl: <jira_url>
username: <username>
apiToken:
configuration_from:
type: vault
secret_key:
path: <secret_path>
key: <secret_key>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
プレーンテキストのトークンは安全ではないので使用しないでください。 以下の例は、コンフィギュレーションにおけるプレーン・テキスト・トークンの使用例を示すものであり、あくまで参考用である。
com.instana.plugin.action.issue:
enabled: true
jira:
baseUrl: <jira_url>
username: <username>
apiToken: <jira_api_token>
connector: # connector and its child attributes are required for issue sensor version 1.0.58 or older
container_mgmt_engine: docker|podman # the container management engine
host_port: 9080 # the port on the host to bind the connector container to
ready_timeout: 60 # optional, default timeout is 300 seconds
ローカルレジストリに自動化コネクタの画像を読み込み中( 1.0.58 以降のIssue Sensorで必要)
エージェント・マシンが icr.io イメージ・レジストリーにアクセスできない場合は、エージェント・システム上のローカル・イメージ・レジストリーにイメージをロードします。
エージェント・システム上のローカル・イメージ・レジストリーにイメージをロードするには、以下の手順を実行します。
インターネットにアクセスできるマシンで、最新の Ansible 自動化コネクター・イメージをダウンロードします。
docker pull icr.io/instana/actions/ticket:latestイメージをアーカイブ・ファイルに保存します。
docker save <image_id> > /tmp/ticket.tarアーカイブをエージェント・マシンにコピーしてから、イメージをローカル・イメージ・レジストリーにロードします。
docker load < /tmp/ticket.tar以下のように、イメージにタグを付けます。
docker tag <image_id> icr.io/instana/actions/ticket:latest
シークレットマネージャーの統合
アクションカタログ内の「 GitHub イシュー」、「 GitLab イシュー」、および「Jiraタスク」アクションで Vault パラメータを使用する場合、ホストエージェントをシークレットマネージャー と連携させる必要があります。