Re: [ovs-dev] [PATCH v3 ovn] Containerize components
Ah I see, the issue is in syntax of automake.mk due to rebase with checkpatch.py: diff --git a/utilities/automake.mk b/utilities/automake.mk index 3142d177f..9b46940ae 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -28,7 +28,7 @@ EXTRA_DIST += \ utilities/ovn-trace.8.xml \ utilities/ovn-detrace.in \ utilities/ovndb-servers.ocf \ -utilities/checkpatch.py +utilities/checkpatch.py \ utilities/docker/Makefile \ utilities/docker/start-ovn \ utilities/docker/create_ovn_dbs.sh \ I just tried rebuilding newest docker image with this fix and it built fine: LM-SJC-11015761:ovn aginwala$ export OVN_BRANCH=ovn_container LM-SJC-11015761:ovn aginwala$ export OVN_VERSION=2.12 LM-SJC-11015761:ovn aginwala$ export KERNEL_VERSION=4.15.0-54-generic LM-SJC-11015761:ovn aginwala$ export DISTRO=debian LM-SJC-11015761:ovn aginwala$ export GITHUB_SRC=https://github.com/noah8713/ovn.git LM-SJC-11015761:ovn aginwala$ export DOCKER_REPO=aginwala/ovn LM-SJC-11015761:ovn aginwala$ cd utilities/ LM-SJC-11015761:utilities aginwala$ cd docker/ LM-SJC-11015761:docker aginwala$ make build Sent V4 to address the same. Regards, Aliasgar From: Numan Siddique Date: Wednesday, August 21, 2019 at 12:11 PM To: aginwala Cc: ovs dev , "Ginwala, Aliasgar" Subject: Re: [ovs-dev] [PATCH v3 ovn] Containerize components On Wed, Aug 21, 2019 at 10:38 PM mailto:amgin...@gmail.com>> wrote: From: Aliasgar Ginwala mailto:aginw...@ebay.com>> 1. Containerize ovn central components 2. Containerize ovn host 3. Update documentation about building/running ovn in containers. Signed-off-by: Aliasgar Ginwala mailto:aginw...@ebay.com>> Hi Aliasgar, There's something odd with this patch. I am not able to compile when I apply this patch. I get the below error ** cd . && /bin/sh /home/nusiddiq/workspace_cpp/ovn-org/ovn/build-aux/missing automake-1.16 --foreign Makefile cd . && /bin/sh ./config.status Makefile depfiles config.status: creating Makefile config.status: executing depfiles commands config.status: error: in `/home/nusiddiq/workspace_cpp/ovn-org/ovn': config.status: error: Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See `config.log' for more details make: *** [Makefile:1763: Makefile] Error 1 Thanks Numan --- Documentation/intro/install/general.rst | 83 utilities/automake.mk<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fautomake.mk=02%7C01%7Caginwala%40ebay.com%7C5c887b75459948d3c90208d7266b5201%7C46326bff992841a0baca17c16c94ea99%7C0%7C0%7C637020114699089802=IFwvFotxdpCE913klL68ZrPDXdzwgmocsXgP%2FBv3HtY%3D=0> | 8 +++ utilities/docker/Makefile| 22 +++ utilities/docker/create_ovn_dbs.sh | 18 + utilities/docker/debian/Dockerfile | 22 +++ utilities/docker/debian/build.sh | 44 + utilities/docker/ovn_default_nb_port | 1 + utilities/docker/ovn_default_northd_host | 1 + utilities/docker/ovn_default_sb_port | 1 + utilities/docker/start-ovn | 40 10 files changed, 240 insertions(+) create mode 100644 utilities/docker/Makefile create mode 100755 utilities/docker/create_ovn_dbs.sh create mode 100644 utilities/docker/debian/Dockerfile create mode 100755 utilities/docker/debian/build.sh create mode 100644 utilities/docker/ovn_default_nb_port create mode 100644 utilities/docker/ovn_default_northd_host create mode 100644 utilities/docker/ovn_default_sb_port create mode 100755 utilities/docker/start-ovn diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index 99d8fec04..1d5323f76 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -380,6 +380,60 @@ domain socket:: $ ovn-northd --pidfile --detach --log-file + +Starting OVN Central services in containers +~~~ + +For OVN central node, we dont need to load ovs kernel modules on host. +Hence, OVN central containers OS need not depend on host OS. + +Also we can leverage deploying entire OVN control plane in a pod spec for use +cases like OVN-kubernetes + +Export following variables in .env and place it under +project root:: + +$ OVN_BRANCH= +$ OVN_VERSION= +$ DISTRO= +$ KERNEL_VERSION= +$ GITHUB_SRC= +$ DOCKER_REPO= + +To build ovn modules:: + +$ cd utilities/docker +$ make build + +Compiled Modules will be tagged with docker image + +To Push ovn modules:: + +$ make push + +OVN docker image will be pushed to specified docker repo. + +Start OVN containers using below command::
Re: [ovs-dev] [PATCH v3 ovn] Containerize components
amgin...@gmail.com writes: > From: Aliasgar Ginwala > > 1. Containerize ovn central components > 2. Containerize ovn host > 3. Update documentation about building/running ovn in containers. > > Signed-off-by: Aliasgar Ginwala > --- Hi Aliasgar, It seems this patch has some issues with the Makefile syntax. See: https://travis-ci.com/ovsrobot/ovn/builds/124110711 > Documentation/intro/install/general.rst | 83 > utilities/automake.mk| 8 +++ > utilities/docker/Makefile| 22 +++ > utilities/docker/create_ovn_dbs.sh | 18 + > utilities/docker/debian/Dockerfile | 22 +++ > utilities/docker/debian/build.sh | 44 + > utilities/docker/ovn_default_nb_port | 1 + > utilities/docker/ovn_default_northd_host | 1 + > utilities/docker/ovn_default_sb_port | 1 + > utilities/docker/start-ovn | 40 > 10 files changed, 240 insertions(+) > create mode 100644 utilities/docker/Makefile > create mode 100755 utilities/docker/create_ovn_dbs.sh > create mode 100644 utilities/docker/debian/Dockerfile > create mode 100755 utilities/docker/debian/build.sh > create mode 100644 utilities/docker/ovn_default_nb_port > create mode 100644 utilities/docker/ovn_default_northd_host > create mode 100644 utilities/docker/ovn_default_sb_port > create mode 100755 utilities/docker/start-ovn > > diff --git a/Documentation/intro/install/general.rst > b/Documentation/intro/install/general.rst > index 99d8fec04..1d5323f76 100644 > --- a/Documentation/intro/install/general.rst > +++ b/Documentation/intro/install/general.rst > @@ -380,6 +380,60 @@ domain socket:: > > $ ovn-northd --pidfile --detach --log-file > > + > +Starting OVN Central services in containers > +~~~ > + > +For OVN central node, we dont need to load ovs kernel modules on host. > +Hence, OVN central containers OS need not depend on host OS. > + > +Also we can leverage deploying entire OVN control plane in a pod spec for use > +cases like OVN-kubernetes > + > +Export following variables in .env and place it under > +project root:: > + > +$ OVN_BRANCH= > +$ OVN_VERSION= > +$ DISTRO= > +$ KERNEL_VERSION= > +$ GITHUB_SRC= > +$ DOCKER_REPO= > + > +To build ovn modules:: > + > +$ cd utilities/docker > +$ make build > + > +Compiled Modules will be tagged with docker image > + > +To Push ovn modules:: > + > +$ make push > + > +OVN docker image will be pushed to specified docker repo. > + > +Start OVN containers using below command:: > + > +$ docker run -itd --net=host --name=ovn-nb \ > + : ovn-nb-tcp > + > +$ docker run -itd --net=host --name=ovn-sb \ > + : ovn-sb-tcp > + > +$ docker run -itd --net=host --name=ovn-northd \ > + : ovn-northd-tcp > + > +.. note:: > +Current ovn central components comes up in docker image in a standalone > +mode with protocol tcp. > + > +The debian docker file use ubuntu 16.04 as a base image for reference. > + > +User can use any other base image for debian, e.g. u14.04, etc. > + > +RHEL based docker build support needs to be added. > + > Starting OVN host service > > > @@ -406,6 +460,32 @@ domain socket:: > > $ ovn-controller --pidfile --detach --log-file > > +Starting OVN host service in containers > +~~~ > + > +For OVN host too, we dont need to load ovs kernel modules on host. > +Hence, OVN host container OS need not depend on host OS. > + > +Also we can leverage deploying OVN host in a pod spec for use cases like > +OVN-kubernetes to manage OVS which can be running as a service on host or in > +container. > + > +Start ovsdb-server and ovs-vswitchd components as per > +http://docs.openvswitch.org/en/latest/intro/install/general/ > + > +start local ovn-controller with below command if ovs is also running in > +container:: > + > +$ docker run -itd --net=host --name=ovn-controller \ > + --volumes-from=ovsdb-server \ > + : ovn-controller > + > +start local ovn-controller with below command if ovs is running as a > service:: > + > +$ docker run -itd --net=host --name=ovn-controller \ > + -v /var/run/openvswitch/:/var/run/openvswitch/ \ > + : ovn-controller > + > Validating > -- > > @@ -419,6 +499,9 @@ logical switch ``sw0`` and add logical port ``sw0-p1`` :: > > Refer to ovn-nbctl(8) and ovn-sbctl (8) for more details. > > +When using ovn in container, exec to container to run above commands:: > + > +$ docker exec -it /bin/bash > > Reporting Bugs > -- > diff --git a/utilities/automake.mk b/utilities/automake.mk > index b2b026f57..3142d177f 100644 > --- a/utilities/automake.mk > +++ b/utilities/automake.mk > @@ -29,6 +29,14 @@ EXTRA_DIST += \ > utilities/ovn-detrace.in \ > utilities/ovndb-servers.ocf \ >
Re: [ovs-dev] [PATCH v3 ovn] Containerize components
On Wed, Aug 21, 2019 at 10:38 PM wrote: > From: Aliasgar Ginwala > > 1. Containerize ovn central components > 2. Containerize ovn host > 3. Update documentation about building/running ovn in containers. > > Signed-off-by: Aliasgar Ginwala > Hi Aliasgar, There's something odd with this patch. I am not able to compile when I apply this patch. I get the below error ** cd . && /bin/sh /home/nusiddiq/workspace_cpp/ovn-org/ovn/build-aux/missing automake-1.16 --foreign Makefile cd . && /bin/sh ./config.status Makefile depfiles config.status: creating Makefile config.status: executing depfiles commands config.status: error: in `/home/nusiddiq/workspace_cpp/ovn-org/ovn': config.status: error: Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See `config.log' for more details make: *** [Makefile:1763: Makefile] Error 1 Thanks Numan > --- > Documentation/intro/install/general.rst | 83 > utilities/automake.mk| 8 +++ > utilities/docker/Makefile| 22 +++ > utilities/docker/create_ovn_dbs.sh | 18 + > utilities/docker/debian/Dockerfile | 22 +++ > utilities/docker/debian/build.sh | 44 + > utilities/docker/ovn_default_nb_port | 1 + > utilities/docker/ovn_default_northd_host | 1 + > utilities/docker/ovn_default_sb_port | 1 + > utilities/docker/start-ovn | 40 > 10 files changed, 240 insertions(+) > create mode 100644 utilities/docker/Makefile > create mode 100755 utilities/docker/create_ovn_dbs.sh > create mode 100644 utilities/docker/debian/Dockerfile > create mode 100755 utilities/docker/debian/build.sh > create mode 100644 utilities/docker/ovn_default_nb_port > create mode 100644 utilities/docker/ovn_default_northd_host > create mode 100644 utilities/docker/ovn_default_sb_port > create mode 100755 utilities/docker/start-ovn > > diff --git a/Documentation/intro/install/general.rst > b/Documentation/intro/install/general.rst > index 99d8fec04..1d5323f76 100644 > --- a/Documentation/intro/install/general.rst > +++ b/Documentation/intro/install/general.rst > @@ -380,6 +380,60 @@ domain socket:: > > $ ovn-northd --pidfile --detach --log-file > > + > +Starting OVN Central services in containers > +~~~ > + > +For OVN central node, we dont need to load ovs kernel modules on host. > +Hence, OVN central containers OS need not depend on host OS. > + > +Also we can leverage deploying entire OVN control plane in a pod spec for > use > +cases like OVN-kubernetes > + > +Export following variables in .env and place it under > +project root:: > + > +$ OVN_BRANCH= > +$ OVN_VERSION= > +$ DISTRO= > +$ KERNEL_VERSION= > +$ GITHUB_SRC= > +$ DOCKER_REPO= > + > +To build ovn modules:: > + > +$ cd utilities/docker > +$ make build > + > +Compiled Modules will be tagged with docker image > + > +To Push ovn modules:: > + > +$ make push > + > +OVN docker image will be pushed to specified docker repo. > + > +Start OVN containers using below command:: > + > +$ docker run -itd --net=host --name=ovn-nb \ > + : ovn-nb-tcp > + > +$ docker run -itd --net=host --name=ovn-sb \ > + : ovn-sb-tcp > + > +$ docker run -itd --net=host --name=ovn-northd \ > + : ovn-northd-tcp > + > +.. note:: > +Current ovn central components comes up in docker image in a > standalone > +mode with protocol tcp. > + > +The debian docker file use ubuntu 16.04 as a base image for reference. > + > +User can use any other base image for debian, e.g. u14.04, etc. > + > +RHEL based docker build support needs to be added. > + > Starting OVN host service > > > @@ -406,6 +460,32 @@ domain socket:: > > $ ovn-controller --pidfile --detach --log-file > > +Starting OVN host service in containers > +~~~ > + > +For OVN host too, we dont need to load ovs kernel modules on host. > +Hence, OVN host container OS need not depend on host OS. > + > +Also we can leverage deploying OVN host in a pod spec for use cases like > +OVN-kubernetes to manage OVS which can be running as a service on host or > in > +container. > + > +Start ovsdb-server and ovs-vswitchd components as per > +http://docs.openvswitch.org/en/latest/intro/install/general/ > + > +start local ovn-controller with below command if ovs is also running in > +container:: > + > +$ docker run -itd --net=host --name=ovn-controller \ > + --volumes-from=ovsdb-server \ > + : ovn-controller > + > +start local ovn-controller with below command if ovs is running as a > service:: > + > +$ docker run -itd
[ovs-dev] [PATCH v3 ovn] Containerize components
From: Aliasgar Ginwala 1. Containerize ovn central components 2. Containerize ovn host 3. Update documentation about building/running ovn in containers. Signed-off-by: Aliasgar Ginwala --- Documentation/intro/install/general.rst | 83 utilities/automake.mk| 8 +++ utilities/docker/Makefile| 22 +++ utilities/docker/create_ovn_dbs.sh | 18 + utilities/docker/debian/Dockerfile | 22 +++ utilities/docker/debian/build.sh | 44 + utilities/docker/ovn_default_nb_port | 1 + utilities/docker/ovn_default_northd_host | 1 + utilities/docker/ovn_default_sb_port | 1 + utilities/docker/start-ovn | 40 10 files changed, 240 insertions(+) create mode 100644 utilities/docker/Makefile create mode 100755 utilities/docker/create_ovn_dbs.sh create mode 100644 utilities/docker/debian/Dockerfile create mode 100755 utilities/docker/debian/build.sh create mode 100644 utilities/docker/ovn_default_nb_port create mode 100644 utilities/docker/ovn_default_northd_host create mode 100644 utilities/docker/ovn_default_sb_port create mode 100755 utilities/docker/start-ovn diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst index 99d8fec04..1d5323f76 100644 --- a/Documentation/intro/install/general.rst +++ b/Documentation/intro/install/general.rst @@ -380,6 +380,60 @@ domain socket:: $ ovn-northd --pidfile --detach --log-file + +Starting OVN Central services in containers +~~~ + +For OVN central node, we dont need to load ovs kernel modules on host. +Hence, OVN central containers OS need not depend on host OS. + +Also we can leverage deploying entire OVN control plane in a pod spec for use +cases like OVN-kubernetes + +Export following variables in .env and place it under +project root:: + +$ OVN_BRANCH= +$ OVN_VERSION= +$ DISTRO= +$ KERNEL_VERSION= +$ GITHUB_SRC= +$ DOCKER_REPO= + +To build ovn modules:: + +$ cd utilities/docker +$ make build + +Compiled Modules will be tagged with docker image + +To Push ovn modules:: + +$ make push + +OVN docker image will be pushed to specified docker repo. + +Start OVN containers using below command:: + +$ docker run -itd --net=host --name=ovn-nb \ + : ovn-nb-tcp + +$ docker run -itd --net=host --name=ovn-sb \ + : ovn-sb-tcp + +$ docker run -itd --net=host --name=ovn-northd \ + : ovn-northd-tcp + +.. note:: +Current ovn central components comes up in docker image in a standalone +mode with protocol tcp. + +The debian docker file use ubuntu 16.04 as a base image for reference. + +User can use any other base image for debian, e.g. u14.04, etc. + +RHEL based docker build support needs to be added. + Starting OVN host service @@ -406,6 +460,32 @@ domain socket:: $ ovn-controller --pidfile --detach --log-file +Starting OVN host service in containers +~~~ + +For OVN host too, we dont need to load ovs kernel modules on host. +Hence, OVN host container OS need not depend on host OS. + +Also we can leverage deploying OVN host in a pod spec for use cases like +OVN-kubernetes to manage OVS which can be running as a service on host or in +container. + +Start ovsdb-server and ovs-vswitchd components as per +http://docs.openvswitch.org/en/latest/intro/install/general/ + +start local ovn-controller with below command if ovs is also running in +container:: + +$ docker run -itd --net=host --name=ovn-controller \ + --volumes-from=ovsdb-server \ + : ovn-controller + +start local ovn-controller with below command if ovs is running as a service:: + +$ docker run -itd --net=host --name=ovn-controller \ + -v /var/run/openvswitch/:/var/run/openvswitch/ \ + : ovn-controller + Validating -- @@ -419,6 +499,9 @@ logical switch ``sw0`` and add logical port ``sw0-p1`` :: Refer to ovn-nbctl(8) and ovn-sbctl (8) for more details. +When using ovn in container, exec to container to run above commands:: + +$ docker exec -it /bin/bash Reporting Bugs -- diff --git a/utilities/automake.mk b/utilities/automake.mk index b2b026f57..3142d177f 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -29,6 +29,14 @@ EXTRA_DIST += \ utilities/ovn-detrace.in \ utilities/ovndb-servers.ocf \ utilities/checkpatch.py +utilities/docker/Makefile \ +utilities/docker/start-ovn \ +utilities/docker/create_ovn_dbs.sh \ +utilities/docker/ovn_default_nb_port \ +utilities/docker/ovn_default_sb_port \ +utilities/docker/ovn_default_northd_host \ +utilities/docker/debian/Dockerfile \ +utilities/docker/debian/build.sh CLEANFILES += \ utilities/ovn-ctl.8 \ diff --git a/utilities/docker/Makefile b/utilities/docker/Makefile new