Allow devstack to build ironic agent ramdisk

This provides a way to test Ironic-python-agent code that is
not yet merged.

Change-Id: I85084c383263173a33250592a95a17f46827b347
This commit is contained in:
Jim Rollenhagen 2014-08-15 01:08:11 +00:00
parent ddcde92e90
commit f00766b8bb
4 changed files with 21 additions and 3 deletions

View File

@ -1,3 +1,4 @@
docker.io
ipmitool
iptables
ipxe

View File

@ -1,3 +1,4 @@
docker-io
ipmitool
iptables
ipxe-bootimgs

View File

@ -29,6 +29,7 @@ set +o pipefail
# Set up default directories
IRONIC_DIR=$DEST/ironic
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
IRONIC_DATA_DIR=$DATA_DIR/ironic
IRONIC_STATE_PATH=/var/lib/ironic
IRONICCLIENT_DIR=$DEST/python-ironicclient
@ -558,6 +559,19 @@ function configure_ironic_auxiliary {
ironic_ssh_check $IRONIC_SSH_KEY_DIR/$IRONIC_SSH_KEY_FILENAME $IRONIC_VM_SSH_ADDRESS $IRONIC_VM_SSH_PORT $IRONIC_SSH_USERNAME 10
}
function build_ipa_coreos_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/coreos/build_coreos_image.sh
cp imagebuild/coreos/UPLOAD/coreos_production_pxe_image-oem.cpio.gz $ramdisk_path
cp imagebuild/coreos/UPLOAD/coreos_production_pxe.vmlinuz $kernel_path
sudo rm -rf UPLOAD
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 {
@ -582,8 +596,8 @@ function upload_baremetal_ironic_deploy {
if [ "$IRONIC_BUILD_DEPLOY_RAMDISK" = "True" ]; then
# we can build them only if we're not offline
if [ "$OFFLINE" != "True" ]; then
if [ "$IRONIC_DEPLOY_RAMDISK" == "agent_ssh" ]; then
die $LINENO "Ironic-python-agent build is not yet supported"
if [ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]; then
build_ipa_coreos_ramdisk $IRONIC_DEPLOY_KERNEL_PATH $IRONIC_DEPLOY_RAMDISK_PATH
else
ramdisk-image-create $IRONIC_DEPLOY_FLAVOR \
-o $TOP_DIR/files/ir-deploy

View File

@ -172,9 +172,11 @@ HORIZON_BRANCH=${HORIZON_BRANCH:-master}
HORIZONAUTH_REPO=${HORIZONAUTH_REPO:-${GIT_BASE}/openstack/django_openstack_auth.git}
HORIZONAUTH_BRANCH=${HORIZONAUTH_BRANCH:-master}
# baremetal provisionint service
# baremetal provisioning service
IRONIC_REPO=${IRONIC_REPO:-${GIT_BASE}/openstack/ironic.git}
IRONIC_BRANCH=${IRONIC_BRANCH:-master}
IRONIC_PYTHON_AGENT_REPO=${IRONIC_PYTHON_AGENT_REPO:-${GIT_BASE}/openstack/ironic-python-agent.git}
IRONIC_PYTHON_AGENT_BRANCH=${IRONIC_PYTHON_AGENT_BRANCH:-master}
# ironic client
IRONICCLIENT_REPO=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}