From b20d64bdc356f9a6f54dd45b4e90dd4c1adbe7c4 Mon Sep 17 00:00:00 2001 From: Bjoern Teipel Date: Fri, 21 Feb 2020 15:30:16 -0600 Subject: [PATCH] Update octavia configuration documentation The Configuring the Octavia Load Balancing service documentation is updated for Queens and upwards along with isolating pip package installations into a virtual environment Change-Id: I3ba16015e427afb92c8e99db3d4b3d311d7074df --- doc/source/configure-octavia.rst | 49 +++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/doc/source/configure-octavia.rst b/doc/source/configure-octavia.rst index 7e13f313..7f1088e4 100644 --- a/doc/source/configure-octavia.rst +++ b/doc/source/configure-octavia.rst @@ -84,25 +84,24 @@ Building Octavia images Images using the ``diskimage-builder`` must be built outside of a container. For this process, use one of the physical hosts within the environment. -#. Install the necessary packages: +#. Install the necessary packages and configure a Python virtual environment .. code-block:: bash apt-get install qemu uuid-runtime curl kpartx git jq python-pip + pip install virtualenv -#. Install the necessary pip packages: + virtualenv /opt/octavia-image-build + source /opt/octavia-image-build/bin/activate - .. code-block:: bash - - pip install argparse Babel>=1.3 dib-utils PyYAML - -#. Clone the necessary repositories +#. Clone the necessary repositories and dependencies .. code-block:: bash git clone https://opendev.org/openstack/octavia.git - git clone https://opendev.org/openstack/diskimage-builder.git + /opt/octavia-image-build/bin/pip install --isolated \ + git+https://git.openstack.org/openstack/diskimage-builder.git #. Run Octavia's diskimage script @@ -112,13 +111,20 @@ For this process, use one of the physical hosts within the environment. ./diskimage-create.sh + Disable ``octavia-image-build`` venv: + + .. code-block:: bash + + deactivate + #. Upload the created user images into the Image (glance) Service: .. code-block:: bash - glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ - --container-format bare --tags octavia-amphora-image /dev/null || {apt-get install python-pip} - pip install argparse Babel>=1.3 dib-utils PyYAML + pip install virtualenv + virtualenv /opt/octavia-image-build || exit 1 + source /opt/octavia-image-build/bin/activate + pushd /tmp git clone https://opendev.org/openstack/octavia.git - git clone https://opendev.org/openstack/diskimage-builder.git - pushd octavia/diskimage-create + /opt/octavia-image-build/bin/pip install --isolated \ + git+https://git.openstack.org/openstack/diskimage-builder.git + + pushd octavia/diskimage-create ./diskimage-create.sh mv amphora-x64-haproxy.qcow2 /tmp + deactivate + popd popd - #upload image - glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ - --container-format bare --tags octavia-amphora-image