Skip to content

Commit

Permalink
manifests: add ostree container input examples
Browse files Browse the repository at this point in the history
These examples show how to run a pipeline with ostree containers
as inputs. One of them pulls from a remote registry and the other
builds an ostree commit first, then encapsulates it, then deploys
from that.
  • Loading branch information
dustymabe committed Oct 12, 2023
1 parent f563ae6 commit 43fb6c6
Show file tree
Hide file tree
Showing 4 changed files with 2,835 additions and 0 deletions.
344 changes: 344 additions & 0 deletions test/data/manifests/fedora-coreos-container.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
{
"version": "2",
"pipelines": [
{
"name": "image-tree",
"source-epoch": 1659397331,
"stages": [
{
"type": "org.osbuild.ostree.init-fs"
},
{
"type": "org.osbuild.ostree.os-init",
"options": {
"osname": "fedora-coreos"
}
},
{
"type": "org.osbuild.ostree.config",
"options": {
"repo": "/ostree/repo",
"config": {
"sysroot": {
"readonly": false,
"bootloader": "none"
}
}
}
},
{
"type": "org.osbuild.mkdir",
"options": {
"paths": [
{
"path": "/boot/efi",
"mode": 448
}
]
}
},
{
"type": "org.osbuild.ignition"
},
{
"type": "org.osbuild.ostree.deploy",
"options": {
"osname": "fedora-coreos",
"mounts": [
"/boot",
"/boot/efi"
],
"rootfs": {
"label": "root"
},
"kernel_opts": [
"rw",
"console=tty0",
"console=ttyS0",
"ignition.platform.id=qemu",
"$ignition_firstboot",
"enforcing=0"
]
},
"inputs": {
"images": {
"type": "org.osbuild.containers",
"origin": "org.osbuild.source",
"references": {
"sha256:f5ab2e0456ff52b0e95e99c59a1cc70fb690153f146c1c4163c4916781ac3ad5": {
"name": "quay.io/fedora/fedora-coreos:stable"
}
}
}
}
},
{
"type": "org.osbuild.ostree.selinux",
"options": {
"deployment": {
"osname": "fedora-coreos",
"ref": "ostree/1/1/0"
}
}
},
{
"type": "org.osbuild.grub2",
"options": {
"rootfs": {
"label": "root"
},
"bootfs": {
"label": "boot"
},
"uefi": {
"vendor": "fedora",
"install": true
},
"legacy": "i386-pc",
"write_defaults": false,
"greenboot": false,
"ignition": true
}
}
]
},
{
"name": "image",
"stages": [
{
"type": "org.osbuild.truncate",
"options": {
"filename": "disk.img",
"size": "10737418240"
}
},
{
"type": "org.osbuild.sfdisk",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img"
}
}
},
"options": {
"uuid": "00000000-0000-4000-a000-000000000001",
"label": "gpt",
"partitions": [
{
"start": 2048,
"size": 2048,
"type": "21686148-6449-6E6F-744E-656564454649",
"bootable": true,
"uuid": "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
},
{
"start": 4096,
"size": 260096,
"type": "C12A7328-F81F-11D2-BA4B-00A0C93EC93B",
"uuid": "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
},
{
"start": 264192,
"size": 786432,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "61B2905B-DF3E-4FB3-80FA-49D1E773AA32"
},
{
"start": 1050624,
"size": 8388608,
"type": "0FC63DAF-8483-4772-8E79-3D69D8477DE4",
"uuid": "CA7D7CCB-63ED-4C53-861C-1742536059CC"
}
]
}
},
{
"type": "org.osbuild.mkfs.fat",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 4096,
"size": 260096,
"lock": true
}
}
},
"options": {
"label": "EFI-SYSTEM",
"volid": "7B7795E7"
}
},
{
"type": "org.osbuild.mkfs.ext4",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 264192,
"size": 786432,
"lock": true
}
}
},
"options": {
"uuid": "96d15588-3596-4b3c-adca-a2ff7279ea63",
"label": "boot"
}
},
{
"type": "org.osbuild.mkfs.xfs",
"devices": {
"device": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 1050624,
"size": 8388608,
"lock": true
}
}
},
"options": {
"uuid": "910678ff-f77e-4a7d-8d53-86f2ac47a823",
"label": "root"
}
},
{
"type": "org.osbuild.copy",
"inputs": {
"tree": {
"type": "org.osbuild.tree",
"origin": "org.osbuild.pipeline",
"references": [
"name:image-tree"
]
}
},
"options": {
"paths": [
{
"from": "input://tree/boot",
"to": "mount://root/"
},
{
"from": "input://tree/ostree",
"to": "mount://root/"
}
]
},
"devices": {
"efi": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 4096,
"size": 260096
}
},
"boot": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 264192,
"size": 786432
}
},
"root": {
"type": "org.osbuild.loopback",
"options": {
"filename": "disk.img",
"start": 1050624,
"size": 8388608
}
}
},
"mounts": [
{
"name": "root",
"type": "org.osbuild.xfs",
"source": "root",
"target": "/"
},
{
"name": "boot",
"type": "org.osbuild.ext4",
"source": "boot",
"target": "/boot"
},
{
"name": "efi",
"type": "org.osbuild.fat",
"source": "efi",
"target": "/boot/efi"
}
]
},
{
"type": "org.osbuild.grub2.inst",
"options": {
"platform": "i386-pc",
"filename": "disk.img",
"location": 2048,
"core": {
"type": "mkimage",
"partlabel": "gpt",
"filesystem": "ext4"
},
"prefix": {
"type": "partition",
"partlabel": "gpt",
"number": 2,
"path": "/grub2"
}
}
}
]
},
{
"name": "qcow2",
"stages": [
{
"type": "org.osbuild.qemu",
"inputs": {
"image": {
"type": "org.osbuild.files",
"origin": "org.osbuild.pipeline",
"references": {
"name:image": {
"file": "disk.img"
}
}
}
},
"options": {
"filename": "disk.qcow2",
"format": {
"type": "qcow2",
"compat": "1.1"
}
}
}
]
}
],
"sources": {
"org.osbuild.curl": {
"items": {}
},
"org.osbuild.skopeo": {
"items": {
"sha256:f5ab2e0456ff52b0e95e99c59a1cc70fb690153f146c1c4163c4916781ac3ad5": {
"image": {
"name": "quay.io/fedora/fedora-coreos",
"digest": "sha256:44a1bd71e649f802f84c20836b1fa5c2fa58afc3b2f7af44a06cce2ddca3dc8c"
}
}
}
}
}
}
Loading

0 comments on commit 43fb6c6

Please sign in to comment.