Drop default distribution root element support
Converts our existing default root element code to be just a check which exits with a failure message if no root/distribution element is found. Change-Id: I954a6abfd7871d5807b1a171a03fa98932410cff
This commit is contained in:
parent
39b5e5f71c
commit
255387a288
18
README.md
18
README.md
@ -98,7 +98,7 @@ offline mode.
|
||||
Base images
|
||||
-----------
|
||||
|
||||
These are cached by the standard elements - ubuntu, fedora.
|
||||
These are cached by the standard elements - fedora, redhat, ubuntu.
|
||||
|
||||
source-repositories
|
||||
-------------------
|
||||
@ -140,11 +140,13 @@ VM image with partition table and installed grub boot sector. The mellanox
|
||||
element adds support for mellanox infiniband hardware to both the deploy
|
||||
ramdisk and the built images.
|
||||
|
||||
Images start as a base ubuntu cloud image. Other distributions may be added in
|
||||
future, the infrastructure deliberately makes few assumptions about the exact
|
||||
operating system is use. The base image has opensshd running (a new key
|
||||
generated on first boot) and accepts use keys via the cloud metadata service,
|
||||
loading them into the 'ubuntu' user.
|
||||
Images must specify a base distribution image element. Currently base
|
||||
distribution elements exist for fedora, rhel, and ubuntu. Other
|
||||
distributions may be added in future, the infrastructure deliberately
|
||||
makes few assumptions about the exact operating system in use.
|
||||
The base image has opensshd running (a new key generated on first boot)
|
||||
and accepts keys via the cloud metadata service, loading them into the
|
||||
distribution specific default user account.
|
||||
|
||||
The goal of a built image is to have any global configuration ready to roll,
|
||||
but nothing that ties it to a specific cloud instance: images should be able to
|
||||
@ -208,8 +210,8 @@ part of the process you need to customise:
|
||||
|
||||
* root.d: Create or adapt the initial root filesystem content. This is where
|
||||
alternative distribution support is added, or customisations such as
|
||||
building on an existing image. If no element configures a root, the ubuntu
|
||||
element will be automatically invoked to obtain an Ubuntu image.
|
||||
building on an existing image.
|
||||
|
||||
Runs outside the chroot on the host environment.
|
||||
|
||||
Only one element can use this at a time unless particular care is taken not
|
||||
|
@ -63,6 +63,8 @@ function show_options () {
|
||||
echo
|
||||
echo "ELEMENTS_PATH will allow you to specify multiple locations for the elements."
|
||||
echo
|
||||
echo "NOTE: At least one distribution root element must be specified."
|
||||
echo
|
||||
echo "Examples:"
|
||||
echo " ${SCRIPTNAME} -a amd64 -o ubuntu-amd64 vm ubuntu"
|
||||
echo " export ELEMENTS_PATH=~/source/tripleo-image-elements/elements"
|
||||
|
@ -242,14 +242,10 @@ function create_base () {
|
||||
# Copy data in to the root.
|
||||
TARGET_ROOT=$TMP_MOUNT_PATH run_d root
|
||||
if [ -z "$(ls $TMP_MOUNT_PATH | grep -v '^lost+found\|tmp$')" ] ; then
|
||||
# Nothing copied in, use Ubuntu. Note the test above allows
|
||||
# root.d elements to put things in /tmp, and still have the
|
||||
# automatic Ubuntu behaviour.
|
||||
echo "Adding ubuntu element as / had no contents"
|
||||
IMAGE_ELEMENT=$($SCRIPT_HOME/element-info --expand-dependencies $IMAGE_ELEMENT ubuntu)
|
||||
generate_hooks
|
||||
echo "Now building: $IMAGE_ELEMENT"
|
||||
TARGET_ROOT=$TMP_MOUNT_PATH run_d root
|
||||
# No root element copied in. Note the test above allows
|
||||
# root.d elements to put things in /tmp
|
||||
echo "Please include at least one distribution root element."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Configure Image
|
||||
|
Loading…
Reference in New Issue
Block a user