All Projects → sysrepo → Sysrepo

sysrepo / Sysrepo

Licence: apache-2.0
YANG-based configuration and operational state data store for Unix/Linux applications

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Sysrepo

Vedis
An Embedded Implementation of Redis
Stars: ✭ 436 (+107.62%)
Mutual labels:  datastore
Composepictures
This is a project built using Jetpack Compose on UI, Clean architecture, Dagger Hilt, Kotlin Flow, Navigation Components etc.
Stars: ✭ 62 (-70.48%)
Mutual labels:  datastore
Kafka Connect
equivalent to kafka-connect 🔧 for nodejs ✨🐢🚀✨
Stars: ✭ 102 (-51.43%)
Mutual labels:  datastore
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (+161.43%)
Mutual labels:  datastore
Dart
Self-service data workflow management
Stars: ✭ 15 (-92.86%)
Mutual labels:  datastore
Redis Dataloader
Batching and Caching layer using Redis as the Caching layer
Stars: ✭ 72 (-65.71%)
Mutual labels:  datastore
Daily Stock Forecast
Daily Stock Forecasts using Machine Learning & Python
Stars: ✭ 341 (+62.38%)
Mutual labels:  datastore
Nodejs Datastore
Node.js client for Google Cloud Datastore: a highly-scalable NoSQL database for your web and mobile applications.
Stars: ✭ 161 (-23.33%)
Mutual labels:  datastore
Goshare
Go Share your TimeSeries/NameSpace/KeyVal DataStore (using leveldb) over HTTP &/or ZeroMQ
Stars: ✭ 59 (-71.9%)
Mutual labels:  datastore
Datastore
🐹 Bloat free and flexible interface for data store and database access.
Stars: ✭ 99 (-52.86%)
Mutual labels:  datastore
Gae Boilerplate
Google App Engine Boilerplate
Stars: ✭ 688 (+227.62%)
Mutual labels:  datastore
Goloquent
This repo no longer under maintenance, please go to https://github.com/si3nloong/sqlike
Stars: ✭ 16 (-92.38%)
Mutual labels:  datastore
Movietray
Its a playground application focusing on Paging3, MVVM architecture, Kotlin Extension functions, Retrofit, DSL, Navigation component, MotionLayout, SharedElementTransition, Single Activity Architecture, DataStore etc.
Stars: ✭ 78 (-62.86%)
Mutual labels:  datastore
Corfudb
A cluster consistency platform
Stars: ✭ 539 (+156.67%)
Mutual labels:  datastore
Js Data
Give your data the treatment it deserves with a framework-agnostic, datastore-agnostic JavaScript ORM built for ease of use and peace of mind. Works in Node.js and in the Browser. Main Site: http://js-data.io, API Reference Docs: http://api.js-data.io/js-data
Stars: ✭ 1,599 (+661.43%)
Mutual labels:  datastore
Playandroid
🔥🔥🔥 Kotlin + MVVM + LCE版玩安卓,暗黑模式、横竖屏、无网、弱网、无数据、加载失败等等各种情况,协程、Room、Hilt、DataStore、LiveData、Retrofit、屏幕适配、本地缓存、多语言切换、多 lib,你想要的我都有!!!
Stars: ✭ 414 (+97.14%)
Mutual labels:  datastore
Dsui
Datastore Emulator UI
Stars: ✭ 66 (-68.57%)
Mutual labels:  datastore
Datastore
(AE|Cloud) Datastore Wrapper
Stars: ✭ 198 (-5.71%)
Mutual labels:  datastore
Nds
A Go (golang) Google App Engine datastore package with strongly consistent caching.
Stars: ✭ 154 (-26.67%)
Mutual labels:  datastore
Magnolify
A collection of Magnolia add-on modules
Stars: ✭ 81 (-61.43%)
Mutual labels:  datastore

Sysrepo

GitHub license

Sysrepo is a YANG-based configuration and operational state data store for Unix/Linux applications.

Applications can use sysrepo to store their configuration modeled by provided YANG model instead of using e.g. flat configuration files. Sysrepo will ensure data consistency of the data stored in the datastore and enforce data constraints defined by YANG model. Applications can currently use C language API of sysrepo Client Library to access the configuration in the datastore, but the support for other programming languages is planed for later, too.

Sysrepo can be easily integrated with management agents such as NETCONF or RESTCONF servers, using the same client library API that applications use to access their configuration. As of now, sysrepo is integrated with the Netopeer 2 NETCONF server. This means that applications that use sysrepo to store their configuration can automatically benefit from the ability to being controlled via NETCONF.

Branches

The project uses 2 main branches master and devel. Other branches should not be cloned. In master there are files of the last official release. Any latest improvements and changes, which were tested at least briefly are found in devel. On every new release, devel is merged into master.

This means that when only stable official releases are to be used, either master can be used or specific releases downloaded. If all the latest bugfixes should be applied, devel branch is the one to be used. Note that whenever a new issue is created and it occurs on the master branch, the first response will likely be to use devel before any further provided support.

Packages

We are using openSUSE Build Service to automaticaly prepare binary packages for number of GNU/Linux distros. The sysrepo packages are always build from current master branch (latest release). If you are interested in any other packages (such as devel or C++ and Python bindings), you can browse all packages from our repository.

Migration from Sysrepo version 0.7.x or older

This Sysrepo is a complete rewrite of these older versions. Latest version of the 0.7 version is found in the legacy branch. We tried to keep the API as similar as possible but there were some smaller or even bigger changes (mostly for the sake of efficiency). All these changes should be mentioned in CHANGES text file. It is also best to look at least briefly at the documentation where you will find information about major design changes (most importantly, no sysrepod).

