Giter VIP home page Giter VIP logo

cnti-testcatalog / testsuite Goto Github PK

View Code? Open in Web Editor NEW
170.0 170.0 70.0 32.02 MB

πŸ“žπŸ“±β˜ŽοΈπŸ“‘πŸŒ Cloud Native Telecom Initiative (CNTI) Test Catalog is a tool to check for and provide feedback on the use of K8s + cloud native best practices in networking applications and platforms

Home Page: https://wiki.lfnetworking.org/display/LN/Test+Catalog

License: Apache License 2.0

Crystal 17.20% Dockerfile 0.38% Shell 0.92% Smarty 1.42% Mustache 79.58% HTML 0.32% Makefile 0.15% C 0.02%
best-practices cloud-native cnf cnfs conformance-tests crystal good-first-issue k8s kubernetes

testsuite's People

Contributors

agentpoyo avatar barmull avatar clementnuss avatar collivier avatar denverwilliams avatar electrocucaracha avatar haardikdharma10 avatar hashnuke avatar haskojur avatar himanshu007-creator avatar horecoli avatar jonsy13 avatar kosstennbl avatar lixuna avatar macaktom avatar martin-mat avatar michaelspedersen avatar nsagark avatar nupejosh avatar petorre avatar sakshamgurbhele avatar sishbi avatar smitholi67 avatar svteb avatar taylor avatar thewolfpack avatar uditgaurav avatar wavell avatar williscool avatar xmulligan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

testsuite's Issues

Proof of concept: Test if the CNF can perform a rolling update

crystal src/cnf-conformance.cr rolling_deployment_update

Pre-req:

Tasks:

Security test: Are any containers running in privileged mode?

Acceptance Criteria: lfn-cnti/certification#55 (comment)

Security test: Are any containers are running in privileged mode?

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: Security

Type of test (static or runtime) = runtime

  • example code: #23

Environment set up tasks:

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

Sample CNF tasks:

Create non-whitelisted privileged sample CNF

  • Download the CoreDNS helm chart
  • Modify to enable privileged mode
  • Create sample cnf-conformance.yml configuration which uses the new sample CNF
    • Pseudo configuration:
    deployment_name: privileged-coredns
    

Create whitelisted privileged sample CNF

  • Copy the privileged sample CNF to whitelisted_privileged_cnf
  • Create sample cnf-conformance.yml configuration which whitelists the CNF for privileged mode
    • Pseudo configuration:
    deployment_name: privileged-coredns
    privileged_mode: allowed
    

Code implementation tasks:

  • Create code which checks if a target CNF is whitelisted for privilege mode
  • Create test which checks privilege mode of a deployment
    • If the CNF is privileged mode and not whitelisted the test should show fail
    • If the CNF is privileged mode and whitelisted the test should pass
    • If the CNF is not privileged the test should pass
  • Create code to show verbose output for the deployment and privilege information in the K8s cluster
  • Spec integration coverage -> lfn-cnti/certification#55 (comment)

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Needs Peer Review column
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Reviewer Approved column
  • if no, document what did not go as expected, including error messages and screenshots (if possible)

Review Hardware support tests and add more content

Goal: Review Hardware support tests and add more content

Tasks:

ref: s43

[Documentation] create a CONTRIBUTING.md

[Documentation] create a CONTRIBUTING.md

Short description:

  • to provide potential project contributors with a short guide to how they can help with the CNF Conformance Test Suite

Location:

Tasks:

Review OPA Gatekeeper as a possible tool for testing

Goal: Review using OPA Gatekeeper validate that CNFs continue to carry traffic when appropriate policies are enforced

Tasks:

  • Research OPA Gatekeeper
  • Create an outline
  • Create a rough draft
  • Peer review of draft
  • Iterate as needed, peer review (optional)
  • Add content to markdown

ref: s43

Compatibility Test: check for the use of alpha K8s API endpoints

Acceptable Criteria

Compatibility Test: check for the use of alpha K8s API endpoints

EPIC: CNF Conformance Test Suite

Release: v0.0.N

Test Category: Compatibility

Type of test (static or runtime) = TBD

Similar tests:

