diff options
author | 2018-04-12 03:30:51 +0100 | |
---|---|---|
committer | 2018-04-22 19:20:27 +0200 | |
commit | 2661217feae610af61b11ed5115b7a6b3fbbd81d (patch) | |
tree | 455730095a3486997282d41dab973b499efad2f2 /doc | |
parent | c804a42132470ba9230b0d99e78112e3c50b0144 (diff) |
Add ONS2018 functest-k8s meeting presentation
Change-Id: Iadb0942b2699cae05698df2ee3689d3d1eed963e
Signed-off-by: Konrad Djimeli <konraddjimeli@gmail.com>
(cherry picked from commit 8be08fb1860e05efd1b71958866ce87efecf2d94)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/pres/ons2018/index.html | 52 | ||||
-rw-r--r-- | doc/pres/ons2018/ons2018-functest-kubernetes.md | 130 | ||||
m--------- | doc/pres/reveal.js | 0 |
3 files changed, 182 insertions, 0 deletions
diff --git a/doc/pres/ons2018/index.html b/doc/pres/ons2018/index.html new file mode 100644 index 00000000..5d3a87dd --- /dev/null +++ b/doc/pres/ons2018/index.html @@ -0,0 +1,52 @@ +<html> +<head> +<title>Functest-kubernetes</title> +<meta name="author" content="Konrad Djimeli"> +<meta name="viewport" + content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> +<link rel="stylesheet" href="../reveal.js/css/reveal.css"> +<link rel="stylesheet" href="../reveal.js/css/theme/white.css"> +<link rel="stylesheet" href="../reveal.js/lib/css/zenburn.css"> +<script> +var link = document.createElement( 'link' ); +link.rel = 'stylesheet'; +link.type = 'text/css'; +link.href = window.location.search.match( /print-pdf/gi ) ? '../reveal.js/css/print/pdf.css' : '../reveal.js/css/print/paper.css'; +document.getElementsByTagName( 'head' )[0].appendChild( link ); +</script> +</head> +<body> + <div class="reveal"> + <div class="slides"> + <section data-markdown="ons2018-functest-kubernetes.md" data-separator="^\n\n\n" + data-separator-vertical="^\n\n" data-separator-notes="^Note:"></section> + </div> + </div> + <script src="../reveal.js/lib/js/head.min.js"></script> + <script src="../reveal.js/js/reveal.js"></script> + <script> + Reveal.initialize({ + dependencies : [ { + src : '../reveal.js/plugin/markdown/marked.js', + condition : function() { + return !!document.querySelector('[data-markdown]'); + } + }, { + src : '../reveal.js/plugin/markdown/markdown.js', + condition : function() { + return !!document.querySelector('[data-markdown]'); + } + }, { + src: '../reveal.js/plugin/highlight/highlight.js', + async: true, + callback: function() { + hljs.initHighlightingOnLoad(); + } + }, { + src: '../reveal.js/plugin/notes/notes.js', + async: true + } ] + }); + </script> +</body> +</html> diff --git a/doc/pres/ons2018/ons2018-functest-kubernetes.md b/doc/pres/ons2018/ons2018-functest-kubernetes.md new file mode 100644 index 00000000..d9f77874 --- /dev/null +++ b/doc/pres/ons2018/ons2018-functest-kubernetes.md @@ -0,0 +1,130 @@ +### Functional testing for OPNFV Kubernetes (K8s) deployments with Functest + +By: [Konrad Djimeli](mailto:konraddjimeli@gmail.com) (OPNFV Functest Intern) + +Mentor: [Linda Wang](mailto:wangwulin@huawei.com) + + + +### Overview + +Development or integration of tests which can be used to test the functionalities of a Kubernetes deployment, in OPNFV Functest + + + +### Kubernetes + +**Kubernetes (K8s)** is an open source container manager and orchestrator, and can be used as a VIM to orchestrate containerized VNFs. + + + +### K8s provides an End-to-End(e2e) testing framework. + +* Build/deploy/test kubernetes clusters on various providers. +* This tests provide a mechanism to test end-to-end behavior of the system. + + + +### K8s End-to-End (e2e)testing + +* The Kubernetes e2e tests are a combination of tests which fall under various categories such as [slow] (more than five minutes), [Serial] (can not run in parallel), etc + + +### The k8s e2e tests includes smoke and conformance tests + + +**Smoke test:** Tests a running Kubernetes cluster. Validates that the cluster was deployed, is accessible, and at least satisfies minimal functional requirements. Emphasis on speed and being non-destructive over thoroughness. + + +**Conformance tests** : Test expected to pass on any Kubernetes cluster. It is a subset of tests necessary to demonstrate conformance grows with each release. Conformance is thus considered versioned, with backwards compatibility guarantees and are designed to be run with no cloud provider configured. + + +**The k8s e2e test can be accessed by running the example commands below, within the K8s source code root directory** + +* Build: +``` +make WHAT=test/e2e/e2e.test +``` + +* Run: +``` +_output/bin/e2e.test --ginkgo.skip="\[Slow\]" --ginkgo.focus=\[Conformance\]" +``` + + + +### Integration of the k8s e2e testing framework with OPNFV Functest + +In order to integrate k8s e2e tests into functest, various options were considered such as: + + +### Option #1 +* Creating a docker image with opnfv/functest-core as base image and making use the Functest’s BashFeature class functionality to run the command for the test. + + +## OR + + +### Option #2 +* Creating a docker image with opnfv/functest-core as base image and creating a new class which inherits from the functest.core.testcase.TestCase class, which would contain subclasses for various testcases to be run, which are declared in a testcases.yaml file. + + +**Steps taken to integrate k8s e2e testing into Functest include:** + +* Creating a docker image with opnfv/functest-core as base image (replaced by xtesting) +* Building/setting up the k8s e2e testing framework and it requirements in the docker image +* Adding the K8sTesting class which inherits from xtesting.core.testcase.TestCase class. It defines the k8s testcases, ensures required env vars are set and logs test output and results. +* Creation of a testcases.yaml file, as required by Functest. + +Source code can be found on [gerrit](https://gerrit.opnfv.org/gerrit/gitweb?p=functest-kubernetes.git;a=tree) + + + +### Testing OPNFV k8s deployment with Functest + +To test an example k8s compass deployment, we can do the following + + +**1.** Get and place your k8s deployment config file in a directory accessible by Functest + + +**2.** Create an envfile with required environment variables. + +``` +DEPLOY_SCENARIO=k8-nosdn-nofeature-ha +KUBE_MASTER_IP="192.16.1.210:6443" +KUBERNETES_PROVIDER=local +KUBE_MASTER_URL=https://192.16.1.210:6443 +``` + + +**3.** Run the OPNFV Functest Kubernetes image + +``` +sudo docker run --env-file envfile \ +-v path/to/kube/config:/root/.kube/config \ +opnfv/functest-kubernetes +``` + + + +### Issues Faced + +* Version of k8s to be used for testing (currently v1.9.4) +* Virtual deployment using various OPNFV deployers (JOID) + + + +### What still needs to be done + +* Integrating more K8s testcases +* Make logging more reliable +* Ensure tests work well on different deployments (Compass/Joid/XCI) +* Add exhaustive documentation of tests and how they work +* Complete/update unit testing +* Optimize container +* Add documentation + + + +*We intend to ensure Functest K8s testing, properly provides functionality testing for OPNFV Kubernetes deployments and to also make it a very reliable testing framework.* diff --git a/doc/pres/reveal.js b/doc/pres/reveal.js new file mode 160000 +Subproject a2e69a4b42f9e968406f62073d1c4bf0ea2d336 |