Fedora CoreOS minimale Ignition-Konfiguration für XCP-NG
English
Deutsch
Dies ist die Ignition-Konfiguration, die ich verwende, um meine Fedora CoreOS-Instanz auf einer VM auf meinem XCP-NG-Server zu starten:
ignition.json
{
"ignition": {
"version": "3.2.0"
},
"passwd": {
"users": [
{
"groups": [
"sudo",
"docker"
],
"name": "uli",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDpvDSxIwnyMCFtIPRQmPUV6hh9lBJUR0Yo7ki+0Vxs+kcCHGjtcgDzcaHginj1zvy7nGwmcuGi5w83eKoANjK5CzpFT4vJeiXqtGllh0w+B5s6tbSsD0Wv3SC9Xc4NihjVjLU5gEyYmfs/sTpiow225Al9UVYeg1SzFr1I3oSSuw== sample@host"
]
}
]
},
"storage": {
"files": [
{
"path": "/etc/hostname",
"contents": {
"source": "data:,coreos-test%0A"
},
"mode": 420
},
{
"path": "/etc/profile.d/systemd-pager.sh",
"contents": {
"source": "data:,%23%20Tell%20systemd%20to%20not%20use%20a%20pager%20when%20printing%20information%0Aexport%20SYSTEMD_PAGER%3Dcat%0A"
},
"mode": 420
},
{
"path": "/etc/sysctl.d/20-silence-audit.conf",
"contents": {
"source": "data:,%23%20Raise%20console%20message%20logging%20level%20from%20DEBUG%20(7)%20to%20WARNING%20(4)%0A%23%20to%20hide%20audit%20messages%20from%20the%20interactive%20console%0Akernel.printk%3D4"
},
"mode": 420
}
]
},
"systemd": {
"units": [
{
"enabled": true,
"name": "docker.service"
},
{
"enabled": true,
"name": "containerd.service"
},
{
"dropins": [
{
"contents": "[Service]\n# Override Execstart in main unit\nExecStart=\n# Add new Execstart with `-` prefix to ignore failure\nExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM\nTTYVTDisallocate=no\n",
"name": "autologin-core.conf"
}
],
"name": "[email protected]"
}
]
}
}welche aus folgendem YAML erstellt wird:
ignition.yml
variant: fcos
version: 1.2.0
passwd:
users:
- name: uli
groups:
- "sudo"
- "docker"
ssh_authorized_keys:
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDpvDSxIwnyMCFtIPRQmPUV6hh9lBJUR0Yo7ki+0Vxs+kcCHGjtcgDzcaHginj1zvy7nGwmcuGi5w83eKoANjK5CzpFT4vJeiXqtGllh0w+B5s6tbSsD0Wv3SC9Xc4NihjVjLU5gEyYmfs/sTpiow225Al9UVYeg1SzFr1I3oSSuw== sample@computer"
systemd:
units:
- name: docker.service
enabled: true
- name: containerd.service
enabled: true
- name: [email protected]
dropins:
- name: autologin-core.conf
contents: |
[Service]
# ExecStart in Haupt-Unit überschreiben
ExecStart=
# Neues ExecStart mit `-`-Präfix hinzufügen, um Fehler zu ignorieren
ExecStart=-/usr/sbin/agetty --autologin core --noclear %I $TERM
TTYVTDisallocate=no
storage:
files:
- path: /etc/hostname
mode: 0644
contents:
inline: |
coreos-test
- path: /etc/profile.d/systemd-pager.sh
mode: 0644
contents:
inline: |
# systemd anweisen, keinen Pager zu verwenden bei der Ausgabe von Informationen
export SYSTEMD_PAGER=cat
- path: /etc/sysctl.d/20-silence-audit.conf
mode: 0644
contents:
inline: |
# Konsolen-Log-Level von DEBUG (7) auf WARNING (4) erhöhen
# um Audit-Meldungen auf der interaktiven Konsole auszublenden
kernel.printk=4mit
fcct.sh
fcct --pretty --strict ignition.yml --output ignition.ignoder das Online-Transpiler-Tool von TechOverflow.
Installation mit:
install_coreos.sh
sudo coreos-installer install /dev/xvda --copy-network --ignition-url https://mydomain.com/ignition.ignFunktionen:
- DHCP auf allen Netzwerkschnittstellen
- TTY auf dem Bildschirm
- Kein Passwort – denken Sie daran, den SSH-Schlüssel durch Ihren Schlüssel zu ersetzen!
Check out similar posts by category:
Virtualization
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow