> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/hybrid-runbook-worker.md).

# ハイブリッド Runbook Worker

RealmJoin Runbook を Hybrid Runbook Worker 上で実行し、Azure クラウドでは到達できないオンプレミスおよびプライベート ネットワークのリソースにアクセスできるようにします。

既定では、RealmJoin の runbook は Microsoft の **Azure Automation クラウド**。これはクラウド サービス（Entra ID、Intune、Exchange Online、…）に対するタスクには最適ですが、クラウドからはお使いの **オンプレミス** またはその他のプライベート ネットワークにアクセスできません。

成功した解決済みキーのみを含む **Hybrid Runbook Worker** これがこの問題を解決します。これは、自分の環境内（たとえばオンプレミス、またはプライベート クラウド ネットワーク内）で実行し、Azure Automation Account に登録するマシンです。そのワーカーを対象とした runbook は **そのマシン上で、ネットワーク内で**、他の runbook と同様に RealmJoin 経由で開始、追跡、監査されます。

## 使う理由

runbook が Azure クラウドでは到達できないものにアクセスする必要がある場合は、Hybrid Runbook Worker を使用します：

* オンプレミス **Active Directory**、ファイル サーバー、またはプリント サーバー
* 自社データセンターでホストされている業務アプリケーションとデータベース
* インターネットに公開されていないネットワーク機器、アプライアンス、または内部 API
* セキュリティまたは接続性の理由から、社内ネットワーク内からアクセスする必要があるあらゆるリソース

実際の処理はリソースのある場所で実行される一方で、RealmJoin の runbook 体験（セルフサービス、権限、承認、ログ記録）の利便性はそのまま利用できます。

## 仕組み

* **実行場所。** 通常の runbook は Azure クラウドのサンドボックスで実行されます。ハイブリッド runbook は代わりに Hybrid Runbook Worker に渡されるため、自分のマシン上で実行され、社内リソースと通信できます。
* **どの runbook がハイブリッドか。** RealmJoin は runbook を名前で「ハイブリッド」と認識します。名前が次で終わる runbook： **`_hybrid`** は、Hybrid Worker Group に振り分けられます。その他の runbook はこれまでどおりクラウドで実行されます。
* **より正確な実行場所。** ハイブリッド runbook が開始されると、RealmJoin はそれを **Hybrid Worker Group** に送ります。ワーカー グループには 1 台以上のマシンを含めることができ、Azure Automation がそのグループ内の利用可能なワーカーを選んで処理を行います。

{% hint style="info" %}
この機能を有効にしても **は** 既存の runbook がクラウドから移動されるわけではありません。次の名前が付いた runbook だけが `_hybrid` 接尾辞を持つものだけが Hybrid Runbook Worker に送られます。
{% endhint %}

## 前提条件

RealmJoin でこの機能を有効にする前に、Azure Automation Account に動作する Hybrid Runbook Worker が必要です：

1. 1 台以上のマシンを次のものとしてデプロイし、登録します： **Hybrid Runbook Worker Group** を Azure Automation Account に配置します。Microsoft のガイドで [Hybrid Runbook Workers](https://learn.microsoft.com/en-us/azure/automation/automation-hybrid-runbook-worker) セットアップ手順をご確認ください。
2. それらのマシンが、runbook に必要なオンプレミスまたはプライベート リソースへネットワーク経由でアクセスできることを確認してください。

{% hint style="warning" %}
Automation Account に Hybrid Runbook Worker Group が存在しない場合、RealmJoin は選択肢として提示できず、まずワーカーの登録を求めます。
{% endhint %}

## RealmJoin で有効にする

{% stepper %}
{% step %}

### runbook の設定を開く

RealmJoin Portal で runbook の設定に移動します。最初の runbook 構成が保存されると、Hybrid Runbook Worker のオプションが利用可能になります。
{% endstep %}

{% step %}

### Hybrid Runbook Worker の同期をオンにする

有効化 **Hybrid Runbook Worker の同期を有効にする**。RealmJoin は Azure Automation Account に登録されている Hybrid Worker Group を読み取ります。
{% endstep %}

{% step %}

### Hybrid Worker Group を選択する

選択してください **Hybrid Worker Group** を、ハイブリッド runbook の実行先として選び、保存します。これがすべての `_hybrid` Tenant 内の runbook の既定の対象になります。
{% endstep %}
{% endstepper %}

## ハイブリッド runbook の実行

ハイブリッド runbook の実行は他の runbook とまったく同じで、サポート担当者や管理担当者が特別な操作をする必要はありません。

* runbook が Hybrid Runbook Worker に送られると、実行ダイアログには次のようなメモが表示されます： *「Hybrid Runbook Worker Group: … で実行されます」* そのため、タスクの実行場所が明確です。
* runbook に複数のワーカー グループから選べるよう設定されている場合、オペレーターは **どの Hybrid Runbook Worker Group を選ぶか** を、開始時に使用できます。
* 必要とする runbook は [承認](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-permissions.md) 選択したワーカー グループが保持されるため、承認後は意図したワーカーでタスクが実行されます。

{% hint style="info" %}
runbook のログとジョブの詳細は、いつもどおり RealmJoin Portal で確認できます — 詳細は [Runbook Logs](https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/runbook-logs.md) — runbook がクラウドで実行されたか、Hybrid Runbook Worker で実行されたかにかかわらず。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/ja/zi-dong-hua/runbooks/hybrid-runbook-worker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
