6.4.2. CLI の Git リポジトリーからのデバイス設定の管理
Git リポジトリーでデバイス設定を作成し、適用します。
以下の手順を実行します。
手順
site-settingsという名前のRepositoryリソースの次の定義が含まれるsite-settings-repo.yamlなどのファイルを作成します。apiVersion: flightctl.io/v1alpha1 kind: Repository metadata: name: site-settings spec: type: git url: https://github.com/<your_org>/<your_repo>.git次のコマンドを実行して、
Repositoryリソースを作成します。flightctl apply -f site-settings-repo.yaml次のコマンドを実行して、リソースが正しく作成されたこと、および Red Hat Edge Manager からアクセスできることを確認します。
flightctl get repository/site-settings以下の出力例を参照してください。
NAME TYPE REPOSITORY URL ACCESSIBLE site-settings git https://github.com/<your_org>/<your_repo>.git Trueデバイス仕様を更新して、
サンプルサイトの設定をデバイスに適用します。apiVersion: flightctl.io/v1alpha1 kind: Device metadata: name: <device_name> spec: [...] config:1 - name: example-site configType: GitConfigProviderSpec gitRef: repository: site-settings targetRevision: production path: /etc/example-site2 [...]