0c9b39baf1
Migrate as much as we're initially able to over to be installed via Puppet instead of elements from tripleo-image-elements. This change is rather large, but it's all more or less inter-dependent so I wasn't able to break it up any finer. The bulk of the change is a new element, puppet-stack-config. That element installs a puppet manifest at /etc/puppet/manifests/puppet-stack-config.pp that is applied via puppet during the os-refresh-config phase of the installation. When the manifest is applied, it uses a hiera data file from /etc/puppet/hieradata/puppet-stack-config.yaml as input. That file is generated from a template. The Puppet modules require a handful of additional inputs for password and secret items. These inputs are added to the instack.answers.sample file and instack-install-undercloud. We're able to remove many items from the static json we're writing out to /var/lib/heat-cfntools/cfn-init-data, but we still need this for some configuration as not everything is driven via a Puppet module (os-net-config) for instance. Also kemoves some particular hooks scripts that are no longer needed in instack-undercloud. This fix-undercloud-package-installs element is no longer needed. It's addressing bugs that have already been fixed. Change-Id: I9b93569f193c58d3e98063a1a90c3946a3a886db
61 lines
1.7 KiB
Bash
Executable File
61 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
IMAGE_PATH=${IMAGE_PATH:-"."}
|
|
|
|
export DEPLOY_NAME=${DEPLOY_NAME:-deploy-ramdisk-ironic}
|
|
export DISCOVERY_NAME=${DISCOVERY_NAME:-discovery-ramdisk}
|
|
TFTP_ROOT=${TFTP_ROOT:-/tftpboot}
|
|
|
|
source <(sudo cat /root/stackrc)
|
|
|
|
OS_AUTH_URL=${OS_AUTH_URL:-""}
|
|
if [ -z "$OS_AUTH_URL" ]; then
|
|
echo "You must source a stackrc file for the Undercloud."
|
|
exit 1
|
|
fi
|
|
|
|
function check_image {
|
|
local image_name=$IMAGE_PATH/$1
|
|
|
|
if [ ! -f $image_name ]; then
|
|
echo "$image_name does not exist."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
function load_image {
|
|
local image_name=$IMAGE_PATH/$1
|
|
|
|
tripleo load-image -d $image_name
|
|
}
|
|
|
|
check_image $DEPLOY_NAME.initramfs
|
|
check_image $DEPLOY_NAME.kernel
|
|
check_image $DISCOVERY_NAME.initramfs
|
|
check_image $DISCOVERY_NAME.kernel
|
|
|
|
check_image overcloud-compute.qcow2
|
|
check_image overcloud-control.qcow2
|
|
|
|
load_image overcloud-compute.qcow2
|
|
load_image overcloud-control.qcow2
|
|
|
|
# Temporarily disabled while we use split images for compute and control
|
|
# check_image openstack-full.qcow2
|
|
# load_image openstack-full.qcow2
|
|
|
|
glance image-delete bm-deploy-kernel 2>/dev/null || :
|
|
glance image-create --name bm-deploy-kernel --is-public true \
|
|
--disk-format aki < $IMAGE_PATH/$DEPLOY_NAME.kernel
|
|
glance image-delete bm-deploy-ramdisk 2>/dev/null || :
|
|
glance image-create --name bm-deploy-ramdisk --is-public true \
|
|
--disk-format ari < $IMAGE_PATH/$DEPLOY_NAME.initramfs
|
|
|
|
deploy_kernel_id=$(glance image-show bm-deploy-kernel | awk ' / id / {print $4}')
|
|
deploy_ramdisk_id=$(glance image-show bm-deploy-ramdisk | awk ' / id / {print $4}')
|
|
|
|
sudo cp -f "$IMAGE_PATH/$DISCOVERY_NAME.kernel" "$TFTP_ROOT/discovery.kernel"
|
|
sudo cp -f "$IMAGE_PATH/$DISCOVERY_NAME.initramfs" "$TFTP_ROOT/discovery.ramdisk"
|