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 ドキュメントへのフィードバック (英語のみ)

このドキュメントを改善するための提案がある場合、またはエラーを見つけた場合は、テクニカルサポート (https://access.redhat.com) に連絡し、docs-product コンポーネントを使用して Ansible Automation Platform Jira プロジェクトで Issue を作成してください。

第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 のインストール

Automation Controller および Automation Hub コンポーネントと同様に、Event-Driven Ansible Controller のセットアップには、インベントリーファイル内の特定変数のデフォルト設定が含まれます。

重要

Event-Driven Ansible Controller は別のサーバーにインストールする必要があります。Automation Hub および Automation Controller と同じホストにインストールすることはできません。

注記

Red Hat Enterprise Linux 8 を実行していてメモリー制限を設定したい場合は、Event-Driven Ansible をインストールする前に cgroup v2 を有効にする必要があります。具体的な手順については、Knowledge-Centered Support (KCS) のソリューション記事 Ansible Automation Platform Event-Driven Ansible controller for Red Hat Enterprise Linux 8 requires cgroupv2 を参照してください。

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

Event-Driven Ansible Controller のインストールを準備するには、Red Hat Ansible Automation Platform 計画ガイド で以下の情報を確認してください。

Event-Driven Ansible Controller をインストールする準備ができたら、Red Hat Ansible Automation Platform インストールガイド第 3 章 章の手順を参照してください。Red Hat Ansible Automation Platform のインストール 以降の手順を参照してください。

最後に、Appendix A.5.Event-Driven Ansible Controller の変数 を参照し、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 と統合されているため、問題の修復、ユーザー管理タスク、運用ロジックなどのプロセスを組み合わせて自動化できます。

4.1. Event-Driven Ansible Controller のタスク

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

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

次のステップ

法律上の通知

Copyright © 2024 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.