embed

package module
v1.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README ΒΆ

Frisbee - A Test Automation Framework For Kubernetes

Website | Blog | Docs | Contact

What is Frisbee ?

Frisbee is a workflow-based engine that lowers the threshold of testing containerized applications on Kubernetes.

Frisbee is implemented as a set of Kubernetes CRD (Custom Resource Definition) that:

  • Setup initial application stack – easily!

  • Test against actual, close to production software - no mocks!

  • Replay complex workloads written in an intuitive language!

  • Combine Chaos Engineering with large-scale performance testing!

  • Assert actual program behavior and side effects.

To learn more about Frisbee, check the QuickStart tutorial or visit our Website.

Use-Cases and Testing Patterns

πŸ‘‰ Databases

πŸ‘‰ Federated Learning

πŸ‘‰ Filesystems

πŸ‘‰ HPC

πŸ‘‰ Networking

Getting Started

Before starting, Make sure that kubectl and Helm are installed on your system.

For quick testing, you can use microk8s. In that case, make sure you have added the addons and created aliases to the commands.

sudo microk8s config > ~/.kube/config
sudo microk8s enable dns ingress helm3
sudo snap alias microk8s.kubectl kubectl
sudo snap alias microk8s.helm3 helm

Install Frisbee CLI and Frisbee Platform

Then, run the install.sh, that will deploy the Frisbee Terminal as an extension to kubectl.

curl -sSLf https://frisbee.dev/install.sh | bash

Through Frisbee Terminal we can easily install the Frisbee Platform.

kubectl frisbee install production

Once installed, you can follow the controller's output using:

kubectl logs -l control-plane=frisbee-operator -n frisbee --follow

Finally, download the Frisbee repo from GitHub.

git clone git@github.com:CARV-ICS-FORTH/frisbee.git

This step is not really needed for the installation. We use it to get local access in examples and charts directories.

  • examples: contains a list of test-cases.
  • charts: contains Helm charts that provide templates used in the test-cases.

Submit a Testing Job.

Let's start by running the hello-world.

kubectl frisbee submit test demo- ./examples/1.hello-world.yml

The name can be explicit (e.g, my-demo), or autogenerated given a prefix followed by a - (e.g, demo-).

In any case, submit returns the test id (| awk /test:/'{print $4}) so that it can be used to downstream commands.

Inspect Submitted Jobs.

To get a list of submitted tests, use:

kubectl frisbee get tests

Note that every test-case runs on a dedicated namespace (named after the test). To further dive into execution details use:

kubectl frisbee inspect tests demo-482

Live Progress Monitoring

Let's try something more complex to demonstrate the integration of Frisbee with Prometheus/Grafana.

kubectl frisbee submit test demo- examples/15.performance-monitoring.yml charts/system charts/networking/iperf2

Notice that we modified the command to include dependencies required for the execution of the scenario.

  • charts/systems: provides the templates for the telemetry stack.
  • charts/networking/iperf: provides the templates for iperf benchmark.

All that it takes now is to open the URLs of section Visualization Dashboards in your browser. You can it either manually or via the one-liner:

firefox $(kubectl frisbee inspect tests demo-710 | grep grafana- | awk '{print $3'})

In contrast to the vanilla Grafana which plots only the performance metrics, Frisbee provides Contextualized Visualizations that contain information for:

  • Joining nodes (blue vertical lines)
  • Exiting nodes (orange vertical lines)
  • Fault-Injection (red ranges)

Information like that helps in root-cause analysis, as it makes it easy to correlate an observed behavior back to a testing event.

For example, in the next figure, it fairly easy to understand that INSERT_ERROR messages (yellow line) are triggered by a fault-injection event.

Features

πŸ‘‰ Workflow templating to store commonly used workflows in the cluster.

πŸ‘‰ DAG based declaration of testing workflows.

πŸ‘‰ Step level input & outputs (template parameterization).

πŸ‘‰ Conditional Execution (Time-Driven, Status-Driven, Performance-Driven).

πŸ‘‰ Live Progress monitoring via Prometheus/Grafana.

πŸ‘‰ Assertions and alerting of SLA violations.

πŸ‘‰ Placement Policies (affinity/tolerations/node selectors).

πŸ‘‰ Archiving Test results after executing for later access.

πŸ‘‰ On-Demand reliable container attached storage.

πŸ‘‰ Garbage collection of completed resources.

πŸ‘‰ Chaos-Engineering and Fault-Injection via Chaos-Mesh.

πŸ‘‰ On-Demand reliable container attached storage.

πŸ‘‰ CLI applications to test management and test inspection.

To learn how to use these features, check the Walkthrough.

Citation

If you publish work that uses Frisbee, please cite Frisbee as follows:

@article{nikolaidis2021frisbee,
title={Frisbee: automated testing of Cloud-native applications in Kubernetes},
author={Nikolaidis, Fotis and Chazapis, Antony and Marazakis, Manolis and Bilas, Angelos},
journal={arXiv preprint arXiv:2109.10727},
year={2021}
}

Contributing to Frisbee

We welcome contributions. Please see CONTRIBUTING.md to get started!

Acknowledgements

This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 894204 (Ether, H2020-MSCA-IF-2019).

Documentation ΒΆ

Overview ΒΆ

Package embed is used to embed the various required scripts into the Frisbee Terminal. This allows to execute the Terminal from any path. For more info see https://zetcode.com/golang/embed/

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

View Source
var Hack embed.FS

Functions ΒΆ

func CopyLocallyIfNotExists ΒΆ

func CopyLocallyIfNotExists(static embed.FS, installationDir string) error

CopyLocallyIfNotExists duplicates the structure of embedded fs into the installation dir.

Types ΒΆ

This section is empty.

Directories ΒΆ

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the Frisbee v1alpha1 API group +kubebuilder:object:generate=true +groupName=frisbee.dev
Package v1alpha1 contains API Schema definitions for the Frisbee v1alpha1 API group +kubebuilder:object:generate=true +groupName=frisbee.dev
cmd
controllers
hack
api-docs/template
Package template keeps a placeholder file to make Go vendor this directory properly.
Package template keeps a placeholder file to make Go vendor this directory properly.
pkg
home
Package home calculates filesystem paths to Frisbee's configuration, cache and data.
Package home calculates filesystem paths to Frisbee's configuration, cache and data.
home/xdg
Package xdg holds constants pertaining to XDG Base Directory Specification.
Package xdg holds constants pertaining to XDG Base Directory Specification.
ui
Package ui provides a simple terminal ui
Package ui provides a simple terminal ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL