Merge stsstack-bundles:make-octavia-ovn-optional into stsstack-bundles:master

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: d45356fdaa4cbc4cbbb2cb7dab288d4f7479c9b4
Proposed branch: stsstack-bundles:make-octavia-ovn-optional
Merge into: stsstack-bundles:master
Diff against target: 93 lines (+33/-25)
3 files modified
openstack/pipeline/02configure (+31/-24)
overlays/octavia-ovn-provider.yaml (+2/-0)
overlays/octavia-ovn.yaml (+0/-1)
Reviewer Review Type Date Requested Status
Felipe Reyes Approve
Review via email: mp+402403@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

Looks good.

Minor suggestions that can go in this patch or separate one.

--octavia increases memory constraint for nova compute unit and there are messages/steps printed related to Amphora. These can be avoided if user selects overlay --octavia-ovn-provider

Revision history for this message
Felipe Reyes (freyes) wrote :

On Fri, 2021-05-07 at 11:59 +0000, Hemanth Nakkina wrote:
> Looks good.
>
> Minor suggestions that can go in this patch or separate one.
>
> --octavia increases memory constraint for nova compute unit and there
> are messages/steps printed related to Amphora. These can be avoided if
> user selects overlay --octavia-ovn-provider

I don't think that's true, because when --octavia-ovn-provider is
found, it is adding --octavia and --ovn to the command line to be
processed later

+ set -- $@ --octavia && cache $@
+ set -- $@ --ovn && cache $@

--
Felipe Reyes
Software Sustaining Engineer @ Canonical
# Email: <email address hidden> (GPG:0x9B1FFF39)
# Launchpad: ~freyes | IRC: freyes

Revision history for this message
Felipe Reyes (freyes) wrote :

LGTM

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

@freyes I think @hemanth-n is referring to the fact that when the OVN backend is enabled, Octavia no longer uses Amphora vms or images so there is no need to print those steps in the instructions.

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

patch updated

Revision history for this message
Felipe Reyes (freyes) wrote :

On Fri, 2021-05-07 at 15:37 +0000, Edward Hope-Morley wrote:
> @freyes I think @hemanth-n is referring to the fact that when the OVN
> backend is enabled, Octavia no longer uses Amphora vms or images so
> there is no need to print those steps in the instructions.
gotcha, it was the other way around.

