Merge "Look for diskimage-builder not dib-utils when building amps" into stable/newton

This commit is contained in:
Jenkins 2017-03-30 19:22:57 +00:00 committed by Gerrit Code Review
commit 7c31b45509
6 changed files with 8 additions and 34 deletions

View File

@ -7,9 +7,7 @@ function octavia_install {
setup_develop $OCTAVIA_DIR
if ! [ "$DISABLE_AMP_IMAGE_BUILD" == 'True' ]; then
install_package qemu kpartx
git_clone $DISKIMAGE_BUILDER_REPO $DISKIMAGE_BUILDER_DIR $DISKIMAGE_BUILDER_BRANCH
git_clone $TRIPLEO_IMAGE_ELEMENTS_REPO $TRIPLEO_IMAGE_ELEMENTS_DIR $TRIPLEO_IMAGE_ELEMENTS_BRANCH
sudo -H -E pip install -r $DEST/diskimage-builder/requirements.txt
fi
}

View File

@ -14,31 +14,25 @@ Prerequisites
This script assumes a typical Linux environment and was developed on
Ubuntu 12.04.5 LTS.
Python pip should be installed as well as the following python modules:
| argparse
| Babel>=1.3
| dib-utils
| PyYAML
Python pip should be installed as well as the python modules found in the
requirements.txt file.
Your cache directory should have at least 1GB available, the working directory
will need ~1.5GB, and your image destination will need ~500MB
The script expects to find the diskimage-builder and tripleo-image-elements
The script expects to find the tripleo-image-elements
git repositories one directory above the Octavia git repository.
| /<some directory>/octavia
| /<some directory>/diskimage-builder
| /<some directory>/tripleo-image-elements
| cd /<some directory>
| git clone https://github.com/openstack/octavia.git
| git clone https://git.openstack.org/openstack/diskimage-builder.git
| git clone https://git.openstack.org/openstack/tripleo-image-elements.git
These paths can be overridden with the following environment variables:
The script will use the version of diskimage-builder installed on your system,
or it can be overridden by setting the following environment variables:
| OCTAVIA_REPO_PATH = /<some directory>/octavia
| DIB_REPO_PATH = /<some directory>/diskimage-builder
| DIB_ELEMENTS = /<some directory>/diskimage-builder/elements
| ELEMENTS_REPO_PATH = /<some directory>/tripleo-image-elements

View File

@ -289,25 +289,6 @@ else
fi
fi
# pip may not be installed from package managers
# only check that we find an executable
if ! which pip &> /dev/null; then
echo "Required executable pip not found. Exiting."
exit 1
fi
# "pip freeze" does not show argparse, even if it is explicitly installed,
# because it is part of the standard python library in 2.7.
# See https://github.com/pypa/pip/issues/1570
PKG_LIST="Babel dib-utils PyYAML"
for pkg in $PKG_LIST; do
if ! pip freeze 2>/dev/null| grep -q "^$pkg==" &>/dev/null; then
echo "Required python package " $pkg " is not installed. Exiting."
exit 1
fi
done
if [ "$AMP_WORKING_DIR" ]; then
mkdir -p $AMP_WORKING_DIR
TEMP=$(mktemp -d $AMP_WORKING_DIR/diskimage-create.XXXXXX)

View File

@ -1,4 +1,4 @@
Babel>=1.3
dib-utils
diskimage-builder
PyYAML
six>=1.9.0

View File

@ -33,6 +33,7 @@ pyOpenSSL>=0.14 # Apache-2.0
WSME>=0.8 # MIT
Jinja2>=2.8 # BSD License (3 clause)
taskflow>=1.26.0 # Apache-2.0
diskimage-builder>=1.1.2,!=1.6.0,!=1.7.0,!=1.7.1 # Apache-2.0
#for the amphora api
Flask!=0.11,<1.0,>=0.10 # BSD

View File

@ -77,7 +77,7 @@ commands = bandit -r octavia -ll -ii -x octavia/tests {posargs}
[flake8]
# Ignoring O321 because it's unnecessarily restricting use of json package.
# jsonutils version doesn't add additional value
ignore = O321
ignore = O321,E402,W503
show-source = true
builtins = _
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build