diff --git a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install index 609085d..5011f3a 100755 --- a/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install +++ b/dib/ironic-python-agent-ramdisk/install.d/ironic-python-agent-ramdisk-source-install/60-ironic-python-agent-ramdisk-install @@ -10,6 +10,7 @@ export LC_ALL=C.UTF-8 SCRIPTDIR=$(dirname $0) IPADIR=/tmp/ironic-python-agent +IRLIBDIR=/tmp/ironic-lib UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt VENVDIR=/opt/ironic-python-agent # 19.1.1 is required for cryptography. @@ -52,6 +53,11 @@ $VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS $IPADIR ln -s $VENVDIR/bin/ironic-python-agent /usr/local/bin/ ln -s $VENVDIR/bin/ironic-collect-introspection-data /usr/local/bin/ +# install ironic-lib from source if requested +if [ ${IRONIC_LIB_FROM_SOURCE:-false} == "true" ]; then + $VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS -r $IRLIBDIR/requirements.txt + $VENVDIR/bin/pip install $IRLIBDIR +fi case "$DIB_INIT_SYSTEM" in upstart) diff --git a/dib/ironic-python-agent-ramdisk/source-repository-ironic-lib b/dib/ironic-python-agent-ramdisk/source-repository-ironic-lib new file mode 100644 index 0000000..183f5a9 --- /dev/null +++ b/dib/ironic-python-agent-ramdisk/source-repository-ironic-lib @@ -0,0 +1 @@ +ironic-lib git /tmp/ironic-lib https://opendev.org/openstack/ironic-lib diff --git a/doc/source/admin/dib.rst b/doc/source/admin/dib.rst index 964600d..3564524 100644 --- a/doc/source/admin/dib.rst +++ b/doc/source/admin/dib.rst @@ -76,6 +76,14 @@ To use a specific branch of ironic-python-agent, use: export DIB_REPOREF_ironic_python_agent=origin/stable/queens export DIB_REPOREF_requirements=origin/stable/queens +To build ironic-lib from source, do: + +.. code-block:: bash + + export IRONIC_LIB_FROM_SOURCE=true + # Optionally: + #export DIB_REPOREF_ironic_lib= + To build image for architectures other than amd64, you can either set the ``ARCH`` environment variable or use ``-a`` to specify the target architecture: diff --git a/releasenotes/notes/ironic-lib-6a16f13fc6ec9a50.yaml b/releasenotes/notes/ironic-lib-6a16f13fc6ec9a50.yaml new file mode 100644 index 0000000..b684ac2 --- /dev/null +++ b/releasenotes/notes/ironic-lib-6a16f13fc6ec9a50.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Supports installing ironic-lib from source in the DIB build. Set + :: + + export IRONIC_LIB_FROM_SOURCE=true + + to use.