Event-Driven Ansible スタートガイド

Red Hat Ansible Automation Platform 2.4

Event-Driven Ansible の利点と使用を開始する方法の紹介

Red Hat Customer Content Services

概要

Event-Driven Ansible は、一貫性と復元力を実現しながら IT の速度と俊敏性を向上させることで、自動化を強化および拡張する新しい方法です。この機能は、シンプルさと柔軟性を考慮して設計されています。

はじめに

Event-Driven Ansible にご興味をお持ちいただきありがとうございます。Event-Driven Ansible は、自動化を強化および拡張する新しい方法です。チームの意思決定の自動化と、IT の速度と俊敏性の向上を支援します。

このガイドでは、Event-Driven Ansible の概念的な枠組みを説明し、Event-Driven Ansible Controller のインストールと使用に関する情報へのリンクを提供します。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。まずは、マスター (master)、スレーブ (slave)、ブラックリスト (blacklist)、ホワイトリスト (whitelist) の 4 つの用語の置き換えから始めます。この取り組みは膨大な作業を要するため、今後の複数のリリースで段階的に用語の置き換えを実施して参ります。詳細は、Red Hat CTO である Chris Wright のメッセージ をご覧ください。

Red Hat ドキュメントへのフィードバック (英語のみ)

技術的な内容に関するフィードバックをお寄せいただきありがとうございます。皆様のご意見をお待ちしています。コメントの追加、Insights の提供、誤字の修正、および質問を行う必要がある場合は、ドキュメントで直接行うこともできます。

注記

Red Hat アカウントがあり、カスタマーポータルにログインしている必要があります。

カスタマーポータルからドキュメントのフィードバックを送信するには、以下の手順を実施します。

  1. Multi-page HTML 形式を選択します。
  2. ドキュメントの右上にある Feedback ボタンをクリックします。
  3. フィードバックを提供するテキストのセクションを強調表示します。
  4. 強調表示されたテキストの横にある Add Feedback ダイアログをクリックします。
  5. ページの右側のテキストボックスにフィードバックを入力し、Submit をクリックします。

フィードバックを送信すると、自動的に問題の追跡が作成されます。Submit をクリックすると表示されるリンクを開き、問題の監視を開始するか、さらにコメントを追加します。

第1章 Event-Driven Ansible による自動化

Event-Driven Ansible は、イベントのソースに接続し、ルールブックを使用してそれらのイベントを操作する新しい方法です。このテクノロジーにより、IT の速度と俊敏性が向上し、一貫性と耐障害性が実現します。

1.1. Event-Driven Ansible の利点

Event-Driven Ansible は、シンプルさと柔軟性を考慮して設計されています。この機能強化により、次のことを実現できます。

  • 意思決定を自動化する
  • 数多くのイベントソースを使用する
  • 複数の IT ユースケース内で、そして複数の IT ユースケースをまたいでイベント駆動型自動化を実装する
  • 効率、卓越したサービス提供、コスト削減の面で新たなマイルストーンを達成する

Event-Driven Ansible は人為的ミスを最小限に抑え、プロセスを自動化してトラブルシューティングと情報収集の効率を高めます。

このガイドでは、Event-Driven Ansible Controller の理解、インストール、使用に関する情報へのリンクを提供し、Event-Driven Ansible の使用開始を支援します。

第2章 Ansible ルールブック

Event-Driven Ansible Controller は、Event-Driven Ansible による自動化を実行するインターフェイスを提供します。Ansible ルールブックは、Event-Driven Ansible による自動化のフレームワークを提供します。Ansible ルールブックは、基本的にルールセットのコレクションです。ルールセットは 1 つ以上のソース、ルール、条件で構成されます。

2.1. 意思決定環境

Event-Driven Ansible には、デフォルトで ansible.eda コレクションが含まれています。このコレクションには、サンプルソース、イベントフィルター、ルールブックが含まれています。すべてのコレクション、Ansible ルールブック、およびそれらの依存関係は、意思決定環境を使用します。意思決定環境は、Podman または Kubernetes で実行できるイメージです。

意思決定環境では、ソース (通常、Python コード) は ansible-collections を通じて配布されます。外部イベントは、ルールブックに挿入されて処理されます。ルールブックは次の内容で構成されます。

  • Python インタープリター
  • Drools ルールエンジン用の Java ランタイム環境
  • ansible-rulebook Python パッケージ
  • ansible.eda コレクション

ベースとなる意思決定環境を使用し、追加のコレクションとコレクションの依存関係を使用することで、独自にカスタマイズした意思決定環境を構築できます。Dockerfile を使用して意思決定環境を構築することもできます。また、必要に応じて CA 証明書をイメージにデプロイできます。

2.2. ルールブックのアクション

ルールブックは、ルールがトリガーされたときに実行されるアクションを指定するものです。イベントがルールの条件に一致すると、ルールがトリガーされます。現在、次のアクションがサポートされています。

  • run_job_template
  • run_playbook (ansible-rulebook CLI でのみサポート)
  • debug
  • print_event
  • set_fact
  • post_event
  • retract_fact
  • shutdown

関連情報

第3章 Event-Driven Ansible Controller のインストール

Event-Driven Ansible Controller のインストールは、他の Ansible Automation Platform コンポーネントのインストールと同時に行われます。Automation Controller や Automation Hub と同様、セットアップにはインベントリーファイル内の特定の変数のデフォルト設定が含まれています。

3.1. Red Hat Ansible Automation Platform への Event-Driven Ansible Controller のインストール

Event-Driven Ansible Controller のインストールを準備するには、Red Hat Ansible Automation Platform 計画ガイドコンポーネントリスト、システム要件、その他の役に立つ情報を含む計画手順を確認してください。

Ansible Automation Platform を使用して Event-Driven Ansible Controller をデプロイする手順の詳細は、Red Hat Ansible Automation Platform インストールガイド の手順、特に Red Hat Ansible Automation Platform のインストール の例に従ってください。

Event-Driven Ansible をさらに簡単に使用開始できるように、Event-Driven Ansible Controller の正常なインストールに必要なコード例と変数で更新された、次の既存のセクションを確認してください。

最後に、「Red Hat Ansible Automation Platform インストールガイド」に追加された次の Event-Driven Ansible Controller 固有のコード例と付録のセクションを参照してください。

3.2. OpenShift Container Platform の Ansible Automation Platform Operator を使用した Event-Driven Ansible Controller のデプロイ

Event-Driven Ansible は、VM 上の Ansible Automation Platform に限られたものではありません。この機能には、OpenShift Container Platform 上の Ansible Automation Platform Operator でアクセスすることもできます。Ansible Automation Platform Operator を使用して Event-Driven Ansible をデプロイするには、OpenShift Container Platform の Ansible Automation Platform Operator を使用した Event-Driven Ansible Controller のデプロイ の手順に従ってください。

正常にデプロイすると、イベントソースに接続し、問題をより効率的に解決できるようになります。

関連情報

第4章 Event-Driven Ansible Controller の使用

Event-Driven Ansible Controller を正常にインストールしたら、インターフェイスにアクセスして、すべてのイベントソースに対する IT の対応を管理できるようになります。Event-Driven Ansible Controller は Automation Controller と統合されているため、問題の修復、ユーザー管理タスク、運用ロジックなどのプロセスを組み合わせて自動化できます。

Event-Driven Ansible Controller は、ユーザーのロールに応じて、次のタスクに使用できます。

  • 新しいプロジェクトの設定
  • 新しい意思決定環境の設定
  • 新しい認証トークンの作成
  • ルールブックアクティベーションの設定

関連情報 (または次の手順)

法律上の通知

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.