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
This commit is contained in:
Bjoern Teipel 2020-02-21 15:30:16 -06:00
parent 128f6ea134
commit b20d64bdc3

View File

@ -84,25 +84,24 @@ Building Octavia images
Images using the ``diskimage-builder`` must be built outside of a container. Images using the ``diskimage-builder`` must be built outside of a container.
For this process, use one of the physical hosts within the environment. 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 .. code-block:: bash
apt-get install qemu uuid-runtime curl kpartx git jq python-pip 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 #. Clone the necessary repositories and dependencies
pip install argparse Babel>=1.3 dib-utils PyYAML
#. Clone the necessary repositories
.. code-block:: bash .. code-block:: bash
git clone https://opendev.org/openstack/octavia.git 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 #. Run Octavia's diskimage script
@ -112,13 +111,20 @@ For this process, use one of the physical hosts within the environment.
./diskimage-create.sh ./diskimage-create.sh
Disable ``octavia-image-build`` venv:
.. code-block:: bash
deactivate
#. Upload the created user images into the Image (glance) Service: #. Upload the created user images into the Image (glance) Service:
.. code-block:: bash .. code-block:: bash
glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ openstack image create --disk-format qcow2 \
--container-format bare --tags octavia-amphora-image </var/lib/octavia/amphora-x64-haproxy.qcow2 --container-format bare --tag octavia-amphora-image --file amphora-x64-haproxy.qcow2 \
--private --project service amphora-x64-haproxy
.. note:: .. note::
Alternatively you can specify the new image in the appropriate settings and rerun the Alternatively you can specify the new image in the appropriate settings and rerun the
@ -132,20 +138,31 @@ Here is a script to perform all those tasks at once:
.. code-block:: bash .. code-block:: bash
#/bin/sh #/bin/sh
apt-get install qemu uuid-runtime curl kpartx git jq apt-get install qemu uuid-runtime curl kpartx git jq
pip -v >/dev/null || {apt-get install python-pip} pip -v >/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 pushd /tmp
git clone https://opendev.org/openstack/octavia.git 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
pushd octavia/diskimage-create pushd octavia/diskimage-create
./diskimage-create.sh ./diskimage-create.sh
mv amphora-x64-haproxy.qcow2 /tmp mv amphora-x64-haproxy.qcow2 /tmp
deactivate
popd popd
popd popd
#upload image
glance image-create --name amphora-x64-haproxy --visibility private --disk-format qcow2 \ # upload image
--container-format bare --tags octavia-amphora-image </var/lib/octavia/amphora-x64-haproxy.qcow2 openstack image delete amphora-x64-haproxy
openstack image create --disk-format qcow2 \
--container-format bare --tag octavia-amphora-image --file /tmp/amphora-x64-haproxy.qcow2 \
--private --project service amphora-x64-haproxy
.. note:: .. note::
If you have trouble installing dib-utils from pipy consider If you have trouble installing dib-utils from pipy consider