I use Ignition config and it worked fine.
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"groups": [
"docker",
"sudo"
],
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa ...."
],
"passwordHash": " ..."
}
]
},
"storage": {
"disks": [
{
"device": "/dev/sda",
"wipeTable": true,
"partitions": [
{
"label": "root1",
"typeGuid": "be9067b9-ea49-4f15-b4f6-f36f8c9e1818"
}
]
},
{
"device": "/dev/sdb",
"wipeTable": true,
"partitions": [
{
"label": "root2",
"typeGuid": "be9067b9-ea49-4f15-b4f6-f36f8c9e1818"
}
]
}
],
"raid": [
{
"devices": [
"/dev/sda1",
"/dev/sdb1"
],
"level": "raid1",
"name": "root_array"
}
],
"filesystems": [{
"device": "/dev/md/root_array",
"path": "/var/lib/docker/volumes",
"format": "ext4",
"label": "DATA",
"wipeFilesystem": true
}],
"files": [
{
"path": "/etc/hostname",
"mode": 420,
"contents": {
"source": "data:,host1"
}
}
]
}
}
I needed to add auto-mount option for my RAID array so /var/lib/docker/volumes
is auto-mounted to the RAID array created by Ignition. I did it this way:
"systemd": {
"units": [
{
"contents": "[Unit]\nBefore=local-fs.target\n[Mount]\nWhere=/var/lib/docker/volumes\nWhat=/dev/md/root_array\n[Install]\nWantedBy=local-fs.target",
"enabled": true,
"name": "var.mount"
}
]
}
Now Ignition works without an error, but I cannot login to my instance after install. It says “Permission denied” with SSH key and not prompting for password without it. I use 2048 bit SSH key.
works without an error
This means I edit boot config and enable Ignition output to tty that usually gives useful errors.