Contrail Analytics is installed and deployed as standalone product independent of Contrail SDN controller product. In such deployments, data is sent to the collector using the Sandesh southbound protocol. Clients or generators sending data to the collector use the C++ and python client bindings, and the sandesh compiler to auto-generate code from the Sandesh IDL file.
Analytics clients need Sandesh compiler, and C++ and python client bindings to send data to the collector. Currently clients have to checkout and build the contrail-controller and contrail-sandesh github repositories to get access to the Sandesh compiler and client bindings. This is not an ideal solution and hampers the adoption and use of Sandesh as a southbound protocol and ultimately Contrail Analytics as a standalone product.
The proposed solution is to provide the Sandesh compiler and the client bindings as RPM and Debian packages that can be installed by the clients. Following packages can be provided:
-
contrail-sandesh-compiler This package contains the sandesh compiler that is used for translating from .sandesh files (containing the definitions) to the language binding for the supported languages.
-
libcontrail-sandesh This package contains the runtime library needed for C++ applications.
-
libcontrail-sandesh-dev/devel This package contains the development headers and static libraries needed for writing C++ applications.
-
python-contrail-sandesh This package contains the Python bindings for Sandesh. You will need the sandesh compiler tool (in the contrail-sandesh-compiler package) to compile your definition to Python classes, and then the modules in this package will allow you to use those classes in your programs.
None
None
Clients will install the packages on their build environments instead of checking out and building from sources.
None
None
Currently the sandesh compiler binary is named as sandesh. We will distribute it as contrail-sandeshc or sandeshc.
Currently the sandesh C++ client library is called libsandesh and only a static library is built. Further libsandesh has contrail specific dependencies on libbase, libio, libhttp, libhttp-parser. Two solutions are possible:
The dependent contrail libraries can be provided in the package. Advantage of this approach is that less development work will be needed to achieve this solution. The disadvantage is that the client will have to link with the dependent contrail libraries in the right order along with libsandesh and external dependencies.
Build a library that includes sources from all the dependent contrail libraries. The advantage of this approach is that the client has to link with just libsandesh and external dependencies. Disadvantage is that this approach requires more development work.
We will distribute it as either libcontrail-sandesh or libsandesh depending on approach 4.2.1 or 4.2.2 respectively. If distributing dependent libraries they will be named as libcontrail-XXX instead of the current libXXX.
Currently the sandesh python client package is called pysandesh. We will distribute it as either pysandesh or contrail_pysandesh.
It is desirable but not necessary to change the contrail daemons to use the above named ibraries and python packages.
None
None
None
None
sandesh client tests will be added to use these libraries and packages
scons targets will be added to ensure that clients using the libraries and packages can be built
NA
None
None