diff options
author | Dmitry Tantsur <divius.inside@gmail.com> | 2018-10-01 18:08:12 +0200 |
---|---|---|
committer | Dmitry Tantsur <divius.inside@gmail.com> | 2018-10-02 13:42:57 +0200 |
commit | 39d4891cf36c7bc7214219e0d5865c776b659251 (patch) | |
tree | 03dfff1a482ef38c783dbb9cf262924956776a1d /imagebuild | |
parent | c520f407f9f88d4f5f5491fcab528e4cb65e27d3 (diff) | |
download | ironic-python-agent-39d4891cf36c7bc7214219e0d5865c776b659251.tar.gz |
Allow using ironic-lib from source when building tinyipa
This change simplifies development of IPA by allowing to install
ironib-lib from a local checkout with modifications.
Change-Id: I142c6d389d94141db8bc9e3eeaae50a687bcd7b1
Diffstat (limited to 'imagebuild')
-rw-r--r-- | imagebuild/tinyipa/README.rst | 9 | ||||
-rwxr-xr-x | imagebuild/tinyipa/build-tinyipa.sh | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/imagebuild/tinyipa/README.rst b/imagebuild/tinyipa/README.rst index f18b1e76..68e1309e 100644 --- a/imagebuild/tinyipa/README.rst +++ b/imagebuild/tinyipa/README.rst @@ -135,3 +135,12 @@ If you want to collect BIOS given names of NICs in the inventory, set tinyipa:: export TINYIPA_REQUIRE_BIOSDEVNAME=true + +Using ironic-lib from source +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`ironic-lib <https://git.openstack.org/cgit/openstack/ironic-lib>`_ contains +important parts of the provisioning logic. If you need to build an IPA image +with your local checkout of `ironic-lib`, export the following variable:: + + export IRONIC_LIB_SOURCE=/absolute/path/to/ironic-lib/checkout diff --git a/imagebuild/tinyipa/build-tinyipa.sh b/imagebuild/tinyipa/build-tinyipa.sh index b41bf3e1..085eef23 100755 --- a/imagebuild/tinyipa/build-tinyipa.sh +++ b/imagebuild/tinyipa/build-tinyipa.sh @@ -8,6 +8,7 @@ BUILD_AND_INSTALL_TINYIPA=${BUILD_AND_INSTALL_TINYIPA:-false} TINYCORE_MIRROR_URL=${TINYCORE_MIRROR_URL:-} TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false} TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true} +IRONIC_LIB_SOURCE=${IRONIC_LIB_SOURCE:-} CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin" CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy" @@ -79,7 +80,18 @@ rm -rf *.egg-info python setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt +if [ -n "$IRONIC_LIB_SOURCE" ]; then + pushd $IRONIC_LIB_SOURCE + rm -rf *.egg-info + python setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet + cp requirements.txt $BUILDDIR/tmp/ironic-lib-requirements.txt + popd +fi + imagebuild/common/generate_upper_constraints.sh upper-constraints.txt +if [ -n "$IRONIC_LIB_SOURCE" ]; then + sed -i '/ironic-lib/d' upper-constraints.txt $BUILDDIR/tmp/ipa-requirements.txt +fi cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt echo Using upper-constraints: cat upper-constraints.txt @@ -120,6 +132,10 @@ $CHROOT_CMD pip install pbr $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels setuptools $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels pip $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt +if [ -n "$IRONIC_LIB_SOURCE" ]; then + $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ironic-lib-requirements.txt + $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-lib +fi $CHROOT_CMD pip wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-python-agent echo Resulting wheels: ls -1 $BUILDDIR/tmp/wheels |