Message ID | 20170810202023.26636-1-russell@ovn.org |
---|---|
State | Accepted |
Headers | show |
On Thu, Aug 10, 2017 at 04:20:23PM -0400, Russell Bryant wrote: > ovs-sandbox comes with a script to quickly set up a simple > OVN configuration, ovn-setup.sh. This script set up config in the OVN > northbound database, but didn't create the corresponding ports on > br-int. Add that to save another step in provisioning this simple > environment. > > Add "ovn-sbctl show" output as well, to follow the existing "ovn-nbctl > show" output. > > Signed-off-by: Russell Bryant <russell@ovn.org> I haven't used this script, and I didn't test it, but it seems reasonable to me. Feel free to ask or wait for a more thorough review, if you prefer. Acked-by: Ben Pfaff <blp@ovn.org>
On Thu, Aug 10, 2017 at 4:43 PM, Ben Pfaff <blp@ovn.org> wrote: > On Thu, Aug 10, 2017 at 04:20:23PM -0400, Russell Bryant wrote: >> ovs-sandbox comes with a script to quickly set up a simple >> OVN configuration, ovn-setup.sh. This script set up config in the OVN >> northbound database, but didn't create the corresponding ports on >> br-int. Add that to save another step in provisioning this simple >> environment. >> >> Add "ovn-sbctl show" output as well, to follow the existing "ovn-nbctl >> show" output. >> >> Signed-off-by: Russell Bryant <russell@ovn.org> > > I haven't used this script, and I didn't test it, but it seems > reasonable to me. Feel free to ask or wait for a more thorough review, > if you prefer. > > Acked-by: Ben Pfaff <blp@ovn.org> Thanks. It works for me. I'm not too worried so I applied this to master. FWIW, here's what it gives you, 2 logical switches connected by a router with a port on each switch. === ovn-nbctl show === switch 34bfbfec-423e-4a8c-9aef-31e1a847c601 (sw1) port sw1-port1 addresses: ["50:54:00:00:00:03 11.0.0.2"] port lrp1-attachment type: router addresses: ["00:00:00:00:ff:02"] router-port: lrp1 switch f33fce42-66dc-4439-9070-c2b09623133d (sw0) port sw0-port1 addresses: ["50:54:00:00:00:01 192.168.0.2"] port lrp0-attachment type: router addresses: ["00:00:00:00:ff:01"] router-port: lrp0 router 84e3352f-8fed-4b3b-99d4-92ccd2e4310f (lr0) port lrp1 mac: "00:00:00:00:ff:02" networks: ["11.0.0.1/24"] port lrp0 mac: "00:00:00:00:ff:01" networks: ["192.168.0.1/24"] === ovn-sbctl show === Chassis "chassis-1" hostname: sandbox Encap geneve ip: "127.0.0.1" options: {csum="true"} Port_Binding "sw0-port1" Port_Binding "sw1-port1"
diff --git a/tutorial/ovn-setup.sh b/tutorial/ovn-setup.sh index dc4c813b1..943ca58ed 100755 --- a/tutorial/ovn-setup.sh +++ b/tutorial/ovn-setup.sh @@ -23,5 +23,13 @@ ovn-nbctl lsp-set-type lrp1-attachment router ovn-nbctl lsp-set-addresses lrp1-attachment 00:00:00:00:ff:02 ovn-nbctl lsp-set-options lrp1-attachment router-port=lrp1 +ovs-vsctl add-port br-int p1 -- \ + set Interface p1 external_ids:iface-id=sw0-port1 +ovs-vsctl add-port br-int p2 -- \ + set Interface p2 external_ids:iface-id=sw1-port1 + # View a summary of the configuration +printf "\n=== ovn-nbctl show ===\n\n" ovn-nbctl show +printf "\n=== ovn-sbctl show ===\n\n" +ovn-sbctl show
ovs-sandbox comes with a script to quickly set up a simple OVN configuration, ovn-setup.sh. This script set up config in the OVN northbound database, but didn't create the corresponding ports on br-int. Add that to save another step in provisioning this simple environment. Add "ovn-sbctl show" output as well, to follow the existing "ovn-nbctl show" output. Signed-off-by: Russell Bryant <russell@ovn.org> --- tutorial/ovn-setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+)