crystal src/cnf-conformance.cr api_snoop_beta
  • (WIP) To run K8s API testing for ensuring the use of generally available endpoints
crystal src/cnf-conformance.cr api_snoop_general_apis

Code Implementation Tasks:

  • Create test for "To run K8s API testing for checking for the use of alpha endpoints"

Documentation tasks:

  • Update Test Categories md if needed
  • Update Pseudo Code md if needed
  • Update USAGE md if needed
  • Update installation instructions if needed

Review Configuration and Lifecycle and add more content

Goal: Review Configuration and Lifecycle and add more content

Tasks:

ref: s39

[Workload] Microservice Test: Does the CNF use a proper init system?

Title: [Workload] Microservices test: specialized_init_system

Description of problem

There are proper init systems and sophisticated supervisors that can be run inside of a container. Both of these systems properly reap and pass signals. Sophisticated supervisors are considered overkill because they take up too many resources and are sometimes too complicated. Some examples of sophisticated supervisors are: supervisord, monit, and runit. Proper init systems are smaller than sophisticated supervisors and therefore suitable for containers. Some of the proper container init systems are tini, dumb-init, and s6-overlay.

Description of solution

The test should fails if PID 1 is supervisord, monit, or runit, and passes if PID 1 is tini, dumb-init, or s6-overlay
The test should fail if PID 1 is anything else.

https://cloud.google.com/architecture/best-practices-for-building-containers

Acceptance Criteria:

Microservice Test: Microservices test: specialized_init_system

EPIC: CNF Conformance Test Suite

Release: vN.N.N

Test Category: Configuration

Type of test (static or runtime) = ?

  • example code: N/A

Environment set up tasks:

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

Sample CNF tasks:

Code implementation tasks:

  • [ ]

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Needs Peer Review column
    • create Pull Request and follow check list
    • Assign 1 or more people for peer review
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes,
    • move to Reviewer Approved column
    • Approve pull request
  • if no,
    • document what did not go as expected, including error messages and screenshots (if possible)
    • Add comment to pull request
    • request changes to pull request

Reference:

Tools:

  • Falco
  • sysdig-inspect

[Documentation] update TEST-CATEGORIES.md to reflect updated content on slides v0.3

[Documentation] update TEST-CATEGORIES.md to reflect updated content on slides v0.3

Short description:

  • update the Test-Categories markdown with up-to-date conformance tests
  • remove platform related tests and add to #32 to be deferred but documented

Tasks:

[Documentation] Create MAINTAINERS.md

[Documentation] Create MAINTAINERS.md

Short description:

  • A markdown file containing information about maintainers and contributors.
  • Moving content from main README.md

Configuration test: is there a liveness entry in the Helm chart?

Acceptance Criteria

Configuration test: is there a liveness entry in the Helm chart?

Short Description:

  • to check for a liveness entry in the deployment file of the Helm chart

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: Configuration and Lifecycle

Type of test (static or runtime) = Runtime

  • example code: #72

Environment set up tasks:

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

Sample CNF tasks:

Code implementation tasks:

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Needs Peer Review column
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Reviewer Approved column
  • if no, document what did not go as expected, including error messages and screenshots (if possible)

Scalability Test: Can CNF increase and decrease capacity?

Acceptance Criteria

Scalability Test: Can CNF increase and decrease capacity?

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: Scalability

Type of test (static or runtime) = Runtime

Environment set up tasks:

  • Copy admin.conf (the kubeconfig) to new file name $HOME/shared/conformance01.kubeconfig (for accessing the shared conformance cluster)
  • Get SSH access to one of the shared dev machines to use as your test workstation
  • Talk with @denverwilliams, @wavell to get access to the KUBECONFIG file
  • Set the KUBECONFIG environment variable to point to the shared kubeconfig file for accessing the target K8s cluster export KUBECONFIG=~/shared/conformance01.kubeconfig)
  • Follow the installation instructions to set up the the conformance suite for development and testing
  • Update installation instructions to cover new setup and existing workstation updates. Example:
    • You should have a working conformance suite that compiles and runs correctly. (eg. crystal-lang installed)
    • If you have it installed, pull down latest version of CNF conformance test code from develop branch (eg. git fetch ; get rebase from the cnf-conformance directory)
    • Run shard install to get dependencies

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

  • Use the https://github.com/cncf/cnf-conformance/tree/master/cnfs for adding target CNFs to be tested
  • Create example conformance configuration file for configuring the use of the target CNF
  • Create example environment configuration that has the CNF container name list
  • Create code to use the conformance CNF configuration and target folder for testing the CNF
  • Add documentation for testing a target CNFs with the cnformance suite (eg. add to usage md). Uncludes
    • Path to Helm chart under cnfs folder
    • Options to pass helm chart
  • Add documentation for using target CNFs with the cnformance suite (eg. add to usage md), Include
    • The name of the containers needs to be configured

