Skip to content

Instantly share code, notes, and snippets.

@jlebon
Last active November 29, 2019 03:28
Show Gist options
  • Save jlebon/889d34b481a8c2abee618cf448a4c6c6 to your computer and use it in GitHub Desktop.
Save jlebon/889d34b481a8c2abee618cf448a4c6c6 to your computer and use it in GitHub Desktop.
Ignition v3 config with many /var partitions -- use with e.g. `cosa run --size 15 -i config-var-partitions.ign`
{
"ignition": {
"config": {},
"security": {
"tls": {}
},
"timeouts": {},
"version": "3.0.0"
},
"passwd": {
"users": [
{
"name": "core",
"groups": ["sudo", "wheel"],
"sshAuthorizedKeys": [
"ssh-rsa AAA..."
]
},
{
"name": "root",
"sshAuthorizedKeys": [
"ssh-rsa AAAA..."
]
}
]
},
"storage": {
"disks": [
{
"device": "/dev/vda",
"partitions": [
{
"label": "VAR",
"number": 0,
"sizeMiB": 1000
},
{
"label": "HOME",
"number": 0,
"sizeMiB": 1000
},
{
"label": "LIB",
"number": 0,
"sizeMiB": 1000
},
{
"label": "CONTAINERS",
"number": 0,
"sizeMiB": 1000
},
{
"label": "LOG",
"number": 0,
"sizeMiB": 1000
},
{
"label": "JOURNAL",
"number": 0,
"sizeMiB": 1000
},
{
"label": "SRV",
"number": 0,
"sizeMiB": 1000
}
]
}
],
"filesystems": [
{
"device": "/dev/disk/by-partlabel/VAR",
"path": "/var",
"format": "xfs",
"wipeFilesystem": true,
"label": "VAR"
},
{
"device": "/dev/disk/by-partlabel/HOME",
"path": "/var/home",
"format": "xfs",
"wipeFilesystem": true,
"label": "HOME"
},
{
"device": "/dev/disk/by-partlabel/LIB",
"path": "/var/lib",
"format": "xfs",
"wipeFilesystem": true,
"label": "LIB"
},
{
"device": "/dev/disk/by-partlabel/CONTAINERS",
"path": "/var/lib/containers",
"format": "xfs",
"wipeFilesystem": true,
"label": "CONTAINERS"
},
{
"device": "/dev/disk/by-partlabel/LOG",
"path": "/var/log",
"format": "xfs",
"wipeFilesystem": true,
"label": "LOG"
},
{
"device": "/dev/disk/by-partlabel/JOURNAL",
"path": "/var/log/journal",
"format": "xfs",
"wipeFilesystem": true,
"label": "JOURNAL"
},
{
"device": "/dev/disk/by-partlabel/SRV",
"path": "/var/srv",
"format": "xfs",
"wipeFilesystem": true,
"label": "SRV"
}
],
"files": [
{
"path": "/etc/fstab",
"append": [
{
"source": "data:,%0A/dev/disk/by-label/VAR%20/var%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/HOME%20/var/home%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/LIB%20/var/lib%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/CONTAINERS%20/var/lib/containers%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/LOG%20/var/log%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/JOURNAL%20/var/log/journal%20xfs%20defaults%200%200%0A"
},
{
"source": "data:,%0A/dev/disk/by-label/SRV%20/var/srv%20xfs%20defaults%200%200%0A"
}
]
},
{
"path": "/var/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/home/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/home/core/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/lib/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/lib/containers/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/log/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/log/journal/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
},
{
"path": "/var/srv/hello.txt",
"contents": {
"source": "data:,hello%20world"
}
}
]
},
"systemd": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment