3.9. FDO を使用して image mode for RHEL システムをデプロイする
FIDO Device Onboarding (FDO) を使用してセキュアな設定を提供することで、Image Mode for RHEL のデプロイメントを自動化できます。ISO ビルド内にキックスタートファイルを埋め込むことで、ユーザーアカウント、カスタムパーティショニング、SSH 鍵をはじめとするインストールプロセスのさまざまなパーツを設定できます。
bootc コンテナーベースイメージを含む ISO を使用する場合、bootc-image-builder はコンテナーイメージをインストールするコマンドである ostreecontainer を自動的にインストールします。ostreecontainer コマンド以外は、引き続きすべてを設定できます。
前提条件
- ホストマシンに Podman がインストールされている。
-
bootc-image-builderツールを実行してコンテナーを--privilegedモードで実行するための root のアクセス権がある。 - FDO サーバーインフラストラクチャーがデプロイされている。
手順
Containerfile を作成します。例:
FROM registry.redhat.io/rhel10/rhel-bootc:latest RUN dnf install -y fdo-init fdo-client RUN systemctl enable fdo-client-linuxapp.serviceキックスタートファイルを作成します。次のキックスタートファイルは、ユーザーの作成とパーティションの指示を含む、完全に自動のキックスタートファイル設定の例です。
[customizations.installer.kickstart] contents = """ text --non-interactive zerombr clearpart --all --initlabel --disklabel=gpt autopart --noswap --type=lvm user --name=test --groups=wheel --plaintext --password=test sshkey --username=test "ssh-ed25519 AAA..." network --bootproto=dhcp --device=link --activate --onboot=on poweroff %post export MANUFACTURING_SERVER_URL="http://192.168……" export DIUN_PUB_KEY_INSECURE="true" /usr/libexec/fdo/fdo-manufacturing-client %end """エクスポート <MANUFACTURING_SERVER_URL> フィールドで、Manufacturing サーバー URL を独自の Manufacturing サーバー URL に置き換えます。
-
キックスタートコンテンツを挿入するには、キックスタート設定を
.toml形式で保存します。たとえば、config.tomlです。 次のフォルダーを作成します。
$ mkdir $(pwd)/output"bootc-image-builderを実行し、ISO ビルドに追加するキックスタートファイル設定を含めます。bootc-image-builderによって、コンテナーイメージをインストールするostreecontainerコマンドが自動的に追加されます。$ sudo podman run \ --rm \ -it \ --privileged \ --pull=newer \ --security-opt label=type:unconfined_t \ -v /var/lib/containers/storage:/var/lib/containers/storage \ -v $(pwd)/config.toml:/config.toml \ -v $(pwd)/output:/output \ registry.redhat.io/rhel10/bootc-image-builder:latest \ --type iso \ --config /config.toml \ quay.io/<namespace>/<image>:<tag>生成された
.isoイメージは output フォルダーにあります。