Chapter 8: Neutron - Advanced Commands - Part 2

LBAAS v1

Todo

LBAAS v2

https://docs.openstack.org/mitaka/networking-guide/config-lbaas.html

  1. neutron net-create lbaas

  2. neutron subnet-create --name lbaas-subnet lbaas 192.168.2.0/24

  3. creating a load balancer

neutron lbaas-loadbalancer-create --name test-lb lbaas-subnet

  1. Show

neutron lbaas-loadbalancer-show test-lb

  1. Create a security group and rules to allow TCP port 80, TCP port 443, and all ICMP traffic:

neutron security-group-create lbaas

neutron security-group-rule-create --protocol tcp --direction ingress --port-range-min 80 --port-range-max 80 --remote-ip-prefix 0.0.0.0/0 lbaas

neutron security-group-rule-create --protocol tcp --direction egress --port-range-min 80 --port-range-max 80 --remote-ip-prefix 0.0.0.0/0 lbaas

  1. Apply the security group to the load balancer’s network port using vip_port_id from the lbaas-loadbalancer-show command:

neutron port-update --security-group lbaas 88f7c69f-5e32-44b6-ad40-75ee21e9ab24

  1. Associate the floating ip to the port

neutron floatingip-associate --fixed-ip-address 192.168.1.4 1d42efc8-e770-445d-a939-b2e15dfbb0c1 88f7c69f-5e32-44b6-ad40-75ee21e9ab24

  1. Verify that the load balancer is responding to pings before moving further:

ping <floating ip>

  1. Adding an HTTP listener

neutron lbaas-listener-create --name test-lb-http --loadbalancer test-lb --protocol TCP --protocol-port 80

  1. Adding members and pool

neutron lbaas-pool-create --name test-lb-pool-http --lb-algorithm ROUND_ROBIN --listener test-lb-http --protocol TCP

neutron lbaas-member-create --subnet lbaas-subnet --address 192.168.1.3 --protocol-port 80 test-lb-pool-http

neutron lbaas-member-create --subnet lbaas-subnet --address 192.168.1.5 --protocol-port 80 test-lb-pool-http

  1. Adding healthmonitor

neutron lbaas-healthmonitor-create --delay 30 --type PING --max-retries 3 --timeout 5 --pool test-lb-pool-http

results matching ""

    No results matching ""