Merge "Add DIB element octavia-lib"
This commit is contained in:
commit
954cf8afb3
|
@ -34,6 +34,8 @@ function octavia_lib_install {
|
|||
if use_library_from_git "octavia-lib"; then
|
||||
git_clone_by_name "octavia-lib"
|
||||
setup_dev_lib "octavia-lib"
|
||||
export DIB_REPOLOCATION_octavia_lib=${GITDIR["octavia-lib"]}
|
||||
export DIB_REPOREF_octavia_lib=$(git --git-dir="${GITDIR["octavia-lib"]}/.git" log -1 --pretty="format:%H")
|
||||
else
|
||||
pip_install_gr octavia-lib
|
||||
fi
|
||||
|
|
|
@ -218,6 +218,18 @@ DIB_REPOREF_amphora_agent
|
|||
- Example: stable/stein
|
||||
- Example: refs/changes/40/674140/7
|
||||
|
||||
DIB_REPOLOCATION_octavia_lib
|
||||
- Location of the octavia-lib code that will be installed in the image.
|
||||
- Default: https://opendev.org/openstack/octavia-lib
|
||||
- Example: /tmp/octavia-lib
|
||||
|
||||
DIB_REPOREF_octavia_lib
|
||||
- The Git reference to checkout for the octavia-lib code inside the
|
||||
image.
|
||||
- Default: master or stable branch for released OpenStack series installs.
|
||||
- Example: stable/ussuri
|
||||
- Example: refs/changes/19/744519/2
|
||||
|
||||
DIB_REPOLOCATION_upper_constraints
|
||||
- Location of the upper-constraints.txt file used for the image.
|
||||
- Default: The upper-constraints.txt for the current branch
|
||||
|
|
|
@ -433,6 +433,7 @@ fi
|
|||
AMP_element_sequence="$AMP_element_sequence rebind-sshd"
|
||||
AMP_element_sequence="$AMP_element_sequence no-resolvconf"
|
||||
AMP_element_sequence="$AMP_element_sequence amphora-agent"
|
||||
AMP_element_sequence="$AMP_element_sequence octavia-lib"
|
||||
AMP_element_sequence="$AMP_element_sequence sos"
|
||||
AMP_element_sequence="$AMP_element_sequence cloud-init-datasources"
|
||||
AMP_element_sequence="$AMP_element_sequence remove-default-ints"
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
Element to install octavia-lib from a Git source.
|
||||
|
||||
This element allows octavia-lib installs from an arbitraty Git repository.
|
||||
This is especially useful for development environments.
|
||||
|
||||
By default, octavia-lib is installed from upstream master branch or from an
|
||||
upstream stable branch for OpenStack release series.
|
||||
|
||||
To install from an alternative Git location, define the following:
|
||||
|
||||
.. sourcecode:: sh
|
||||
|
||||
DIB_REPOLOCATION_octavia_lib=<path/to/octavia-lib>
|
||||
DIB_REPOREF_octavia_lib=<branch or ref>
|
||||
|
||||
If you wish to build an image using code from a Gerrit review, you can set
|
||||
``DIB_REPOLOCATION_octavia_lib`` and ``DIB_REPOREF_octavia_lib`` to the values
|
||||
given by Gerrit in the fetch/pull section of a review. For example, installing
|
||||
octavia-lib with change 744519 at patchset 2:
|
||||
|
||||
.. sourcecode:: sh
|
||||
|
||||
DIB_REPOLOCATION_octavia_lib=https://review.opendev.org/openstack/octavia-lib
|
||||
DIB_REPOREF_octavia_lib=refs/changes/19/744519/2
|
|
@ -0,0 +1,2 @@
|
|||
source-repositories
|
||||
amphora-agent
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
AMP_VENV=/opt/amphora-agent-venv
|
||||
|
||||
sed -i 's|octavia-lib|#octavia-lib|' /opt/upper-constraints.txt
|
||||
$AMP_VENV/bin/pip install -U -c /opt/upper-constraints.txt /opt/octavia-lib
|
||||
|
||||
# Let's capture the git reference we installed in the venv
|
||||
git --git-dir=/opt/octavia-lib/.git rev-parse HEAD >> /opt/octavia-lib.gitref
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
[ "${DIB_INSTALLTYPE_octavia_lib:-}" = "package" ] && exit 0
|
||||
|
||||
rm -rf /opt/octavia-lib
|
|
@ -0,0 +1,2 @@
|
|||
# This is used for source-based builds
|
||||
octavia-lib git /opt/octavia-lib https://opendev.org/openstack/octavia-lib
|
Loading…
Reference in New Issue