--
Felipe Reyes
Software Sustaining Engineer @ Canonical
# Email: <email address hidden> (GPG:0x9B1FFF39)
# Launchpad: ~freyes | IRC: freyes

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/openstack/pipeline/02configure b/openstack/pipeline/02configure
2index d01133a..c954011 100644
3--- a/openstack/pipeline/02configure
4+++ b/openstack/pipeline/02configure
5@@ -336,38 +336,45 @@ do
6 MOD_OVERLAYS+=( "octavia-ovs.yaml" )
7 fi
8 MOD_OVERLAYS+=( "octavia.yaml" )
9- MOD_PARAMS[__AMPHORA_SSH_PUB_KEY__]="`get_amphora_ssh_pub_key`"
10- # This equates to m1.large (rather than m1.medium) which should
11- # allow creating 1x ubunu vm + 1x amphora vm on the same host thus
12- # avoiding the need for > 1 compute host.
13- MOD_PARAMS[__NOVA_COMPUTE_UNIT_CONSTRAINTS__]="mem=8G"
14 if has_opt --openstack-dashboard*; then
15 MOD_OVERLAYS+=( "octavia-dashboard.yaml" )
16 fi
17- if ! has_opt --no-octavia-diskimage-retrofit; then
18- # By default we let retrofit use images uploaded by the post-deploy configure script.
19- MOD_OVERLAYS+=( "octavia-diskimage-retrofit.yaml" )
20- MOD_PARAMS[__OCTAVIA_RETROFIT_UCA__]=`get_ost_release`
21- if ! has_opt --octavia-diskimage-retrofit-glance-simplestreams; then
22- MOD_OVERLAYS+=( "octavia-diskimage-retrofit-glance.yaml" )
23+ # no amphora if using ovn provider
24+ if ! has_opt --octavia-ovn-provider; then
25+ MOD_PARAMS[__AMPHORA_SSH_PUB_KEY__]="`get_amphora_ssh_pub_key`"
26+ # This equates to m1.large (rather than m1.medium) which should
27+ # allow creating 1x ubunu vm + 1x amphora vm on the same host thus
28+ # avoiding the need for > 1 compute host.
29+ MOD_PARAMS[__NOVA_COMPUTE_UNIT_CONSTRAINTS__]="mem=8G"
30+ if ! has_opt --no-octavia-diskimage-retrofit; then
31+ # By default we let retrofit use images uploaded by the post-deploy configure script.
32+ MOD_OVERLAYS+=( "octavia-diskimage-retrofit.yaml" )
33+ MOD_PARAMS[__OCTAVIA_RETROFIT_UCA__]=`get_ost_release`
34+ if ! has_opt --octavia-diskimage-retrofit-glance-simplestreams; then
35+ MOD_OVERLAYS+=( "octavia-diskimage-retrofit-glance.yaml" )
36+ fi
37 fi
38+ MOD_MSGS[octavia.0]="you need to to create an amphora image before you can use Octavia"
39+ MOD_MSGS[octavia.1]="this can be done in one of two ways:"
40+ MOD_MSGS[octavia.2]="run ./tools/upload_octavia_amphora_image.sh --release $release to use a pre-created image (recommended)"
41+ MOD_MSGS[octavia.3]="create a new image with 'juju run-action octavia-diskimage-retrofit/0 --wait retrofit-image source-image=<uuid>' with id of image in Glance to use as base"
42 fi
43- MOD_MSGS[octavia.0]="you need to to create an amphora image before you can use Octavia"
44- MOD_MSGS[octavia.1]="this can be done in one of two ways:"
45- MOD_MSGS[octavia.2]="run ./tools/upload_octavia_amphora_image.sh --release $release to use a pre-created image (recommended)"
46- MOD_MSGS[octavia.3]="create a new image with 'juju run-action octavia-diskimage-retrofit/0 --wait retrofit-image source-image=<uuid>' with id of image in Glance to use as base"
47 if has_opt --octavia-ipv4; then
48 MOD_MSGS[octavia.4]="run tools/create_ipv4_octavia.sh"
49 fi
50- MOD_MSGS[octavia.5]="then run tools/configure_octavia.sh to finish setting up octavia"
51- MOD_MSGS[octavia.6]="create vm for testing"
52- MOD_MSGS[octavia.7]="./tools/instance_launch.sh 1 bionic"
53- MOD_MSGS[octavia.8]="add floating ip to vm with ./tools/float_all.sh "
54- MOD_MSGS[octavia.9]="go and install e.g. apache2 on vm so that port 80 is open"
55- MOD_MSGS[octavia.10]="create loadbalancer from script"
56- MOD_MSGS[octavia.11]="./tools/create_octavia_lb.sh"
57- MOD_MSGS[octavia.12]="alternatively manually create loadbalancer"
58- MOD_MSGS[octavia.13]="openstack loadbalancer create --name lb2 --vip-network-id lb-mgmt"
59+ MOD_MSGS[octavia.5]="run tools/configure_octavia.sh to finish setting up octavia"
60+ MOD_MSGS[octavia.6]="create vm for testing e.g. ./tools/instance_launch.sh 1 focal"
61+ MOD_MSGS[octavia.7]="add floating ip to vm with ./tools/float_all.sh "
62+ MOD_MSGS[octavia.8]="install e.g. apache2 on the vm so it listens on port 80"
63+ MOD_MSGS[octavia.9]="create loadbalancer i.e. ./tools/create_octavia_lb.sh --member-vm <uuid from prev step>"
64+ MOD_MSGS[octavia.10]="alternatively manually create loadbalancer"
65+ MOD_MSGS[octavia.11]="openstack loadbalancer create --name lb2 --vip-network-id lb-mgmt"
66+ ;;
67+ --octavia-ovn-provider)
68+ MOD_OVERLAYS+=( "octavia-ovn-provider.yaml" )
69+ # ensure octavia and ovn
70+ set -- $@ --octavia && cache $@
71+ set -- $@ --ovn && cache $@
72 ;;
73 --octavia-ha*)
74 get_units $1 __NUM_OCTAVIA_UNITS__ 3
75diff --git a/overlays/octavia-ovn-provider.yaml b/overlays/octavia-ovn-provider.yaml
76new file mode 100644
77index 0000000..396c4f7
78--- /dev/null
79+++ b/overlays/octavia-ovn-provider.yaml
80@@ -0,0 +1,2 @@
81+relations:
82+ - [ octavia:ovsdb-cms, ovn-central:ovsdb-cms ]
83diff --git a/overlays/octavia-ovn.yaml b/overlays/octavia-ovn.yaml
84index ec948ff..4173d7e 100644
85--- a/overlays/octavia-ovn.yaml
86+++ b/overlays/octavia-ovn.yaml
87@@ -3,6 +3,5 @@ applications:
88 charm: cs:~openstack-charmers-next/ovn-chassis
89 relations:
90 - [ octavia:ovsdb-subordinate, octavia-ovn-chassis:ovsdb-subordinate ]
91- - [ octavia:ovsdb-cms, ovn-central:ovsdb-cms ]
92 - [ octavia-ovn-chassis:ovsdb, ovn-central:ovsdb ]
93 - [ octavia-ovn-chassis:certificates, vault:certificates ]

Subscribers

People subscribed via source and target branches