3.16. デバイスプロビジョニング用の FDO ServiceInfo Modules (FSIM) の設定
FIDO Device Onboard (FDO) ServiceInfo Modules (FSIM) を使用すると、オンボーディングプロセス中に、ファイルのダウンロード、コマンドの実行、大容量ペイロードの取得など、デバイス上でのタスクを自動化できます。FSIM を使用するには、Owner サーバーの設定ファイルに fsim セクションを追加する必要があります。
前提条件
- Owner サーバーへの管理者アクセス権がある。
-
FDO Owner サーバーがインストールされており、
/etc/go-fdo-server/owner.yamlの基本設定が完了している。 -
fdo.downloadモジュールを介してダウンロードするために用意したローカルスクリプトまたはファイルが、go-fdo-serverユーザーがアクセスできるディレクトリー (/var/lib/go-fdo-server-owner/scripts/など) に保存されている。
手順
-
Owner サーバーの設定ファイル (例:
/etc/go-fdo-server/owner.yaml) をテキストエディターで開きます。 fsimセクションを定義し、必要なモジュールを追加します。次の例では、fdo.wgetを使用してスクリプトのダウンロード、コマンドの実行、および大容量ファイルのダウンロードを設定します。log: level: "info" db: type: "sqlite" dsn: "file:/var/lib/go-fdo-server-owner/db.sqlite" http: ip: "0.0.0.0" port: "8043" device_ca: cert: "/etc/pki/go-fdo-server/device-ca.crt" owner: cert: "/etc/pki/go-fdo-server/owner.crt" key: "/etc/pki/go-fdo-server/owner.key" fsim: - module: "fdo.download" files: - src: "/var/lib/go-fdo-server-owner/scripts/setup-env.sh" dst: "/usr/local/bin/setup-env.sh" permissions: "0755" - module: "fdo.command" commands: - command: ["/usr/local/bin/setup-env.sh", "--init"] description: "Initializing environment" - module: "fdo.wget" files: - src: "http://distribution.example.com/images/worker-payload.tar.gz" dst: "/var/tmp/worker-payload.tar.gz" may_fail: trueファイルを保存し、Owner サーバーサービスを再起動して設定を適用します。
$ sudo systemctl restart fdo-owner-server