Giter Site home page Giter Site logo

viprat / cnf-conformance Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cnti-testcatalog/testsuite

0.0 2.0 0.0 167 KB

📞📱☎️📡🌐Preliminary initiative for Cloud native Network Function Conformance

License: Apache License 2.0

Crystal 100.00%

cnf-conformance's Introduction

CNF Conformance

Master Develop
Build Status Build Status

The CNF Conformance program enables interoperability of Cloud native Network Functions (CNFs) from multiple vendors running on top of Kubernetes supplied by different vendors. The goal is to provide an open source test suite to demonstrate conformance and implementation of best practices for both open and closed source Cloud native Network Functions.

The CNF Conformance Test Suite will inspect CNFs for the following characteristics:

  • Compatibility - CNFs should work with any Certified Kubernetes product and any CNI-compatible network that meet their functionality requirements.
  • Statelessness - The CNF's state should be stored in a custom resource definition or a separate database (e.g. etcd) rather than requiring local storage. The CNF should also be resilient to node failure.
  • Security - CNF containers should be isolated from one another and the host.
  • Scalability - CNFs should support horizontal scaling (across multiple machines) and vertical scaling (between sizes of machines).
  • Configuration and Lifecycle - The CNF's configuration and lifecycle should be managed in a declarative manner, using ConfigMaps, Operators, or other declarative interfaces.
  • Observability - CNFs should externalize their internal states in a way that supports metrics, tracing, and logging.
  • Installable and Upgradeable - CNFs should use standard, in-band deployment tools such as Helm (version 3) charts.
  • Hardware Resources and Scheduling - The CNF container should access all hardware and schedule to specific worker nodes by using a device plugin.

See the Conformance Test Categories Documentation for a complete overview of the tests.

Implementation overview

The CNF Conformance Test Suite leverages upstream tools such as OPA Gatekeeper, Helm linter, and Promtool for testing CNFs. The upstream tool installation, configuration and versioning has been made repeatable.

The test framework and tests (using the upstream tools) are written in the human readable, compiled language, Crystal. Common capabilities like dependencies between tests and categories are supported.

Setup of vanilla upstream K8s on Packet is done with the CNF Testbed platform tool chain, which includes k8s-infra, Kubespray. To add support for other providers, please submit a Pull Request to the CNF Testbed repo.

Installation

  • Install crystal-lang version 0.30.1
  • Install the project's crystal dependencies
shards install
  • First clone this cnf-conformance repository

cd cnf-conformance
  • Next clone the CNF-Testbed

cd cnfs/ && git clone https://github.com/cncf/cnf-testbed.git

Or

  • If you already have IP addresses for your provider, and you want to manually install a K8s cluster, you can use k8s-infra to do this.
cd tools/ && git clone https://github.com/crosscloudci/k8s-infra.git
export KUBECONFIG=<yourkubeconfig>
  • Modify the cnf-conformance.yml file settings for your cnfs in your cnf's base directory
# In ./cnfs/YOURCNFDIRECTORY/cnf-conformance.yml

helm_directory: 
install_script: 
deployment_name: 
helm_chart: 
helm_chart_container_name: 
white_list_helm_chart_container_names: 
  • Run the setup tasks to install any prerequisites (useful for setting up sample cnfs)
crystal src/cnf-conformance.cr setup
  • Run the cleanup tasks to remove prerequisites (useful for starting fresh)
crystal src/cnf-conformance.cr cleanup

Get ready to rock and roll!

Example Usage (or see the complete usage documentation)

crystal src/cnf-conformance.cr all 
crystal src/cnf-conformance.cr configuration_lifecycle 
crystal src/cnf-conformance.cr installability 

Development

The CNF Conformance Test Suite is modeled after make, or if you're familiar with Ruby, rake. Conformance tests are created via tasks using the Crystal library, SAM.cr.

To run the automated test suite:

crystal spec

Contributing

  1. Fork it (https://github.com/your-github-user/cnf-conformance/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

cnf-conformance's People

Contributors

denverwilliams avatar wvwatson avatar thewolfpack avatar taylor avatar lixuna avatar williscool avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.