Sample CNF tasks:

  • Create a sample-cnf folder
  • Create a subfolder for the sample cnf (eg. dns-cnf1)
  • Create a sample CNF using a minimal container which requires no host or vanilla K8s modifications (no extensions) --> eg. CoreDNS container
  • Create sample CNF conformance configuration file for using the sample CNF
  • Create sample environment configuration that has the sample CNF container name list
  • Add TL;DR doc on using the sample in the sample folder

Code implementation tasks:

  • If one test blows up (eg. CNF code not found for static) the suite should continue to run
  • Add util task which can deploy a CNF that has "valid conformance deploy configuration"
    • helm chart v3.0
    • helm chart path
    • containers name
    • NOTE: does not run when tests run (include all)
  • Create new increase test which increases the replica set
    • Check and save current replica count
    • At start set replica to 1 (overriding CNF defaults)
    • Show data from cluster about container
    • Do increase
    • Show data from cluster about container
    • Reset replica back to original saved replica count
    • Show pass or fail for doing increase
    • Show green for pass and red for fail
  • Create new decrease test which decreases the repica set
    • Check and save current replica count
    • At start set replica to more than 1 (Eg. 3; overriding CNF defaults)
    • Show data from cluster about container
    • Do decrease
    • Show data from cluster about container
    • Reset replica back to original saved replica count
    • Show pass or fail for doing decrease
    • Show green for pass and red for fail
  • Update existing increase_decrease test to call the individual increase and decrease
  • Think about and document how we can roll up a summary for sets of tests => lfn-cnti/certification#30
  • Scalability category should call the increase and decrease test set
  • The all test command should run the increase and decrease tests
  • Add the increase test to the "runtime test set"
  • Add the decrease test to the "runtime test set"
  • Optionally, Add the "increase+decrease test set" to the "runtime test set"

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?

Steps after A/C Passes for developer:

If all A/C passes for developer

  • open a Pull Request to master branch and mark as "developer approved"
  • Tag team members for peer review

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Reviewer Approved column
  • if no, document what did not go as expected, including error messages and screenshots (if possible)

Steps after A/C fails

If all A/C fails for peer reviewer

  • Add a comment to the PR summarizing the problem tagging the developer
  • Attach any console output or logs that can help the developer fix the issue

Steps after A/C Passes for peer reviewer

  • Mark the PR as approved and merge the PR into master

[Documentation] Create an EXAMPLES.md and list example CNFs

[Documentation] Create an EXAMPLES.md

Short description:

  • Create an EXAMPLES.md

  • Describe 4-5 open source CNFs that could run in the CNF Conformance Test Suite > ie. CoreDNS Sample CNF

  • Describe pros and cons to using each CNF in the evolution from VNF to CNF (Gold)

Tasks:

  • Create an EXAMPLES.md
  • Create an outline
  • Create a rough draft
  • Peer review of draft
  • Iterate as needed, peer review (optional)
  • Add content to EXAMPLES.md

Review Stateless Tests and add more content

Goal: Review Stateless Tests and add more content

Tasks:

ref: s36

[Documentation] update USAGE.md to reflect updated content on slides v0.3

[Documentation] update USAGE.md to reflect updated content on slides v0.3

Short description:

  • update the Usage markdown with up-to-date conformance tests
  • remove platform related tests and add to #32 to be deferred but documented

