diff --git a/kb_build.sh b/kb_build.sh index dbcfc9a..b89f663 100644 --- a/kb_build.sh +++ b/kb_build.sh @@ -8,10 +8,22 @@ function check_in_venv { echo $IN_VENV } +function cleanup_qcow2 { + echo + echo "Error: found unrelated qcow2 files that would make the container image too large." + echo "Cleanup qcow2 files before re-running:" + ls -l *.qcow2 + exit 3 +} + # build the VM image first function build_vm { kb_image_name=kloudbuster-$KB_TAG + qcow_count=$(find . -name '*qcow2' | wc -l) if [ ! -f $kb_image_name.qcow2 ]; then + if [ $qcow_count -gt 0 ]; then + cleanup_qcow2 + fi echo "Building $kb_image_name.qcow2..." pip install diskimage-builder @@ -28,6 +40,9 @@ function build_vm { mv $kb_image_name.qcow2 .. cd .. else + if [ $qcow_count -gt 1 ]; then + cleanup_qcow2 + fi echo "Reusing $kb_image_name.qcow2" fi @@ -36,7 +51,10 @@ function build_vm { # Build container function build_container { + echo "docker build --tag=berrypatch/kloudbuster:$KB_TAG ." sudo docker build --tag=berrypatch/kloudbuster:$KB_TAG . + echo "sudo docker build --tag=berrypatch/kloudbuster:latest ." + sudo docker build --tag=berrypatch/kloudbuster:latest . } function help { diff --git a/requirements.txt b/requirements.txt index 62c5f06..8637e76 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,8 +11,8 @@ python-cinderclient>=2.0.1 python-glanceclient>=2.6.0 python-openstackclient>=3.11.0 python-neutronclient>=6.2.0 -# migrate security group API to neutron client before moving to nova client 8.0.0 -python-novaclient>=8.0.0 +# starting from 10.0.0, floating ip apis are removed from novaclient +python-novaclient>=9.0.0,<10.0.0 python-keystoneclient>=3.10.0 attrdict>=2.0.0 hdrhistogram>=0.5.2