@@ -30,7 +30,10 @@ EXTRA_DIST += \
rhel/usr_lib_systemd_system_ovs-vswitchd.service \
rhel/usr_lib_systemd_system_ovn-controller.service \
rhel/usr_lib_systemd_system_ovn-controller-vtep.service \
- rhel/usr_lib_systemd_system_ovn-central.service
+ rhel/usr_lib_systemd_system_ovn-central.service \
+ rhel/usr_lib_systemd_system_ovn-northbound-db.service \
+ rhel/usr_lib_systemd_system_ovn-southbound-db.service \
+ rhel/usr_lib_systemd_system_ovn-northd.service
update_rhel_spec = \
$(AM_V_GEN)($(ro_shell) && sed -e 's,[@]VERSION[@],$(VERSION),g') \
@@ -131,16 +131,49 @@ Provides: openvswitch-static = %{version}-%{release}
This provides static library, libopenswitch.a and the openvswitch header
files needed to build an external application.
+%package ovn-southbound-database
+Summary: Open Virtual Network Sounthbound Database
+License: ASL 2.0
+Requires: openvswitch-ovsdb-server openvswitch-ovn-common
+
+%description ovn-southbound-database
+OVN Southbound Database Server contains three kinds of data: Physical
+Network tables that specify how to reach hypervisor and other nodes,
+logical Network tables that describe the logical network in terms
+of logical network flows and binding tables that link logical network
+components locations to the physical network.
+
+%package ovn-northbound-database
+Summary: Open Virtual Network Nounthbound Database
+License: ASL 2.0
+Requires: openvswitch-ovsdb-server openvswitch-ovn-common
+
+%description ovn-northbound-database
+OVN Nouthbound Database Server contains information representing the
+logical network configuration passed down by the Cloud Management
+System(CMS). The information is used by ovn-northd to populate the
+contents in ovn-southbond-database.
+
+%package ovn-northd
+Summary: Open Virtual Network Northd Daemon
+License: ASL 2.0
+Requires: openvswitch-ovn-common
+
+%description ovn-northd
+OVN Nouthbound Daemon translates the logical network configuration stored
+in OVN Northbound Database, into logical datapath flows in the OVN Southbound
+Database.
+
%package ovn-central
Summary: Open vSwitch - Open Virtual Network support
-License: ASL 2.0
-Requires: openvswitch openvswitch-ovn-common
%description ovn-central
OVN, the Open Virtual Network, is a system to support virtual network
abstraction. OVN complements the existing capabilities of OVS to add
native support for virtual network abstractions, such as virtual L2 and L3
overlays and security groups.
+Requires: openvswitch-ovn-northbound-database \
+ openvswitch-ovn-southbond-database openvswitch-ovn-northd
%package ovn-host
Summary: Open vSwitch - Open Virtual Network support
@@ -207,7 +240,8 @@ install -p -D -m 0644 \
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch
for service in openvswitch ovsdb-server ovs-vswitchd \
- ovn-controller ovn-controller-vtep ovn-central; do
+ ovn-controller ovn-controller-vtep ovn-central \
+ ovn-southbound-db ovn-northbound-db ovn-northd; do
install -p -D -m 0644 \
rhel/usr_lib_systemd_system_${service}.service \
$RPM_BUILD_ROOT%{_unitdir}/${service}.service
@@ -530,11 +564,20 @@ fi
%{_mandir}/man5/ovn-sb.5*
%files ovn-central
+%{_unitdir}/ovn-central.service
+
+%files ovn-northd
%{_bindir}/ovn-northd
%{_mandir}/man8/ovn-northd.8*
-%config %{_datadir}/openvswitch/ovn-nb.ovsschema
+%{_unitdir}/ovn-northd.service
+
+%files ovn-southbound-database
%config %{_datadir}/openvswitch/ovn-sb.ovsschema
-%{_unitdir}/ovn-central.service
+%{_unitdir}/ovn-southbound-db.service
+
+%files ovn-northbound-database
+%config %{_datadir}/openvswitch/ovn-nb.ovsschema
+%{_unitdir}/ovn-northbound-db.service
%files ovn-host
%{_bindir}/ovn-controller
@@ -17,6 +17,7 @@
Description=OVN central management daemons
After=syslog.target
Requires=openvswitch.service
+Conflicts=ovn-northbound-db.service ovn-southbound-db.service ovn-northd.service
After=openvswitch.service
[Service]
@@ -26,6 +27,8 @@ Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
EnvironmentFile=-/etc/sysconfig/ovn-northd
ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_northd $OVN_NORTHD_OPTS
ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_northd
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
new file mode 100644
@@ -0,0 +1,16 @@
+[Unit]
+Description=OVN northbound database daemons
+Conflicts=ovn-central.service
+After=syslog.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
+ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_ovnnb
+ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_ovnnb
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
+
+[Install]
+WantedBy=multi-user.target
new file mode 100644
@@ -0,0 +1,46 @@
+# See ovn-northd(8) for details about ovn-northd.
+#
+# To start the ovn-northd service, you will need create a configuration file
+# /etc/systemd/system/ovn-northd-db-params.conf to specifiy how to reach
+# ovn databases.
+#
+# For example:
+# --ovnnb-db=tcp:127.0.0.1:6641 --ovnsb-db=tcp:127.0.0.1:6642
+#
+# Note: This service excludes ovn-central.service.
+# Note: When using this service, ovn-ctl ignores --db-nb-sock and --db-sb-sock
+# options.
+#
+# To customize the ovn-northd service, you may create a configuration file
+# in the /etc/systemd/system/ovn-northd.d/ directory. For example, to specify
+# additional options to be passed to the "ovn-ctl start_northd" command, you
+# could place the following contents in
+# /etc/systemd/system/ovn-northd.d/local.conf:
+#
+# [System]
+# Environment="OVN_NORTHD_OPTS=--log-file=/tmp/northd.log
+#
+# Alternatively, you may specify environment variables in the file /etc/sysconfig/ovn-northd:
+#
+# OVN_NORTHD_OPTS="--log-file=/tmp/northd.log"
+
+[Unit]
+Description=OVN northd management daemons
+After=syslog.target
+Conflicts=ovn-central.service
+AssertPathExists= /etc/systemd/system/ovn-northd-db-params.conf
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
+EnvironmentFile=-/etc/sysconfig/ovn-northd
+ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_northd \
+ --ovn-manage-ovsdb=no $OVN_NORTHD_OPTS
+ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_northd \
+ --ovn-manage-ovsdb=no
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
+
+[Install]
+WantedBy=multi-user.target
new file mode 100644
@@ -0,0 +1,16 @@
+[Unit]
+Description=OVN southbound database daemons
+Conflicts=ovn-central.service
+After=syslog.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Environment=OVS_RUNDIR=%t/openvswitch OVS_DBDIR=/var/lib/openvswitch
+ExecStart=/usr/share/openvswitch/scripts/ovn-ctl start_ovnsb
+ExecStop=/usr/share/openvswitch/scripts/ovn-ctl stop_ovnsb
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
+
+[Install]
+WantedBy=multi-user.target
Add ovn-northbound-database, ovn-southbound-database and ovn-northd as packages that can be installed independently. Signed-off-by: Andy Zhou <azhou@ovn.org> --- rhel/automake.mk | 5 +- rhel/openvswitch-fedora.spec.in | 53 ++++++++++++++++++++-- rhel/usr_lib_systemd_system_ovn-central.service | 3 ++ ...sr_lib_systemd_system_ovn-northbound-db.service | 16 +++++++ rhel/usr_lib_systemd_system_ovn-northd.service | 46 +++++++++++++++++++ ...sr_lib_systemd_system_ovn-southbound-db.service | 16 +++++++ 6 files changed, 133 insertions(+), 6 deletions(-) create mode 100644 rhel/usr_lib_systemd_system_ovn-northbound-db.service create mode 100644 rhel/usr_lib_systemd_system_ovn-northd.service create mode 100644 rhel/usr_lib_systemd_system_ovn-southbound-db.service