Tasks:

  • review v0.3 deck
  • make adjustments to ### [Documentation] update PSEUDO-CODE.md to reflect updated content on slides v0.3
  • submit pull request with edits
  • peer review of pull request
  • merge pull request into master branch

Review Installable and Upgradeable tests and add more content

Goal: Review Installable and Upgradeable tests and add more content

Tasks:

ref: s41

Review Compatibility Tests and add more content

Goal: Review Compatibility Tests and add more content

Tasks:

ref: s35

Review Scalability Tests and add more content

Goal: Review Scalability Tests and add more content

Tasks:

ref: s37

Update high-level README.md for CNF Conformance test categories

Goal: Update high-level README.md for CNF Conformance test categories

Tasks:

Configuration test: is there a readiness entry in the Helm chart?

Acceptance Criteria

Configuration test: is there a readiness entry in the Helm chart?

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: Configuration and Lifecycle

Type of test (static or runtime) =

  • example code: #72

Environment set up tasks:

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A

CNF setup Tasks

Sample CNF tasks:

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Needs Peer Review column
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Reviewer Approved column
  • if no, document what did not go as expected, including error messages and screenshots (if possible)

[Documentation] Create slides to show running all of the CNF Conformance tests crystal src/cnf-conformance.cr all

[Acceptance Criteria]

[Documentation] Create slides to show running all of the CNF Conformance tests

Short description:

  • to create example slides to show screenshots of running all tests (as of Feb 26)

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: all

Type of test (static or runtime) = both


Tasks:

crystal src/cnf-conformance.cr all
  • capture screen grabs of process
  • create slide deck
  • add images to slides

Proof of Concept: Create PoC scoring system for Workload / Application tests

Proof of Concept: Scoring results from tests

Test Category: Scoring

Type of test (static or runtime) = N/A

Tasks:

  • Add a quick overview of the type of test you are researching/creating a POC for
  • Investigate potential tools for implementation and document findings, https://hackmd.io/new (add link to ticket)
  • Select a tool to use, minimal/least effort, and add selection to ticket
  • Add new POC test code
  • Add comment suggesting updates as needed for:
  • Tag 1 or more people to peer review

Reference:

https://docs.google.com/presentation/d/1Bci-rzXnVqlvT2hhSXCBawtsKf8HURC2K4kJSlnB43Q/edit#slide=id.g7c55edb53f_0_535

If the CNF Conformance Test Suite proves useful, it would be natural to build out a certification program for CNFs
This could replicate the self-certification process used by the Certified Kubernetes program
It can be done in conjunction with LF Networking’s OPNFV Verification Program (OVP) and the Common NFVI Telco Task Force (CNTT)
One option would to be to emulate LEED Certification and the Core Infrastructure Initiative Best Practices Badge by having the test suite specify scoring ranges as bronze, silver, etc.
We also want probably want to explicitly include a β€œnot-so-great” result meaning that that the CNF does not implement some base level of best practices
It is not clear that there is any need for platform conformance and certification beyond what is already provided by Certified Kubernetes

[Documentation] update PSEUDO-CODE.md to reflect updated content on slides v0.3

[Documentation] update PSEUDO-CODE.md to reflect updated content on slides v0.3

Short description:

  • update the Pseudo-Code markdown with up-to-date conformance tests
  • remove platform related tests and add to #32 to be deferred but documented

Tasks:

Review Security Tests and add more content

Goal: Review Security Tests and add more content

Tasks:

ref: s38

[Documentation] Re-name "Hardware and Affinity support" to "Hardware Resources and Scheduling Tests" in USAGE.md, Pseudo Code and Test Categories

[Documentation] Re-name "Hardware and Affinity support" to "Hardware Resources and Scheduling Tests" in USAGE.md, Pseudo Code and Test Categories

Short description:

  • fix typo
  • rename Hardware and Affinity support Tests to Hardware Resources and Scheduling Tests

Tasks:

Installable test: Is the CNF's helm chart valid (ie. does it pass linting)?

WIP Acceptance Criteria

Installable test: Is the CNF's helm chart valid / Does the CNF's helm chart pass linting?

EPIC: CNF Conformance Test Suite

Release: v0.0.1

Test Category: Installable + Upgradeable

