8a1b382301
These have been here since the initial commit I0e76931fdb4ca0c7445b1e72dc348f0cf03eaee5 in 2016. These have now bifurcated into python3 packages and are brought in elsewhere; we don't need to additionally bring it in here. At best we duplicate the install, at worse we get it wrong (I563896f1caa1a68781f10b27cd7d9cf2606aaa17). libselinux is installed for all platforms by the redhat-common package [1]. This element probably pre-dates that. python[3]-apt is brought in by software-properties-common [2] for all platforms, which will bring in the correct python[3] version. [1] https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/redhat-common/package-installs.yaml#L14 [2] https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/base/pre-install.d/03-baseline-tools Change-Id: Ie1ca9bda749e17cdd5269850c03feca100395f1f |
||
---|---|---|
.. | ||
cache-devstack | ||
control-plane-minimal | ||
infra-package-needs | ||
initialize-urandom | ||
nodepool-base | ||
openstack-repos | ||
zuul-worker | ||
README.rst | ||
bindep-fallback.txt |
README.rst
Using diskimage-builder to build devstack-gate nodes
In addition to being able to just download and consume images that are the same as what run devstack-gate, it's easy to make your own for local dev or testing - or just for fun.
Install diskimage-builder
Install the dependencies:
sudo apt-get install kpartx qemu-utils curl python-yaml debootstrap
Install diskimage-builder:
sudo -H pip install diskimage-builder
Build an image
Building an image is simple, we have a script!
bash tools/build-image.sh
See the script for environment variables to set distribution, etc. By default it builds an ubuntu-minimal based image. You should be left with a .qcow2 image file of your selected distribution.
Infra uses the -minimal build type for building Ubuntu/CentOS/Fedora. For example: ubuntu-minimal.
It is a good idea to set TMP_DIR
to somewhere with
plenty of space to avoid the disappointment of a full-disk mid-way
through the script run.
While testing, consider exporting DIB_OFFLINE=true, to skip updating the cache.
Mounting the image
If you would like to examine the contents of the image, you can mount it on a loopback device using qemu-nbd.
sudo apt-get install qemu-utils
sudo modprobe nbd max_part=16
sudo mkdir -p /tmp/newimage
sudo qemu-nbd -c /dev/nbd1 /path/to/devstack-gate-precise.qcow2
sudo mount /dev/nbd1p1 /tmp/newimage
or use the scripts
sudo apt-get install qemu-utils
sudo modprobe nbd max_part=16
sudo tools/mount-image.sh devstack-gate-precise.qcow2
sudo tools/umount-image.sh
Other things
It's a qcow2 image, so you can do tons of things with it. You can upload it to glance, you can boot it using kvm, and you can even copy it to a cloud server, replace the contents of the server with it and kexec the new kernel.