Enable tinyipa for devstack Ironic
Change-Id: If45c36cb8dc267dc80d1a324e8db3286ba6f7ee8 Depends-On: I79fbec75de19b3d6feb19f87a3a0f662eae42bf3
This commit is contained in:
parent
a193c42fef
commit
a59d8ab023
@ -95,6 +95,10 @@ IRONIC_VM_LOG_ROTATE=$(trueorfalse True IRONIC_VM_LOG_ROTATE)
|
||||
|
||||
# Use DIB to create deploy ramdisk and kernel.
|
||||
IRONIC_BUILD_DEPLOY_RAMDISK=$(trueorfalse True IRONIC_BUILD_DEPLOY_RAMDISK)
|
||||
|
||||
# Ironic IPA ramdisk type, supported types are: coreos, tinyipa.
|
||||
IRONIC_RAMDISK_TYPE=${IRONIC_RAMDISK_TYPE:-coreos}
|
||||
|
||||
# If not use DIB, these files are used as deploy ramdisk/kernel.
|
||||
# (The value must be an absolute path)
|
||||
IRONIC_DEPLOY_RAMDISK=${IRONIC_DEPLOY_RAMDISK:-}
|
||||
@ -791,6 +795,20 @@ function build_ipa_coreos_ramdisk {
|
||||
cd -
|
||||
}
|
||||
|
||||
function build_tinyipa_ramdisk {
|
||||
echo "Building ironic-python-agent deploy ramdisk"
|
||||
local kernel_path=$1
|
||||
local ramdisk_path=$2
|
||||
git_clone $IRONIC_PYTHON_AGENT_REPO $IRONIC_PYTHON_AGENT_DIR $IRONIC_PYTHON_AGENT_BRANCH
|
||||
cd $IRONIC_PYTHON_AGENT_DIR/imagebuild/tinyipa
|
||||
export BUILD_AND_INSTALL_TINYIPA=true
|
||||
make
|
||||
cp tinyipa.gz $ramdisk_path
|
||||
cp tinyipa.vmlinuz $kernel_path
|
||||
make clean
|
||||
cd -
|
||||
}
|
||||
|
||||
# build deploy kernel+ramdisk, then upload them to glance
|
||||
# this function sets ``IRONIC_DEPLOY_KERNEL_ID``, ``IRONIC_DEPLOY_RAMDISK_ID``
|
||||
function upload_baremetal_ironic_deploy {
|
||||
@ -816,7 +834,13 @@ function upload_baremetal_ironic_deploy {
|
||||
# we can build them only if we're not offline
|
||||
if [ "$OFFLINE" != "True" ]; then
|
||||
if is_deployed_with_ipa_ramdisk; then
|
||||
build_ipa_coreos_ramdisk $IRONIC_DEPLOY_KERNEL_PATH $IRONIC_DEPLOY_RAMDISK_PATH
|
||||
if [ "$IRONIC_RAMDISK_TYPE" == "coreos" ]; then
|
||||
build_ipa_coreos_ramdisk $IRONIC_DEPLOY_KERNEL_PATH $IRONIC_DEPLOY_RAMDISK_PATH
|
||||
elif [ "$IRONIC_RAMDISK_TYPE" == "tinyipa" ]; then
|
||||
build_tinyipa_ramdisk $IRONIC_DEPLOY_KERNEL_PATH $IRONIC_DEPLOY_RAMDISK_PATH
|
||||
else
|
||||
die $LINENO "Unrecognised IRONIC_RAMDISK_TYPE: $IRONIC_RAMDISK_TYPE. Expected 'coreos' or 'tinyipa'"
|
||||
fi
|
||||
else
|
||||
ramdisk-image-create $IRONIC_DEPLOY_FLAVOR \
|
||||
-o $TOP_DIR/files/ir-deploy-$IRONIC_DEPLOY_DRIVER
|
||||
|
Loading…
Reference in New Issue
Block a user