mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-04-27 02:51:19 +00:00
ubuntu-server: generate multi-lowerdir overlayfs for
maas-rack-controller, and full maas. To be used in subiquity for maas install options.
This commit is contained in:
parent
2db71b0c67
commit
9df3a91e26
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
|||||||
|
livecd-rootfs (2.507) bionic; urgency=medium
|
||||||
|
|
||||||
|
* ubuntu-server: generate multi-lowerdir overlayfs for
|
||||||
|
maas-rack-controller, and full maas. To be used in subiquity for maas
|
||||||
|
install options.
|
||||||
|
|
||||||
|
-- Dimitri John Ledkov <xnox@ubuntu.com> Wed, 28 Feb 2018 13:11:03 +0000
|
||||||
|
|
||||||
livecd-rootfs (2.506) bionic; urgency=medium
|
livecd-rootfs (2.506) bionic; urgency=medium
|
||||||
|
|
||||||
* live-build-auto/{build,config}: Support fetching a file from the seed
|
* live-build-auto/{build,config}: Support fetching a file from the seed
|
||||||
|
72
live-build/ubuntu-server/hooks/031-maas-squashfs.binary
Executable file
72
live-build/ubuntu-server/hooks/031-maas-squashfs.binary
Executable file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
# vi: ts=4 noexpandtab
|
||||||
|
#
|
||||||
|
# Generate a squashfs root and manifest
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
echo "031-maas-squashfs.binary"
|
||||||
|
|
||||||
|
case $IMAGE_TARGETS in
|
||||||
|
""|*squashfs*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Skipping squashfs build"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -n "$SUBARCH" ]; then
|
||||||
|
echo "Skipping rootfs build for subarch flavor build"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
. config/functions
|
||||||
|
. config/common
|
||||||
|
|
||||||
|
SQUASH_ROOT=binary/boot/squashfs.dir
|
||||||
|
|
||||||
|
RACK_ROOT=binary/boot/squashfs-rack.dir
|
||||||
|
REGION_ROOT=binary/boot/squashfs-region.dir
|
||||||
|
|
||||||
|
OVERLAY_RACK_ROOT=binary/overlay-maas-rack
|
||||||
|
OVERLAY_REGION_ROOT=binary/overlay-maas-region
|
||||||
|
|
||||||
|
mkdir -p "$RACK_ROOT"
|
||||||
|
mkdir -p "$REGION_ROOT"
|
||||||
|
|
||||||
|
mkdir -p "$OVERLAY_RACK_ROOT"
|
||||||
|
mkdir -p "$OVERLAY_REGION_ROOT"
|
||||||
|
|
||||||
|
# RACK is on top of the regular squashfs
|
||||||
|
|
||||||
|
mount_overlay "$SQUASH_ROOT/" "$OVERLAY_RACK_ROOT/" "$RACK_ROOT/" "RACK"
|
||||||
|
|
||||||
|
setup_mountpoint $RACK_ROOT
|
||||||
|
env DEBIAN_FRONTEND=noninteractive chroot $RACK_ROOT apt-get -y install maas-rack-controller
|
||||||
|
teardown_mountpoint $RACK_ROOT
|
||||||
|
|
||||||
|
umount "$RACK_ROOT"
|
||||||
|
|
||||||
|
# Full MAAS (Region) is on top of the rack
|
||||||
|
# in overlayfs lowerdir are mounted right to left, colon separated
|
||||||
|
mount_overlay "$OVERLAY_RACK_ROOT/:$SQUASH_ROOT/" "$OVERLAY_REGION_ROOT/" "$REGION_ROOT/" "REGION"
|
||||||
|
|
||||||
|
setup_mountpoint $REGION_ROOT
|
||||||
|
env DEBIAN_FRONTEND=noninteractive chroot $REGION_ROOT apt-get -y install maas
|
||||||
|
chroot $REGION_ROOT pg_ctlcluster 10 main stop
|
||||||
|
teardown_mountpoint "$REGION_ROOT"
|
||||||
|
|
||||||
|
umount "$REGION_ROOT"
|
||||||
|
|
||||||
|
squashfs_rack_f="${PWD}/livecd.${PROJECT}.maas-rack.squashfs"
|
||||||
|
|
||||||
|
(cd "$OVERLAY_RACK_ROOT/" &&
|
||||||
|
mksquashfs . ${squashfs_rack_f} \
|
||||||
|
-no-progress -xattrs -comp xz )
|
||||||
|
|
||||||
|
squashfs_region_f="${PWD}/livecd.${PROJECT}.maas-region.squashfs"
|
||||||
|
|
||||||
|
(cd "$OVERLAY_REGION_ROOT/" &&
|
||||||
|
mksquashfs . ${squashfs_region_f} \
|
||||||
|
-no-progress -xattrs -comp xz )
|
Loading…
x
Reference in New Issue
Block a user