IBM / ovsdb-etcd

Implementation of OVSDB over etcd
17 stars 7 forks source link

Build Status Go Report Card

OVSDB ETCD (PoC)

ovsdb-etcd is an alternative ovsdb-server implementation, for use in conjunction with ovn-kubernetes, written in golang and using etcd as a backend. It is a fully compatible drop-in replacement for ovsdb-server and adheres to spec rfc7047 and spec extension ovsdb-server.

Implementation of ovsdb-etcd

The objects are mapped to etcd as follows:

data:           <prefix>/<service>/<dbName>/<table>/<uuid> --> <row>
comments:       <prefix>/<service>/<dbName>/_comments/<timestamp> --> <comment>
locks:          <prefix>/<service>/_/_locks/<lockid> --> nil

As ovsdb transactions have different semantics than etcd transactions, the initial implementation consists of:

An ovsdb monitor enrollment is implemented as:

An ovsdb monitor event is implemented as:

To start developing ovsdb-etcd

You must have a working Go Environment.

Then clone ovn-kubernetes from our fork:

git clone https://github.com/ibm/ovn-kubernetes
pushd ovn-kubernetes
git checkout ovsdb-etcd2
export OVN_KUBERNETES_ROOT=$PWD
popd

Then clone ovsdb-etcd and build and push docker images:

git clone https://github.com/IBM/ovsdb-etcd
make docker-build

Setup your docker.io credentials:

export CR_PASSWORD=<DOCKER_PASSWORD>
export CR_USERNAME=<DOCKER_USENAME>
export OVSDB_ETCD_REPOSITORY=$CR_USERNAME

Login to docker and push (optional):

echo $CR_PASSWORD | docker login $CR_REPO -u $CR_USERNAME --password-stdin
make docker-push

Disable tcpdump logging (optional):

export OVNDB_ETCD_TCPDUMP='false'

Deploy onto a kind cluster:

make ovnk-deploy
make ovnk-status

Support for ovsdb-etcd