@@ -471,7 +471,7 @@ Start OVN containers using unix socket::
User can use any other base image for debian, e.g. u14.04, etc.
- RHEL based docker build support needs to be added.
+ RHEL based docker support is now added with centos7 as a base image.
Starting OVN host service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -40,6 +40,8 @@ EXTRA_DIST += \
utilities/docker/ovn_default_northd_host \
utilities/docker/debian/Dockerfile \
utilities/docker/debian/build.sh \
+ utilities/docker/rhel/Dockerfile \
+ utilities/docker/rhel/build.sh \
utilities/docker/install_ovn.sh
CLEANFILES += \
new file mode 100755
@@ -0,0 +1,20 @@
+FROM centos:7
+MAINTAINER "Aliasgar Ginwala" <aginwala@ebay.com>
+
+ARG OVN_BRANCH
+ARG GITHUB_SRC
+ARG DISTRO
+
+copy $DISTRO/build.sh /build.sh
+copy install_ovn.sh /install_ovn.sh
+RUN /build.sh $OVN_BRANCH $GITHUB_SRC
+
+COPY ovn_default_nb_port /etc/ovn/ovn_default_nb_port
+COPY ovn_default_sb_port /etc/ovn/ovn_default_sb_port
+COPY ovn_default_northd_host /etc/ovn/ovn_default_northd_host
+
+COPY start-ovn /bin/start-ovn
+VOLUME ["/var/log/openvswitch", \
+"/var/lib/openvswitch", "/var/run/openvswitch", "/etc/openvswitch", \
+"/var/log/ovn", "/var/lib/ovn", "/var/run/ovn", "/etc/ovn"]
+ENTRYPOINT ["start-ovn"]
new file mode 100755
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+OVN_BRANCH=$1
+GITHUB_SRC=$2
+
+# Install deps
+build_deps="rpm-build yum-utils yum-builddep automake autoconf openssl-devel \
+epel-release python3 gdb libtool git bzip2 perl-core zlib-devel openssl git \
+libtool"
+
+yum update -y
+yum install @'Development Tools' ${build_deps} -y
+pip3 install six
+
+./install_ovn.sh $OVN_BRANCH $GITHUB_SRC
+
+# remove unused packages to make the container light weight.
+for i in $(package-cleanup --leaves --all);
+ do yum remove -y $i; yum autoremove -y;
+done
+yum remove ${build_deps} -y
+cd ..; rm -rf ovs; rm -rf ovn
+
+# Install basic utils
+basic_utils="vim-minimal.x86_64 net-tools.x86_64 uuid.x86_64 iproute.x86_64"
+yum install -y ${basic_utils}