English Italian
Once we have access to the console of the machine we can browse around a bit to see some of the different pieces of the operating system. For example, even though this is an OSTree based system it was still composed via RPMs and we can inspect the system to see what it was composed of:
[core@tutorial ~]$ rpm -q ignition kernel moby-engine podman systemd rpm-ostree zincati
ignition-2.4.1-1.git5260a5b.fc32.x86_64
kernel-5.7.8-200.fc32.x86_64
moby-engine-19.03.11-1.ce.git42e35e6.fc32.x86_64
podman-1.9.3-1.fc32.x86_64
systemd-245.6-2.fc32.x86_64
rpm-ostree-2020.3-1.fc32.x86_64
zincati-0.0.12-2.fc32.x86_64
We can also inspect the current revision of Fedora CoreOS:
[core@tutorial ~]$ rpm-ostree status
State: idle
Deployments:
* ostree://fedora:fedora/x86_64/coreos/stable
Version: 32.20200715.3.0 (2020-07-27T11:36:29Z)
Commit: a3b08ee51b1d950afd9d0d73f32d5424ad52c7703a6b5830e0dc11c3a682d869
GPGSignature: Valid signature by 97A1AE57C3A2372CCA3A4ABA6C13026D12C944D0
Aug 06 14:50:36 tutorial systemd[1]: Started Zincati Update Agent.
Aug 06 14:50:36 tutorial zincati[889]: [INFO ] starting update agent (zincati 0.0.12)
Aug 06 14:50:39 tutorial zincati[889]: [INFO ] Cincinnati service: https://updates.coreos.fedoraproject.org
Aug 06 14:50:39 tutorial zincati[889]: [INFO ] agent running on node 'dbe8968f75c34d9eb3d3c4c226aa8fdf', in update group 'default'
Aug 06 14:50:39 tutorial zincati[889]: [INFO ] initialization complete, auto-updates logic enabled
One other interesting thing to do is view the logs from Ignition in case there is anything interesting there we may want to investigate:
[core@tutorial ~]$ podman version
[core@tutorial ~]$ podman info
`podman` commands can be run as root or as non-root user. `docker` commands need to be run as root via `sudo` unless the user has been added to the `docker` group.
Running containers via `docker` and `podman` at the same time can cause issues and result in unexpected behaviour. Refer to the https://docs.fedoraproject.org/en-US/fedora-coreos/faq/#_can_i_run_containers_via_docker_and_podman_at_the_same_time[FAQ Entry] for more details.
The Docker daemon is not started by default but running any `docker` command will start it as it is socket activated via systemd.
Taking down the Virtual Machine
Let's now get rid of that virtual machine so we can start again from scratch. First escape out of the serial console by pressing `CTRL + ]` and then type:
virsh destroy fcos
virsh undefine --remove-all-storage fcos
You may now proceed with the xref:tutorial-services.adoc[second tutorial].
ignition-validate autologin.ign && echo 'Success!'
Add a systemd dropin to override the default `serial-getty@ttyS0.service`.
The override will make the service automatically log the `core` user in to the serial console of the booted machine.
Add a bash profile that tells systemd to not use a pager for output.
{
"ignition": {
"version": "3.1.0"
},
"storage": {
"files": [
{
"path": "/etc/hostname",
"contents": {
"source": "data:,tutorial%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%0A"
},
"mode": 420
}
]
},
"systemd": {
"units": [
{
"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\n",
"name": "autologin-core.conf"
}
],
"name": "serial-getty@ttyS0.service"
}
]
}
}
We use `virt-install` to create a new Fedora CoreOS virtual machine with a specific config: