Skip to content

Commit

Permalink
Merge pull request omniosorg#200 from citrus-it/azure
Browse files Browse the repository at this point in the history
Build azure image by default.
  • Loading branch information
hadfl authored Mar 25, 2021
2 parents c3138f6 + 1ae4754 commit 7b39635
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,17 @@ build-usb:
./build/build_usb $(BUILDSEND_MP)/$(VERSION).iso \
$(BUILDSEND_MP)/$(VERSION).usb-dd

build-bhyve: bins
build-bhyve: bins zfs
@banner .BHYVE
BUILDSEND_MP=$(BUILDSEND_MP) ./build/bhyve

build-azure: bins zfs
@banner .azure
BUILDSEND_MP=$(BUILDSEND_MP) ./build/azure

install-iso: check-mkisofs bins install-tftp install-web build-iso
install-usb: install-iso build-usb
all: install-usb $(NGZ_ZFS_STREAM) build-bhyve
all: install-usb $(NGZ_ZFS_STREAM) build-bhyve build-azure

# Used by omnios-build/kayak/ to create the kayak package

Expand Down
12 changes: 7 additions & 5 deletions build/azure
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,20 @@ HVM_Image_Finalise 1 "/dev/dsk/c1d0s1" "/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:b" \

echo "Creating raw disk image"

rm -f $BUILDSEND_MP/azure-$VERSION.{raw,vhd}
dd if=$HVMlofi of=$BUILDSEND_MP/azure-$VERSION.raw bs=2048
rm -f $BUILDSEND_MP/r$VERSION.azure.raw
dd if=$HVMlofi of=$BUILDSEND_MP/r$VERSION.azure.raw bs=2048
lofiadm -d $HVMlofi
zfs destroy -r $HVMdataset

conv=`mktemp`
wget -O $conv https://mirrors.omnios.org/vhd/raw2vhd.py
echo "Creating vhd disk image"
python2 $conv $BUILDSEND_MP/azure-$VERSION.{raw,vhd}
python2 $conv $BUILDSEND_MP/r$VERSION.azure.{raw,vhd}
rm -f $conv
rm -f $BUILDSEND_MP/azure-$VERSION.raw
ls -lh $BUILDSEND_MP/azure-$VERSION.vhd
rm -f $BUILDSEND_MP/r$VERSION.azure.raw
ls -lh $BUILDSEND_MP/r$VERSION.azure.vhd
zstd -9fv --rm $BUILDSEND_MP/r$VERSION.azure.vhd
ls -lh $BUILDSEND_MP/r$VERSION.azure.vhd.zst

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker
6 changes: 2 additions & 4 deletions build/bhyve
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ zfs snapshot $HVMdataset@final
zfs send $HVMdataset@final | pv > $BUILDSEND_MP/r$VERSION.bhyve
zfs destroy -r $HVMdataset

rm -f $BUILDSEND_MP/r$VERSION.bhyve.xz
xz -9v $BUILDSEND_MP/r$VERSION.bhyve

ls -lh $BUILDSEND_MP/r$VERSION.bhyve.xz
zstd -9fv --rm $BUILDSEND_MP/r$VERSION.bhyve
ls -lh $BUILDSEND_MP/r$VERSION.bhyve.zst

# Vim hints
# vim:ts=4:sw=4:et:fdm=marker

0 comments on commit 7b39635

Please sign in to comment.