Merge ~hopem/stsstack-bundles:bug/1863230 into stsstack-bundles:master

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 787304d8fcf28ea8e0fe1379c8acbc8ccd5cad14
Proposed branch: ~hopem/stsstack-bundles:bug/1863230
Merge into: stsstack-bundles:master
Diff against target: 149 lines (+85/-5)
6 files modified
doc/openstack/octavia.md (+42/-0)
doc/openstack/ovn.md (+31/-0)
openstack/pipeline/02configure (+7/-4)
overlays/octavia-ovn.yaml (+3/-0)
overlays/octavia-ovs.yaml (+2/-0)
overlays/octavia.yaml (+0/-1)
Reviewer Review Type Date Requested Status
Jolly Bundlers Pending
Review via email: mp+381698@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ivan Hitos (ivanhitos) wrote :

lgtm

Revision history for this message
Seyeong Kim (seyeongkim) wrote :

not a big deal but could you please check my inline comment?

Revision history for this message
Edward Hope-Morley (hopem) wrote :

@xtrusia yes you are right, ill fix in my next patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/doc/openstack/octavia.md b/doc/openstack/octavia.md
2index e9d3a6f..218db89 100644
3--- a/doc/openstack/octavia.md
4+++ b/doc/openstack/octavia.md
5@@ -2,6 +2,14 @@
6
7 To deploy octavia as part of an Openstack deployment just add the --octavia overlay. Once deployed there are a few actions that must be taken to configure Octavia before it can be used.
8
9+NOTE: if you are using OVN as your neutron networking solution, you will need to perform the steps detailed in the ovn.md documentation before continuing
10+
11+Now you need to add an extra port to your nodes running neutron-openvswitch:
12+
13+```
14+./bin/add-data-ports.sh
15+```
16+
17 The following will download the Amphora image from (stsstack) Swift that corresponds to the deployed release of Openstack and upload it to your Glance.
18
19 ```
20@@ -15,3 +23,37 @@ tools/configure_octavia.sh
21 ```
22
23 https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-octavia.html
24+
25+## Using Octavia
26+
27+Create an instance and secgroup rules
28+
29+```
30+source novarc
31+./tools/sec_groups.sh &>2 &
32+./tools/instance_launch.sh 1 bionic
33+```
34+
35+Give it a floating ip and ensure it can be pinged (once booted)
36+```
37+./tools/float_all.sh
38+ping __FIP__
39+```
40+
41+Install apache
42+```
43+ssh __FIP__ -- 'sudo apt update; sudo apt install apache2 -y'
44+```
45+
46+Now create a loadbalancer adding the vm just created to the LB pool
47+```
48+tools/create_octavia_lb.sh __VM_UUID__
49+```
50+
51+Now check that your loadbalancer is up and load balancing to port 80 in the vm
52+
53+```
54+lb_vip=$(openstack loadbalancer show lb1 -c vip_address -f value)
55+lb_fip=$(openstack floating ip list|egrep -v "\+-+|ID"| awk "\\$6==\\"$lb_vip\\" {print \\$4}")
56+nc -vz $lb_fip 80
57+```
58diff --git a/doc/openstack/ovn.md b/doc/openstack/ovn.md
59new file mode 100644
60index 0000000..a9960a4
61--- /dev/null
62+++ b/doc/openstack/ovn.md
63@@ -0,0 +1,31 @@
64+# Deploying OVN
65+
66+The 20.02 release of the Openstack charms introduced OVN as an alternative to straight Openvswitch networking for Neutron.
67+
68+To switch your networking to OVN simply use --ovn. You will need to be using the Openstack Train release or above.
69+
70+Once deployed you will need to perform a few post-deployment actions;
71+
72+First you need to unseal vault:
73+
74+```
75+./tools/vault-unseal-and-authorise.sh
76+```
77+
78+Since ovn requires vault to be deployed and used for cert management you need to install the vault-generated CA to be able to speak to endpoints:
79+
80+```
81+./tools/install_local_ca.sh
82+```
83+
84+Now you need to add an extra port to your nodes running ovn-chassis (this the port that will be used as the "external network"):
85+
86+```
87+./bin/add-data-ports.sh
88+```
89+
90+And of course run the post-deploment configuration to setup the deployed cloud:
91+
92+```
93+./configure.sh
94+```
95diff --git a/openstack/pipeline/02configure b/openstack/pipeline/02configure
96index 7d0b20b..646d4bb 100644
97--- a/openstack/pipeline/02configure
98+++ b/openstack/pipeline/02configure
99@@ -261,9 +261,13 @@ do
100 get_param $1 __CONSOLE_TYPE__ "REQUIRES: nova console access protocol:"
101 ;;
102 --octavia)
103- conflicts_with $1 --ovn
104- # >= Rocky
105- assert_min_release rocky "octavia"
106+ if `has_opt --ovn`; then
107+ assert_min_release train "octavia+ovn"
108+ MOD_OVERLAYS+=( "octavia-ovn.yaml" )
109+ else
110+ assert_min_release rocky "octavia"
111+ MOD_OVERLAYS+=( "octavia-ovs.yaml" )
112+ fi
113 MOD_OVERLAYS+=( "octavia.yaml" )
114 MOD_PARAMS[__AMPHORA_SSH_PUB_KEY__]="`get_amphora_ssh_pub_key`"
115 if has_opt --openstack-dashboard*; then
116@@ -329,7 +333,6 @@ do
117 MOD_OVERLAYS+=( "neutron-sg-logging.yaml" )
118 ;;
119 --ovn)
120- conflicts_with $1 --octavia
121 assert_min_release train "ovn"
122 get_param $1 __OVN_DATA_PORT__ 'REQUIRED: ovn-chassis bridge-interface-mappings (leave blank to set later):'
123 MOD_OVERLAYS+=( "neutron-ovn.yaml" )
124diff --git a/overlays/octavia-ovn.yaml b/overlays/octavia-ovn.yaml
125new file mode 100644
126index 0000000..a81fb1f
127--- /dev/null
128+++ b/overlays/octavia-ovn.yaml
129@@ -0,0 +1,3 @@
130+relations:
131+ - [ octavia:ovsdb-subordinate, ovn-chassis:ovsdb-subordinate ]
132+ - [ octavia:ovsdb-cms, ovn-central:ovsdb-cms ]
133diff --git a/overlays/octavia-ovs.yaml b/overlays/octavia-ovs.yaml
134new file mode 100644
135index 0000000..f6fe4d6
136--- /dev/null
137+++ b/overlays/octavia-ovs.yaml
138@@ -0,0 +1,2 @@
139+relations:
140+ - [ octavia:neutron-openvswitch, neutron-openvswitch:neutron-plugin ]
141diff --git a/overlays/octavia.yaml b/overlays/octavia.yaml
142index 7f6ba84..59e0fe8 100644
143--- a/overlays/octavia.yaml
144+++ b/overlays/octavia.yaml
145@@ -16,4 +16,3 @@ relations:
146 - [ octavia:identity-service, keystone:identity-service ]
147 - [ octavia:amqp, rabbitmq-server:amqp ]
148 - [ octavia:neutron-api, neutron-api:neutron-load-balancer ]
149- - [ octavia:neutron-openvswitch, neutron-openvswitch:neutron-plugin ]

Subscribers

People subscribed via source and target branches