Changing the default load balancer flavor

By default, a load balancer is created by using the private amphora flavor that cannot be managed via vinfra. You can, however, change it by using the OpenStack command-line tool.

Prerequisites

To change the default load balancer flavor

  1. Check if the default amphora flavor exists:

    # openstack --insecure flavor list --all
    +---------+---------+-------+------+-----------+-------+-----------+
    | ID      | Name    |   RAM | Disk | Ephemeral | VCPUs | Is Public |
    +---------+---------+-------+------+-----------+-------+-----------+
    | 100     | tiny    |   512 |    0 |         0 |     1 | True      |
    | 101     | small   |  2048 |    0 |         0 |     1 | True      |
    | 102     | medium  |  4096 |    0 |         0 |     2 | True      |
    | 103     | large   |  8192 |    0 |         0 |     4 | True      |
    | 104     | xlarge  | 16384 |    0 |         0 |     8 | True      |
    | amphora | amphora |  4096 |   30 |         0 |     2 | False     |
    +---------+---------+-------+------+-----------+-------+-----------+
    
  2. Delete this flavor:

    # openstack --insecure flavor delete amphora
    
  3. Create a new amphora flavor with custom parameters. For example:

    # openstack --insecure flavor create amphora --id amphora --ram 8192 \
    --vcpus 4 --disk 60 --private
    +----------------------------+---------+
    | Field                      | Value   |
    +----------------------------+---------+
    | OS-FLV-DISABLED:disabled   | False   |
    | OS-FLV-EXT-DATA:ephemeral  | 0       |
    | disk                       | 60      |
    | id                         | amphora |
    | name                       | amphora |
    | os-flavor-access:is_public | False   |
    | properties                 |         |
    | ram                        | 8192    |
    | rxtx_factor                | 1.0     |
    | swap                       |         |
    | vcpus                      | 4       |
    +----------------------------+---------+
    
  4. Change the load balancer flavor by performing its failover. For example:

    # openstack --insecure loadbalancer failover mylbaas
    

The load balancer mylbaas will be re-created with 4 vCPUs, 8 GB of RAM, and 30 GB of disk space.