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.

Revisions

  1. jlebon revised this gist Nov 29, 2019. No changes.
  2. jlebon revised this gist Nov 29, 2019. 1 changed file with 56 additions and 5 deletions.
    61 changes: 56 additions & 5 deletions config-var-partitions.ign
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@
    "sizeMiB": 1000
    },
    {
    "label": "VARLIB",
    "label": "LIB",
    "number": 0,
    "sizeMiB": 1000
    },
    @@ -58,6 +58,11 @@
    "label": "JOURNAL",
    "number": 0,
    "sizeMiB": 1000
    },
    {
    "label": "SRV",
    "number": 0,
    "sizeMiB": 1000
    }
    ]
    }
    @@ -78,11 +83,11 @@
    "label": "HOME"
    },
    {
    "device": "/dev/disk/by-partlabel/VARLIB",
    "device": "/dev/disk/by-partlabel/LIB",
    "path": "/var/lib",
    "format": "xfs",
    "wipeFilesystem": true,
    "label": "VARLIB"
    "label": "LIB"
    },
    {
    "device": "/dev/disk/by-partlabel/CONTAINERS",
    @@ -104,6 +109,13 @@
    "format": "xfs",
    "wipeFilesystem": true,
    "label": "JOURNAL"
    },
    {
    "device": "/dev/disk/by-partlabel/SRV",
    "path": "/var/srv",
    "format": "xfs",
    "wipeFilesystem": true,
    "label": "SRV"
    }
    ],
    "files": [
    @@ -117,7 +129,7 @@
    "source": "data:,%0A/dev/disk/by-label/HOME%20/var/home%20xfs%20defaults%200%200%0A"
    },
    {
    "source": "data:,%0A/dev/disk/by-label/VARLIB%20/var/lib%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"
    @@ -127,9 +139,24 @@
    },
    {
    "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": {
    @@ -141,8 +168,32 @@
    "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": {}
    }
    }
  3. jlebon created this gist Nov 28, 2019.
    148 changes: 148 additions & 0 deletions config-var-partitions.ign
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,148 @@
    {
    "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": "VARLIB",
    "number": 0,
    "sizeMiB": 1000
    },
    {
    "label": "CONTAINERS",
    "number": 0,
    "sizeMiB": 1000
    },
    {
    "label": "LOG",
    "number": 0,
    "sizeMiB": 1000
    },
    {
    "label": "JOURNAL",
    "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/VARLIB",
    "path": "/var/lib",
    "format": "xfs",
    "wipeFilesystem": true,
    "label": "VARLIB"
    },
    {
    "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"
    }
    ],
    "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/VARLIB%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"
    }
    ]
    },
    {
    "path": "/var/home/core/hello.txt",
    "contents": {
    "source": "data:,hello%20world"
    }
    },
    {
    "path": "/var/lib/hello.txt",
    "contents": {
    "source": "data:,hello%20world"
    }
    }
    ]
    },
    "systemd": {}
    }