[ovs-dev,v2,2/2,ovn] Support starting containers with unix socket
diff mbox series

Message ID 20190919204458.63231-2-amginwal@gmail.com
State New
Headers show
Series
  • [ovs-dev,v2,1/2,ovn] OVN: Fix container build.
Related show

Commit Message

aginwala aginwala Sept. 19, 2019, 8:44 p.m. UTC
From: Aliasgar Ginwala <aginwala@ebay.com>

Signed-off-by: Aliasgar Ginwala <aginwala@ebay.com>
---
 Documentation/intro/install/general.rst | 14 ++++++++++++++
 utilities/docker/start-ovn              |  9 +++++++++
 2 files changed, 23 insertions(+)

Patch
diff mbox series

diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
index 4936540fb..bbf05723b 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -449,6 +449,20 @@  Start OVN containers using below command::
     $ docker run -itd --net=host --name=ovn-northd \
       <docker_repo>:<tag> ovn-northd-tcp
 
+Start OVN containers using unix socket::
+
+    $ docker run -itd --net=host --name=ovn-nb \
+      -v /var/run/ovn/:/var/run/ovn/ \
+      <docker_repo>:<tag> ovn-nb
+
+    $ docker run -itd --net=host --name=ovn-sb \
+      -v /var/run/ovn/:/var/run/ovn/
+      <docker_repo>:<tag> ovn-sb
+
+    $ docker run -itd --net=host --name=ovn-northd \
+      -v /var/run/ovn/:/var/run/ovn/
+      <docker_repo>:<tag> ovn-northd
+
 .. note::
     Current ovn central components comes up in docker image in a standalone
     mode with protocol tcp.
diff --git a/utilities/docker/start-ovn b/utilities/docker/start-ovn
index 7457836fe..fbdd2af91 100755
--- a/utilities/docker/start-ovn
+++ b/utilities/docker/start-ovn
@@ -13,6 +13,15 @@ 
 # limitations under the License.
 
 case $1 in
+        "ovn-nb") /usr/share/ovn/scripts/ovn-ctl run_nb_ovsdb
+        ;;
+        "ovn-sb") /usr/share/ovn/scripts/ovn-ctl run_sb_ovsdb
+        ;;
+        "ovn-northd") ovn-northd --pidfile \
+                      --ovnnb-db="unix:/var/run/ovn/ovnnb_db.sock" \
+                      --ovnsb-db="unix:/var/run/ovn/ovnsb_db.sock" \
+                      --log-file=/var/log/ovn/ovn-northd.log
+        ;;
         "ovn-nb-tcp") source /etc/ovn/ovn_default_nb_port
                       /usr/share/ovn/scripts/ovn-ctl start_ovsdb
                       ovn-nbctl set-connection ptcp:$nb_db_port