|
この文書は自動機械翻訳技術を使用して翻訳されています。 正確な翻訳を提供するように努めておりますが、翻訳された内容の完全性、正確性、信頼性については一切保証いたしません。 相違がある場合は、元の英語版 英語 が優先され、正式なテキストとなります。 |
SUSE® Rancher Prime: OS Manager プラン
SUSE® Rancher Prime: OS Manager は Rancher System Agent を使用し、SUSE® Rancher Prime: OS Manager System Agent に改名して、ノードをシンプルなプランで起動します。
プランは以下の設定を適用します:
-
ノードにいくつかのラベルを設定します。
-
MachineInventoryの値に従って適切なホスト名を設定します。 -
Rancher Server からデフォルトの Rancher System Agent をインストールし、適切な Kubernetes コンポーネントをインストールします。
起動サービスは、/var/lib/elemental/agent/plans に保存されたローカルプランも受け入れます。そこに書かれたプランは、インストールが完了した後のノード起動時にも適用されます。
|
ローカルプランは、ノードに Kubernetes がインストールされる前の初期 SUSE® Rancher Prime: OS Manager 起動中のみ実行されます。 |
プランの種類
SUSE® Rancher Prime: OS Manager が使用できるプランの種類は:
-
一度きりの指示:一度だけ実行します。
-
定期的な指示:定期的に実行されます。
-
ファイル:ファイルを作成します。
-
プローブ:HTTP プローブ
|
一度きりの指示と定期的な指示の両方が、直接コマンドまたは Docker イメージを実行できます。 |
SUSE® Rancher Prime: OS Manager にローカルプランを追加する
SUSE® Rancher Prime: OS Manager にローカルプランを MachineRegistration CRD の一部として、cloud-config セクションに次のように追加できます:
apiVersion: elemental.cattle.io/v1beta1
kind: MachineRegistration
metadata:
name: my-nodes
namespace: fleet-default
spec:
config:
cloud-config:
users:
- name: root
passwd: root
write_files:
- path: /var/lib/elemental/agent/plans/mycustomplan.plan
permissions: "0600"
content: |
{"instructions":
[
{
"name":"set hostname",
"command":"hostnamectl",
"args": ["set-hostname", "myHostname"]
},
{
"name":"stop sshd service",
"command":"systemctl",
"args": ["stop", "sshd"]
}
]
}
elemental:
install:
reboot: true
device: /dev/sda
debug: true
machineName: my-machine
machineInventoryLabels:
element: fire
プランの例
以下のプランは、迅速な参照用に提供されており、あなたの環境での動作を保証するものではありません。プランについて詳しく学ぶには、https://github.com/rancher/system-agent[Rancher System Agent]をご確認ください。
-
例1:一度きりの指示
-
例2:定期的な指示
-
例3:ファイル
-
例4:プローブ
{"instructions":
[
{
"name":"set hostname",
"command":"hostnamectl",
"args": ["set-hostname", "myHostname"]
},
{
"name":"stop sshd service",
"command":"systemctl",
"args": ["stop", "sshd"]
}
]
}
{"periodicInstructions":
[
{
"name":"set hostname",
"image":"ghcr.io/rancher-sandbox/elemental-example-plan:main"
"command": "run.sh"
}
]
}
{"files":
[
{
"content":"Welcome to the system",
"path":"/etc/motd",
"permissions": "0644"
}
]
}
{"probes":
"probe1": {
"name": "Service Up",
"httpGet": {
"url": "http://10.0.0.1/healthz",
"insecure": "false",
"clientCert": "....",
"clientKey": "....",
"caCert": "....."
}
}
}