Skip to content

Commit 8db6aff

Browse files
committed
support building proxmoxve disk images
coreos/fedora-coreos-tracker#1652
1 parent 4652a24 commit 8db6aff

File tree

5 files changed

+81
-1
lines changed

5 files changed

+81
-1
lines changed

src/cmd-buildextend-proxmoxve

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmd-osbuild

src/cmd-generate-release-meta

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ def append_build(out, input_):
149149
if 'base-oscontainer' in input_:
150150
arch_dict['oci-image'] = populate_oci_image(input_['buildid'], input_['base-oscontainer'])
151151

152-
platforms = ["aliyun", "applehv", "aws", "azure", "azurestack", "digitalocean", "exoscale", "gcp", "hetzner", "hyperv", "ibmcloud", "kubevirt", "metal", "nutanix", "openstack", "powervs", "qemu", "virtualbox", "vmware", "vultr", "qemu-secex"]
152+
platforms = ["aliyun", "applehv", "aws", "azure", "azurestack",
153+
"digitalocean", "exoscale", "gcp", "hetzner", "hyperv",
154+
"ibmcloud", "kubevirt", "metal", "nutanix", "openstack",
155+
"proxmoxve" "powervs", "qemu", "virtualbox", "vmware",
156+
"vultr", "qemu-secex"]
153157
for platform in platforms:
154158
if input_.get("images", {}).get(platform, None) is not None:
155159
print(f" - {platform}")

src/cmd-osbuild

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ declare -A SUPPORTED_PLATFORMS=(
2424
['metal']='raw'
2525
['nutanix']='qcow2'
2626
['openstack']='qcow2'
27+
['proxmoxve']='qcow2'
2728
['qemu']='qcow2'
2829
['qemu-secex']='qcow2'
2930
['vultr']='raw'
@@ -271,6 +272,7 @@ main() {
271272
"cmd-buildextend-kubevirt") platforms=(kubevirt);;
272273
"cmd-buildextend-nutanix") platforms=(nutanix);;
273274
"cmd-buildextend-openstack") platforms=(openstack);;
275+
"cmd-buildextend-proxmoxve") platforms=(proxmoxve);;
274276
"cmd-buildextend-vultr") platforms=(vultr);;
275277
*) fatal "called as unexpected name $0";;
276278
esac

src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,8 @@ pipelines:
776776
path: platform.kubevirt.ipp.yaml
777777
- mpp-import-pipelines:
778778
path: platform.openstack.ipp.yaml
779+
- mpp-import-pipelines:
780+
path: platform.proxmoxve.ipp.yaml
779781
- mpp-import-pipelines:
780782
path: platform.metal.ipp.yaml
781783
- mpp-import-pipelines:
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This file defines the artifact to be used for the proxmoxve platform.
2+
version: '2'
3+
pipelines:
4+
- name: raw-proxmoxve-image
5+
build:
6+
mpp-format-string: '{buildroot}'
7+
stages:
8+
- type: org.osbuild.copy
9+
inputs:
10+
tree:
11+
type: org.osbuild.tree
12+
origin: org.osbuild.pipeline
13+
references:
14+
- name:raw-image
15+
options:
16+
paths:
17+
- from: input://tree/disk.img
18+
to: tree:///disk.img
19+
# Increase the size to the cloud image size
20+
- type: org.osbuild.truncate
21+
options:
22+
filename: disk.img
23+
size:
24+
mpp-format-string: "{cloud_image_size_mb * 1024 * 1024}"
25+
- type: org.osbuild.coreos.platform
26+
options:
27+
platform: proxmoxve
28+
devices:
29+
disk:
30+
type: org.osbuild.loopback
31+
options:
32+
filename: disk.img
33+
partscan: true
34+
mounts:
35+
- name: root
36+
type: org.osbuild.xfs
37+
source: disk
38+
partition:
39+
mpp-format-int: '{image.layout[''root''].partnum}'
40+
target: /
41+
- name: ostree.deployment
42+
type: org.osbuild.ostree.deployment
43+
options:
44+
source: mount
45+
deployment:
46+
default: true
47+
- name: boot
48+
type: org.osbuild.ext4
49+
source: disk
50+
partition:
51+
mpp-format-int: '{image.layout[''boot''].partnum}'
52+
target: /boot
53+
- name: proxmoxve
54+
build:
55+
mpp-format-string: '{host_as_buildroot}'
56+
stages:
57+
- type: org.osbuild.qemu
58+
inputs:
59+
image:
60+
type: org.osbuild.files
61+
origin: org.osbuild.pipeline
62+
references:
63+
name:raw-proxmoxve-image:
64+
file: disk.img
65+
options:
66+
filename:
67+
mpp-format-string: '{artifact_name_prefix}-proxmoxve.{arch}.qcow2'
68+
format:
69+
type: qcow2
70+
compression: false
71+
compat: '1.1'

0 commit comments

Comments
 (0)