Este contenido no está disponible en el idioma seleccionado.

Chapter 4. Installing and configuring the Load-balancing service


When you deploy the Red Hat OpenStack Platform (RHOSP) Load-balancing service (octavia) using RHOSP director, you can decide to make its VM instances (amphorae) highly available. You also use director when you want to make configuration changes to the Load-balancing service.

4.1. Deploying the Load-balancing service

You use Red Hat OpenStack Platform (RHOSP) director to deploy the Load-balancing service (octavia). Director uses Orchestration service (heat) templates that are a set of plans for your environment. The undercloud imports these plans and follows their instructions to create the Load-balancing service and your RHOSP environment.

Prerequisites

  • Ensure that your environment has access to the octavia image.

Procedure

  • Run the deployment command and include the core heat templates, environment files, and the octavia.yaml heat template.

    Example

    $ openstack overcloud deploy --templates \
    -e <your_environment_files> \
    -e /usr/share/openstack-tripleo-heat-templates/environments/services/octavia.yaml
    Copy to Clipboard Toggle word wrap
    Note

    Director updates the amphorae to the latest amphora image during a stack update or upgrade.

You can make Load-balancing service instances (amphorae) highly available when you implement an active-standby topology using Red Hat OpenStack Platform (RHOSP) director. Director uses Orchestration service (heat) templates that are a set of plans for your environment. The undercloud imports these plans and follows their instructions to create the Load-balancing service and your RHOSP environment.

Prerequisites

  • Ensure that anti-affinity is enabled for the Compute service. This is the default.
  • A minimum of three Compute node hosts:

    • Two Compute node hosts to place the amphorae on different hosts (Compute anti-affinity).
    • A third host to successfully fail over an active-standby load balancer, when a problem arises.

Procedure

  1. Log in to the undercloud host as the stack user.
  2. Source the undercloud credentials file:

    $ source ~/stackrc
    Copy to Clipboard Toggle word wrap
  3. Create a custom YAML environment file.

    Example

    $ vi /home/stack/templates/my-octavia-environment.yaml
    Copy to Clipboard Toggle word wrap
  4. In the custom environment file, add the following parameter:

    parameter_defaults:
        OctaviaLoadBalancerTopology: "ACTIVE_STANDBY"
    Copy to Clipboard Toggle word wrap
  5. Run the deployment command and include the core heat templates, environment files, and this new custom environment file.

    Important

    The order of the environment files is important as the parameters and resources defined in subsequent environment files take precedence.

    Example

    $ openstack overcloud deploy --templates \
    -e <your_environment_files> \
    -e /usr/share/openstack-tripleo-heat-templates/environments/services/octavia.yaml \
    -e /home/stack/templates/my-octavia-environment.yaml
    Copy to Clipboard Toggle word wrap

Verification

  • After the deployment is complete and you have created a load balancer, run the following commands:

    $ source overcloudrc
    $ openstack loadbalancer amphora list
    Copy to Clipboard Toggle word wrap

    If your Load-balancing service instance highly available configuration is successful, you see output for two instances (amphorae), and no occurrence of role equaling SINGLE.

4.3. Changing Load-balancing service default settings

You make configuration changes to the Load-balancing service (octavia) using Red Hat OpenStack Platform (RHOSP) director. Director uses Orchestration service (heat) templates that are a set of plans for your environment. The undercloud imports these plans and follows their instructions to create the Load-balancing service and your RHOSP environment.

Prerequisites

  • Determine which RHOSP Orchestration service (heat) parameters that director already uses to deploy the Load-balancing service by consulting the following file on the undercloud:
/usr/share/openstack-tripleo-heat-templates/deployment/octavia/octavia-deployment-config.j2.yaml
Copy to Clipboard Toggle word wrap
  • Decide which parameters that you want to modify.

    Here are a few examples:

    • OctaviaControlNetwork

      The name of the neutron network used for the load-balancing management network.

    • OctaviaControlSubnetCidr

      The subnet for amphora control subnet in CIDR form.

      You can use this parameter to specify the amphora control subnet as an IPv6 CIDR. Using an IPv6 CIDR in OctaviaControlSubnetCidr requires you to also set IPv6 addresses in OctaviaControlSubnetPoolStart and OctaviaControlSubnetPoolEnd.

      Important

      This feature, using IPv6 CIDRs for the load-balancing management network, is available in this release as a Technology Preview, and therefore is not fully supported by Red Hat. It should only be used for testing, and should not be deployed in a production environment.

      For more information about Technology Preview features, see Scope of Coverage Details.

      Important

      After you have set CIDRs for the amphora control subnet, you cannot modify these values. This also means that you cannot upgrade from an IPv4 subnet to an IPv6 subnet.

    • OctaviaMgmtPortDevName

      The name of the octavia management network interface used for communication between octavia worker/health-manager with the amphora machine.

Procedure

  1. Log in to the undercloud host as the stack user.
  2. Source the undercloud credentials file:

    $ source ~/stackrc
    Copy to Clipboard Toggle word wrap
  3. Create a custom YAML environment file.

    Example

    $ vi /home/stack/templates/my-octavia-environment.yaml
    Copy to Clipboard Toggle word wrap
  4. Your environment file must contain the keywords parameter_defaults. Put your parameter value pairs after the parameter_defaults keyword.

    Example

    parameter_defaults:
        OctaviaMgmtPortDevName: "o-hm0"
        OctaviaControlNetwork: 'lb-mgmt-net'
        OctaviaControlSubnet: 'lb-mgmt-subnet'
        OctaviaControlSecurityGroup: 'lb-mgmt-sec-group'
        OctaviaControlSubnetCidr: '172.24.0.0/16'
        OctaviaControlSubnetGateway: '172.24.0.1'
        OctaviaControlSubnetPoolStart: '172.24.0.2'
        OctaviaControlSubnetPoolEnd: '172.24.255.254'
    Copy to Clipboard Toggle word wrap
  5. Run the deployment command and include the core heat templates, environment files, and this new custom environment file.

    Important

    The order of the environment files is important as the parameters and resources defined in subsequent environment files take precedence.

    Example

    $ openstack overcloud deploy --templates \
    -e <your_environment_files> \
    -e /usr/share/openstack-tripleo-heat-templates/environments/services/octavia.yaml \
    -e /home/stack/templates/my-octavia-environment.yaml
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat