Appendix: Creating Ubuntu and Debian ImagesΒΆ
The following examples create Ubuntu and Debian images and associated boot configurations using the public Internet-accessible Ubuntu and Debian repos, both of which contain multiple releases.
UBUNTU
First an example of building an Ubuntu 20.04 LTS (Focal Fossa) image. Specify a local repo, arbitrarily naming it ubuntu, that serves as a shorthand reference to the public Ubuntu repo:
scyld-clusterctl repos create name=ubuntu urls=http://archive.ubuntu.com/ubuntu/
Next, specify a particular distribution within that Ubuntu repo. For this example we specify focal, which is the Focal Fossa 20.04 LTS release, and give this local distro the name ubuntu_20.04:
scyld-clusterctl distros create name=ubuntu_20.04 repos=ubuntu release=focal packaging=deb
Now create an image from the distro ubuntu_20.04 and name it UbuntuImg-20.04:
scyld-modimg --create ubuntu_20.04 --set-name UbuntuImg-20.04 --upload
And create a boot configuration named UbuntuBoot-20.04 that pxeboots that image:
scyld-add-boot-config --image UbuntuImg-20.04 --boot-config UbuntuBoot-20.04
The image thus created contains basic Ubuntu 20.04 LTS software. You can add software and modify configuration files in this image as needed, keeping in mind that Ubuntu's package manager expects software distributed as *.deb files, not *.rpm files.
For example, use --chroot
:
scyld-modimg -i UbuntuImg-20.04 --chroot
and manipulate files and packages within the image.
DEBIAN
You can employ similar steps to create a Debian image, in this example creating an image from the stable distro:
scyld-clusterctl repos create name=debian urls=http://deb.debian.org/debian/
scyld-clusterctl distros create name=debian-stable repos=debian release=stable packaging=deb
scyld-modimg --create debian-stable --set-name debian-stable-img --upload
scyld-add-boot-config --image debian-stable-img --boot-config debian-stable-boot