[ovs-dev] [PATCH 5/5] vtep: Add Debian packaging.

David Yang davidy at vmware.com
Sat Oct 12 00:23:18 UTC 2013


Signed-off-by: David Yang <davidy at vmware.com>

David Yang 
MTS @ VMware 
davidy at vmware.com 

On Oct 11, 2013, at 5:04 PM, Justin Pettit <jpettit at nicira.com> wrote:

> Hi, David.  Would I be able to get your Signed-off-by on this?  I'll add you to the AUTHORS list before I check it in.
> 
> --Justin
> 
> 
> ---------- Forwarded message ----------
> From: Justin Pettit <jpettit at nicira.com>
> Date: Fri, Oct 11, 2013 at 4:56 PM
> Subject: [PATCH 5/5] vtep: Add Debian packaging.
> To: dev at openvswitch.org
> 
> 
> Co-authored-by: David Yang <davidy at vmware.com>
> Signed-off-by: Justin Pettit <jpettit at nicira.com>
> ---
>  debian/automake.mk               |    5 ++
>  debian/control                   |   18 +++++++++
>  debian/openvswitch-vtep.default  |    4 ++
>  debian/openvswitch-vtep.dirs     |    1 +
>  debian/openvswitch-vtep.init     |   78 ++++++++++++++++++++++++++++++++++++++
>  debian/openvswitch-vtep.install  |    3 +
>  debian/openvswitch-vtep.manpages |    1 +
>  7 files changed, 110 insertions(+), 0 deletions(-)
>  create mode 100644 debian/openvswitch-vtep.default
>  create mode 100644 debian/openvswitch-vtep.dirs
>  create mode 100644 debian/openvswitch-vtep.init
>  create mode 100644 debian/openvswitch-vtep.install
>  create mode 100644 debian/openvswitch-vtep.manpages
> 
> diff --git a/debian/automake.mk b/debian/automake.mk
> index 35c5a9e..33d7282 100644
> --- a/debian/automake.mk
> +++ b/debian/automake.mk
> @@ -45,6 +45,11 @@ EXTRA_DIST += \
>         debian/openvswitch-test.dirs \
>         debian/openvswitch-test.install \
>         debian/openvswitch-test.manpages \
> +       debian/openvswitch-vtep.default \
> +       debian/openvswitch-vtep.dirs \
> +       debian/openvswitch-vtep.init \
> +       debian/openvswitch-vtep.install \
> +       debian/openvswitch-vtep.manpages \
>         debian/ovsdbmonitor.install \
>         debian/ovsdbmonitor.manpages \
>         debian/ovs-monitor-ipsec \
> diff --git a/debian/control b/debian/control
> index 46b5630..5583348 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -204,3 +204,21 @@ Description: Open vSwitch test package
>   .
>   This package contains utilities that are useful to diagnose
>   performance and connectivity issues in Open vSwitch setup.
> +
> +Package: openvswitch-vtep
> +Architecture: linux-any
> +Depends:
> + ${shlibs:Depends}, ${misc:Depends}, openvswitch-common (>= ${binary:Version}),
> + openvswitch-switch (>= ${binary:Version}), python,
> + python-openvswitch (>= ${source:Version})
> +Description: Open vSwitch VTEP utilities
> + Open vSwitch is a production quality, multilayer, software-based, Ethernet
> + virtual switch. It is designed to enable massive network automation through
> + programmatic extension, while still supporting standard management interfaces
> + and protocols (e.g. NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag). In
> + addition, it is designed to support distribution across multiple physical
> + servers similar to VMware's vNetwork distributed vswitch or Cisco's Nexus
> + 1000V.
> + .
> + This package provides utilities that are useful to interact with a
> + VTEP-configured database and a VTEP emulator.
> diff --git a/debian/openvswitch-vtep.default b/debian/openvswitch-vtep.default
> new file mode 100644
> index 0000000..2e888e7
> --- /dev/null
> +++ b/debian/openvswitch-vtep.default
> @@ -0,0 +1,4 @@
> +# This is a POSIX shell fragment                -*- sh -*-
> +
> +# ENABLE_OVS_VTEP: Whether to start ovs-vtep.
> +ENABLE_OVS_VTEP="false"
> diff --git a/debian/openvswitch-vtep.dirs b/debian/openvswitch-vtep.dirs
> new file mode 100644
> index 0000000..b0a8f64
> --- /dev/null
> +++ b/debian/openvswitch-vtep.dirs
> @@ -0,0 +1 @@
> +/usr/share/openvswitch
> diff --git a/debian/openvswitch-vtep.init b/debian/openvswitch-vtep.init
> new file mode 100644
> index 0000000..ebf4e26
> --- /dev/null
> +++ b/debian/openvswitch-vtep.init
> @@ -0,0 +1,78 @@
> +#!/bin/sh
> +
> +### BEGIN INIT INFO
> +# Provides:          openvswitch-vtep
> +# Required-Start:    $network $named $remote_fs $syslog
> +# Required-Stop:     $remote_fs
> +# Default-Start:     2 3 4 5
> +# Default-Stop:      0 1 6
> +# Short-Description: Open vSwitch VTEP emulator
> +# Description:       Initializes the Open vSwitch VTEP emulator
> +### END INIT INFO
> +
> +
> +# Include defaults if available
> +default=/etc/default/openvswitch-vtep
> +if [ -f $default ] ; then
> +    . $default
> +fi
> +
> +start () {
> +    if [ "$ENABLE_OVS_VTEP" = "false" ]; then
> +        exit 0
> +    fi
> +
> +    update-rc.d -f openvswitch-switch remove >/dev/null 2>&1
> +    /etc/init.d/openvswitch-switch stop
> +
> +    mkdir -p "/var/run/openvswitch"
> +
> +    if [ ! -e "/etc/openvswitch/conf.db" ]; then
> +        ovsdb-tool create /etc/openvswitch/conf.db /usr/share/openvswitch/vswitch.ovsschema
> +    fi
> +
> +    if [ ! -e "/etc/openvswitch/vtep.db" ]; then
> +        ovsdb-tool create /etc/openvswitch/vtep.db /usr/share/openvswitch/vtep.ovsschema
> +    fi
> +
> +    if [ ! -e "/etc/openvswitch/ovsclient-cert.pem" ]; then
> +        export RANDFILE="/root/.rnd"
> +        cd /etc/openvswitch && ovs-pki req ovsclient && ovs-pki self-sign ovsclient
> +    fi
> +
> +    ovsdb-server --pidfile --detach --log-file --remote \
> +        punix:/var/run/openvswitch/db.sock \
> +        --remote=db:hardware_vtep,Global,managers \
> +        --private-key=/etc/openvswitch/ovsclient-privkey.pem \
> +        --certificate=/etc/openvswitch/ovsclient-cert.pem \
> +        --bootstrap-ca-cert=/etc/openvswitch/vswitchd.cacert \
> +        /etc/openvswitch/conf.db /etc/openvswitch/vtep.db
> +
> +    modprobe openvswitch
> +
> +    ovs-vswitchd --pidfile --detach --log-file \
> +        unix:/var/run/openvswitch/db.sock
> +}
> +
> +stop () {
> +    /etc/init.d/openvswitch-switch stop
> +}
> +
> +case $1 in
> +    start)
> +        start
> +        ;;
> +    stop)
> +        stop
> +        ;;
> +    restart|force-reload)
> +        stop
> +        start
> +        ;;
> +    *)
> +        echo "Usage: $0 {start|stop|restart|force-reload}" >&2
> +        exit 1
> +        ;;
> +esac
> +
> +exit 0
> diff --git a/debian/openvswitch-vtep.install b/debian/openvswitch-vtep.install
> new file mode 100644
> index 0000000..db91209
> --- /dev/null
> +++ b/debian/openvswitch-vtep.install
> @@ -0,0 +1,3 @@
> +_debian/vtep/vtep-ctl usr/bin
> +usr/share/openvswitch/vtep.ovsschema
> +usr/share/openvswitch/scripts/ovs-vtep
> diff --git a/debian/openvswitch-vtep.manpages b/debian/openvswitch-vtep.manpages
> new file mode 100644
> index 0000000..1fcad1e
> --- /dev/null
> +++ b/debian/openvswitch-vtep.manpages
> @@ -0,0 +1 @@
> +_debian/vtep/vtep-ctl.8
> --
> 1.7.5.4
> 
> 



More information about the dev mailing list