8.12. Changing the Default Load Balancer Flavor

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

  1. Generate the admin OpenRC file:

    # kolla-ansible post-deploy
    # source /etc/kolla/admin-openrc.sh
    
  2. 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 |  1024 |   10 |         0 |     2 | False     |
    +---------+---------+-------+------+-----------+-------+-----------+
    
  3. Delete this flavor:

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

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

    # openstack --insecure loadbalancer failover mylbaas
    

The load balancer mylbaas will be recreated with 4 vCPUs, 4 GB of RAM, and 15 GB of disk space.