Type of test (static or runtime) = static


Environment set up tasks:

  • Follow the installation instructions to set up the the conformance suite for development and testing
  • Update installation instructions to cover new setup and existing workstation updates. Example:
    • You should have a working conformance suite that compiles and runs correctly. (eg. crystal-lang installed)
    • If you have it installed, pull down latest version of CNF conformance test code from develop branch (eg. git fetch ; get rebase from the cnf-conformance directory)
    • Run shard install to get dependencies

Upstream tool set up tasks: (conformance suite + upstream tools)

  • N/A linter is part of Helm, Helm is installed already

Sample CNF tasks: (eg. Vendor CNF)

  • update sample cnf-conformance.yml for using CoreDNS as a valid CNF in the sample coredns folder
    • Example config:
    ---
    cnf_name: coredns
    deployment_name: coredns # coming in issue #24
    chart_path: cnfs/coredns 
    
  • Create a bad helm chart CNF Sample based on CoreDNS working chart
  • Create a sample configuration for testing a CNF
    • cnf folder name (that's a subdir of the /cnfs/ folder)
    • chart folder name
    ---
    cnf_name: badhelmchart
    deployment_name: badhelmchart # coming in issue #24
    chart_path: cnfs/sample-bad-helm-chart
    

Target CNF Tasks (eg. How do we use the sample CNF)

DEFERRED See lfn-cnti/certification#6 (comment)

  • Check /cnfs folder for CNFs.
    • For each folder check inside for a cnf-conformance.yml. If the file is found run conformance tests for that CNF
  • Update documentation to say that each CNF should be in a subfolder of the CNF

Code implementation tasks:

  • If one test blows up (eg. CNF code not found for static) the suite should continue to run
  • Add code to run helm linter
  • Add code for checking results in output from the linter
  • Add code for specifying the helm chart path
    • Support finding helm chart path from target CNF configuration file. Example pseudo configuration:
    ---
    cnf_name: coredns
    deployment_name: coredns # coming in issue #24
    chart_path: cnfs/coredns 
    
    • Support finding helm chart path from CLI option. Example pseudo code: --cnf-chart-path cnfs/coredns/cnf-conformance.yml
  • Print the name of the chart that was tested
  • Print if the test was PASS or FAIL
  • Make PASS green and RED fail
  • Add the this new test to as a dependent test to the appropriate category so that it runs when that category runs

Documentation tasks:

QA tasks

Dev Review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Needs Peer Review column
  • if no, document what additional tasks will be needed

Peer review:

  • walk through A/C
  • do you get the expected result?
  • if yes, move to Reviewer Approved column
  • if no, document what did not go as expected, including error messages and screenshots (if possible)

Sample CNFs for testing in with the CNF Conformance suite

To help with developing and continually testing the CNF Conformance suite it would be nice to have a set of sample CNFs to use.

General requirements or guidelines for the samples:

  • Easy to install (eg. helm v3.0)
  • No host modifications
  • Easy to install K8s extensions (if required), with no host reboot required
  • Information on how the CNF is used in a real world use case (so it's purpose can be communicated)

Feel free to ideas for CNFs

Review Planned Implementation and add more content

Goal: Review Planned Implementation and add more content

Tasks:

ref: s25

Review Observability and add more content

Goal: Review Observability and add more content

Tasks:

ref: s40

Upstream tools and projects which can be used for testing CNF Conformance

What are open source tools and projects which can be used in testing CNF Compliance.

Some examples could be of tools and areas to test

  • APIsnoop: Use Kubernetes audit logs to track every K8s API call used by a CNF and therefore specify what version of K8s is required and any beta or alpha API usage
  • Helm v3 chart testing (ct): linting and testing
  • Helm v3 installation: Functional test on CNF Testbed
  • Validate Prometheus metrics using promtool
  • Validate OpenTelemetry metrics
  • Validate Fluentd-compatible logging

[Documentation] create an INSTALL.md

Acceptance Criteria

[Documentation] create an INSTALL.md

Short description:

  • to provide potential project contributors with an install guide to how they can set up the CNF Conformance Test Suite on their device

Location:

Tasks:

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.