Skip to content

Commit 51c5498

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "doc: Update LBaaS v2 setup for Liberty"
2 parents bf5f588 + 7e55068 commit 51c5498

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

doc/source/guides/devstack-with-lbaas-v2.rst

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
Configure Load-Balancer in Kilo
1+
Configure Load-Balancer Version 2
22
=================================
33

4-
The Kilo release of OpenStack will support Version 2 of the neutron load balancer. Until now, using OpenStack `LBaaS V2 <http://docs.openstack.org/api/openstack-network/2.0/content/lbaas_ext.html>`_ has required a good understanding of neutron and LBaaS architecture and several manual steps.
4+
Starting in the OpenStack Liberty release, the
5+
`neutron LBaaS v2 API <http://developer.openstack.org/api-ref-networking-v2-ext.html>`_
6+
is now stable while the LBaaS v1 API has been deprecated. The LBaaS v2 reference
7+
driver is based on Octavia.
58

69

710
Phase 1: Create DevStack + 2 nova instances
811
--------------------------------------------
912

10-
First, set up a vm of your choice with at least 8 GB RAM and 16 GB disk space, make sure it is updated. Install git and any other developer tools you find useful.
13+
First, set up a vm of your choice with at least 8 GB RAM and 16 GB disk space,
14+
make sure it is updated. Install git and any other developer tools you find useful.
1115

1216
Install devstack
1317

@@ -24,6 +28,7 @@ Edit your ``local.conf`` to look like
2428
[[local|localrc]]
2529
# Load the external LBaaS plugin.
2630
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
31+
enable_plugin octavia https://git.openstack.org/openstack/octavia
2732

2833
# ===== BEGIN localrc =====
2934
DATABASE_PASSWORD=password
@@ -42,13 +47,13 @@ Edit your ``local.conf`` to look like
4247
ENABLED_SERVICES+=,horizon
4348
# Nova
4449
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch
45-
IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
4650
# Glance
4751
ENABLED_SERVICES+=,g-api,g-reg
4852
# Neutron
4953
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta
50-
# Enable LBaaS V2
54+
# Enable LBaaS v2
5155
ENABLED_SERVICES+=,q-lbaasv2
56+
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
5257
# Cinder
5358
ENABLED_SERVICES+=,c-api,c-vol,c-sch
5459
# Tempest
@@ -69,11 +74,11 @@ Create two nova instances that we can use as test http servers:
6974
::
7075

7176
#create nova instances on private network
72-
nova boot --image $(nova image-list | awk '/ cirros-0.3.0-x86_64-disk / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node1
73-
nova boot --image $(nova image-list | awk '/ cirros-0.3.0-x86_64-disk / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node2
77+
nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node1
78+
nova boot --image $(nova image-list | awk '/ cirros-.*-x86_64-uec / {print $2}') --flavor 1 --nic net-id=$(neutron net-list | awk '/ private / {print $2}') node2
7479
nova list # should show the nova instances just created
7580

76-
#add secgroup rule to allow ssh etc..
81+
#add secgroup rules to allow ssh etc..
7782
neutron security-group-rule-create default --protocol icmp
7883
neutron security-group-rule-create default --protocol tcp --port-range-min 22 --port-range-max 22
7984
neutron security-group-rule-create default --protocol tcp --port-range-min 80 --port-range-max 80
@@ -91,9 +96,16 @@ Phase 2: Create your load balancers
9196
::
9297

9398
neutron lbaas-loadbalancer-create --name lb1 private-subnet
99+
neutron lbaas-loadbalancer-show lb1 # Wait for the provisioning_status to be ACTIVE.
94100
neutron lbaas-listener-create --loadbalancer lb1 --protocol HTTP --protocol-port 80 --name listener1
101+
sleep 10 # Sleep since LBaaS actions can take a few seconds depending on the environment.
95102
neutron lbaas-pool-create --lb-algorithm ROUND_ROBIN --listener listener1 --protocol HTTP --name pool1
103+
sleep 10
96104
neutron lbaas-member-create --subnet private-subnet --address 10.0.0.3 --protocol-port 80 pool1
105+
sleep 10
97106
neutron lbaas-member-create --subnet private-subnet --address 10.0.0.5 --protocol-port 80 pool1
98107

99-
Please note here that the "10.0.0.3" and "10.0.0.5" in the above commands are the IPs of the nodes (in my test run-thru, they were actually 10.2 and 10.4), and the address of the created LB will be reported as "vip_address" from the lbaas-loadbalancer-create, and a quick test of that LB is "curl that-lb-ip", which should alternate between showing the IPs of the two nodes.
108+
Please note here that the "10.0.0.3" and "10.0.0.5" in the above commands are the IPs of the nodes
109+
(in my test run-thru, they were actually 10.2 and 10.4), and the address of the created LB will be
110+
reported as "vip_address" from the lbaas-loadbalancer-create, and a quick test of that LB is
111+
"curl that-lb-ip", which should alternate between showing the IPs of the two nodes.

0 commit comments

Comments
 (0)