Skip to content

Commit

Permalink
osbuild: support building azurestack disks
Browse files Browse the repository at this point in the history
  • Loading branch information
dustymabe committed Feb 17, 2025
1 parent 86ed1f7 commit cdd7fc4
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd-osbuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare -A SUPPORTED_PLATFORMS=(
['applehv']='raw'
['aws']='vmdk'
['azure']='vhd'
['azurestack']='vhd'
['digitalocean']='qcow2'
['exoscale']='qcow2'
['gcp']='tar.gz'
Expand Down
2 changes: 2 additions & 0 deletions src/osbuild-manifests/coreos.osbuild.x86_64.mpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ pipelines:
path: platform.aws.ipp.yaml
- mpp-import-pipelines:
path: platform.azure.ipp.yaml
- mpp-import-pipelines:
path: platform.azurestack.ipp.yaml
- mpp-import-pipelines:
path: platform.digitalocean.ipp.yaml
- mpp-import-pipelines:
Expand Down
71 changes: 71 additions & 0 deletions src/osbuild-manifests/platform.azurestack.ipp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file defines the artifact to be used for the azurestack platform.
version: '2'
pipelines:
- name: raw-azurestack-image
build:
mpp-format-string: '{buildroot}'
stages:
- type: org.osbuild.copy
inputs:
tree:
type: org.osbuild.tree
origin: org.osbuild.pipeline
references:
- name:raw-image
options:
paths:
- from: input://tree/disk.img
to: tree:///disk.img
# Increase the size to the cloud image size
- type: org.osbuild.truncate
options:
filename: disk.img
size:
mpp-format-string: "{cloud_image_size_mb * 1024 * 1024}"
- type: org.osbuild.coreos.platform
options:
platform: azurestack
devices:
disk:
type: org.osbuild.loopback
options:
filename: disk.img
partscan: true
mounts:
- name: root
type: org.osbuild.xfs
source: disk
partition:
mpp-format-int: '{image.layout[''root''].partnum}'
target: /
- name: ostree.deployment
type: org.osbuild.ostree.deployment
options:
source: mount
deployment:
default: true
- name: boot
type: org.osbuild.ext4
source: disk
partition:
mpp-format-int: '{image.layout[''boot''].partnum}'
target: /boot
- name: azurestack
build:
mpp-format-string: '{host_as_buildroot}'
stages:
- type: org.osbuild.qemu
inputs:
image:
type: org.osbuild.files
origin: org.osbuild.pipeline
references:
name:raw-azurestack-image:
file: disk.img
options:
filename:
mpp-format-string: '{artifact_name_prefix}-azurestack.{arch}.vhd'
format:
type: vpc
force_size: true
subformat: fixed

0 comments on commit cdd7fc4

Please sign in to comment.