Provided Features

  • Ability to store / retrieve YANG-modeled data elements adressed by XPath
  • Startup, running, candidate, and operational datastore support
  • Data consistency and constraints enforcement according to YANG models
  • No single point of failure design (is just a library)
  • Full transaction and concurrency support
  • Notifications of subscribed applications about the changes made in the datastore
  • Commit verifiers (change verification by subscribed applications)
  • Operational data support (publishing of application's state/configuration data to sysrepo)
  • YANG 1.1 support
  • Custom RPC, Event Notifications, YANG 1.1 Actions support
  • Notification store & notification replay

Security Notes

Sysrepo does not have any master process that could enforce complex access control. So instead, it relies on and utilizes standard file system permissions but there are some things to bear in mind.

To prevent any sensitive data from being accessible by unauthorized processes, it is imperative to always set correct permissions and owner for all YANG modules being installed. The utility sysrepoctl can help with both displaying all the permissions (--list) and modifying them (--change <module>) in addition to this functionality being available in the API.

Having made certain of this, the default configuration should be suitable for a reasonably secure machine that has no malicious running processes. Specifically, it is trivial for such a process to completely break sysrepo by writing into shared files that must be accessible for all the processes linked with sysrepo. Also, with some reverse engineering, it may even be possible to access data by an unathorized process when they are being communicated in these shared files.

In order to avoid all such security issues, there are 2 cmake variables SYSREPO_UMASK and SYSREPO_GROUP that should be adjusted. Generally, a new system group should be created and set for SYSREPO_GROUP and then all outside access frobidden by setting SYSREPO_UMASK to 00007. If then all the users executing sysrepo processes belong to this group, none of sysrepo files and no sensitive information should be accessible to other users.

Requirements

Build Requirements

  • C compiler (gcc >= 4.8.4, clang >= 3.0, ...)
  • cmake >= 2.8.12
  • libyang

Optional

  • doxygen (for generating documentation)
  • cmocka >= 1.0.0 (for tests only, see Tests)
  • valgrind (for enhanced testing)

Building

$ mkdir build; cd build
$ cmake ..
$ make
# make install

Documentation

The library documentation is available online (docs), or can be generated locally from the source code using Doxygen tool:

$ make doc
$ google-chrome ../doc/html/index.html

Plugin development documentation

Another markdown document aimed at plugin developers is available in plugin_dev_doc.md. The goal of the document is to provide a single place where a complete overview of information required to start developing plugins is available. The document describes the basics of Sysrepo plugin development and the technologies required to work with Sysrepo like YANG, XPath, NETCONF and others.

Useful CMake sysrepo Options

Generate C++ and Python3 bindings:

-DGEN_LANGUAGE_BINDINGS=ON

Set custom repository path:

-DREPO_PATH=/opt/sysrepo/my_repository

Set custom sysrepo-plugind plugins path:

-DPLUGINS_PATH=/opt/sysrepo-plugind/plugins

Set global umask for all sysrepo file and directory creation:

-DSYSREPO_UMASK=00007

Set system group to own all sysrepo-related files:

-DSYSREPO_GROUP=sysrepo

Useful CMake Build Options

Changing Compiler

Set CC variable:

$ CC=/usr/bin/clang cmake ..

Changing Install Path

To change the prefix where the library, headers and any other files are installed, set CMAKE_INSTALL_PREFIX variable:

$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..

Default prefix is /usr/local.

Build Modes

There are two build modes:

  • Release. This generates library for the production use without any debug information.
  • Debug. This generates library with the debug information and disables optimization of the code.

The Debug mode is currently used as the default one. to switch to the Release mode, enter at the command line:

$ cmake -D CMAKE_BUILD_TYPE:String="Release" ..

Code Coverage

To generate statistical information about code coverage by tests, set ENABLE_COVERAGE option to ON:

$ cmake -D ENABLE_COVERAGE="ON" ..

and then the make's coverage target should be available to geenrate statistics:

$ make coverage

Note that gcc compiler is required for this option and additional tools are required:

  • gcov
  • lcov
  • genhtml

Usage

All Sysrepo functions are available via the main header:

#include <sysrepo.h>

To compile your program with libsysrepo, it is necessary to link it using the following linker parameters:

-lsysrepo

Note, that it may be necessary to call ldconfig(8) after library installation and if the library was installed into a non-standard path, the path to libyang must be specified to the linker. To help with setting all the compiler's options, there is sysrepo.pc file for pkg-config(1) available in the source tree. The file is installed with the library.

Used run-time enviromental variables

It is possible to change the repository path by setting SYSREPO_REPOSITORY_PATH variable. Also, if SYSREPO_SHM_PREFIX is defined, it is used for all SHM files created. This way everal sysrepo instances can effectively be run simultanously on one machine.

Examples

See examples directory, which contains an example for basic API functions.

Tests

libyang includes several tests built with cmocka. The tests can be found in tests subdirectory and they are designed for checking library functionality after code changes.

The tests are by default built in the Debug build mode by running

$ make

In case of the Release mode, the tests are not built by default (it requires additional dependency), but they can be enabled via cmake option:

$ cmake -DENABLE_BUILD_TESTS=ON ..

Note that if the necessary cmocka headers are not present in the system include paths, tests are not available despite the build mode or cmake's options.

Tests can be run by the make's test target:

$ make test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].