generated from cisco-ospo/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
109 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
# Synthetic Heart - Kubernetes synthetic testing and monitoring framework | ||
# Synthetic Heart - Kubernetes synthetic testing and monitoring framework | ||
|
||
Synthetic Heart is a synthetic testing and monitoring framework for Kubernetes clusters. It allows operators to run synthetic tests, then check and monitor the results through an API or through metrics (via Prometheus). | ||
|
||
## Architecture | ||
|
||
Synthetic Heart is comprised of four components: | ||
|
||
- [Agent](./agent): Runs the actual tests, watches redis/kv-store for test configs | ||
- [Rest api](./restapi): To query test results, logs and agent details | ||
- [Controller](./controller): K8s controller (watches for SyntheticTest CRD), and stores them in redis for agents to pick up/query | ||
|
@@ -56,70 +57,73 @@ The plugin manager is responsible for handling the lifecycle of these plugins. I | |
Synthetic Heart also comes with a Rest API which lets external services query test results etc. It is essentially a shim for the Redis storage. | ||
## Installation | ||
### With Helm Chart | ||
Easiest way to run synthetic-heart is to install the helm chart in the `charts/` directory. | ||
|
||
Prerequisites: | ||
- Kubernetes cluster (Tested with v1.25+, older versions may work) | ||
- [Helm v3](https://helm.sh/docs/intro/install/#helm) | ||
|
||
- Kubernetes cluster (Tested with v1.25+, older versions may work) | ||
- [Helm v3](https://helm.sh/docs/intro/install/#helm) | ||
|
||
Steps to follow: | ||
- Install the [synthetic-heart](./chart/synthetic-heart) Helm chart | ||
- Run: `helm upgrade -i synthetic-heart -n synthetic-heart .` in `charts/` directory. | ||
- This installs the RestAPI, Agents (as DaemonSet), Controller, and Redis. | ||
- Install the [synthetic-tests](./chart/synthetic-tests) Helm chart | ||
- Run `helm upgrade -i synthetic-tests -n synthetic-heart .` in `charts/` directory. | ||
- This installs two example synthetic tests. | ||
- You may then port forward the rest api to query results. | ||
- Run `kubectl port-forward svc/synheart-api-svc 8080:8080 -n synthetic-heart` | ||
- and then query the tests `curl http://localhost:8080/api/v1/tests` | ||
|
||
- Install the [synthetic-heart](./chart/synthetic-heart) Helm chart | ||
- Run: `helm upgrade -i synthetic-heart -n synthetic-heart .` in `charts/` directory. | ||
- This installs the RestAPI, Agents (as DaemonSet), Controller, and Redis. | ||
- Install the [synthetic-tests](./chart/synthetic-tests) Helm chart | ||
- Run `helm upgrade -i synthetic-tests -n synthetic-heart .` in `charts/` directory. | ||
- This installs two example synthetic tests. | ||
- You may then port forward the rest api to query results. | ||
- Run `kubectl port-forward svc/synheart-api-svc 8080:8080 -n synthetic-heart` | ||
- and then query the tests `curl http://localhost:8080/api/v1/tests` | ||
|
||
### Without Helm Chart | ||
|
||
It might be a bit more complex to install the components manually. Please explore the [Helm chart](./chart/synthetic-heart) to check the example configurations for different Kubernetes resources. The dependencies, and major components are described below. | ||
|
||
A few Kubenretes resources need to be installed: | ||
- CustomResourceDefinition - The `SyntheticTest` CRD needs to be installed. [Link to CRD.](./controller/config/crd/bases/synheart.infra.webex.com_synthetictests.yaml) | ||
- Redis - Redis v7 needs to be installed so the test configs and results can be stored. | ||
- A `Service` is also needed, so the redis endpoint can be accessed by agents. | ||
- Controller - Needs to be deployed as a `Deployment`. | ||
- The controller needs `ServiceAccount`, `ClusteRole`, `ClusterRoleBinding`, allowing it to query and modify `SyntheticTests`. | ||
- Agents - Can be deployed as a `DaemonSet`. | ||
- The configuration of the agents is passed in as a file. The file should be mounted from a `ConfigMap` | ||
- RestApi - Needs to be deployed as a `Deployment` | ||
- The configuration of the agents is passed in as a file. The file should be mounted from a `ConfigMap` | ||
- A `Service` for the Restapi is needed. | ||
- Optionally an `Ingress` can be added to the Restapi to make the API accessible from outside the cluster. | ||
|
||
- CustomResourceDefinition - The `SyntheticTest` CRD needs to be installed. [Link to CRD.](./controller/config/crd/bases/synheart.infra.webex.com_synthetictests.yaml) | ||
- Redis - Redis v7 needs to be installed so the test configs and results can be stored. | ||
- A `Service` is also needed, so the redis endpoint can be accessed by agents. | ||
- Controller - Needs to be deployed as a `Deployment`. | ||
- The controller needs `ServiceAccount`, `ClusteRole`, `ClusterRoleBinding`, allowing it to query and modify `SyntheticTests`. | ||
- Agents - Can be deployed as a `DaemonSet`. | ||
- The configuration of the agents is passed in as a file. The file should be mounted from a `ConfigMap` | ||
- RestApi - Needs to be deployed as a `Deployment` | ||
- The configuration of the agents is passed in as a file. The file should be mounted from a `ConfigMap` | ||
- A `Service` for the Restapi is needed. | ||
- Optionally an `Ingress` can be added to the Restapi to make the API accessible from outside the cluster. | ||
|
||
## Credits and Acknowledgements | ||
|
||
Thank you to the following folks for contributing to synthetic-heart project: | ||
- Allen Guo: [email protected] | ||
- Ben Zhao: [email protected] | ||
- Cristian Maugeri: [email protected] | ||
- David Hazra: [email protected] | ||
- Jeff Wang: [email protected] | ||
- Jerry Zhang: [email protected] | ||
- Luke Ren: [email protected] | ||
- Lun Zhou: [email protected] | ||
- Meibao Wang: [email protected] | ||
- Mercion Wilathgamuwage: [email protected] | ||
- Shaz Balakumar: [email protected] | ||
|
||
- Allen Guo: <[email protected]> | ||
- Ben Zhao: <[email protected]> | ||
- Cristian Maugeri: <[email protected]> | ||
- David Hazra: <[email protected]> | ||
- Jeff Wang: <[email protected]> | ||
- Jerry Zhang: <[email protected]> | ||
- Luke Ren: <[email protected]> | ||
- Lun Zhou: <[email protected]> | ||
- Meibao Wang: <[email protected]> | ||
- Mercion Wilathgamuwage: <[email protected]> | ||
- Shaz Balakumar: <[email protected]> | ||
|
||
## Roadmap | ||
|
||
There's a lot of features that are still being worked on. [Get involved!](./CONTRIBUTING.md) | ||
|
||
- UI (currently being worked on) | ||
- Re-design agent deployment model (allow agents per node, per namespace etc.) | ||
- Allow agents to be deployed in different namespace, mount secrets etc. | ||
- Plugin versions | ||
- Dynamically add or remove plugins at build time (to reduce binary size) | ||
- More plugins | ||
- UI (currently being worked on) | ||
- Re-design agent deployment model (allow agents per node, per namespace etc.) | ||
- Allow agents to be deployed in different namespace, mount secrets etc. | ||
- Plugin versions | ||
- Dynamically add or remove plugins at build time (to reduce binary size) | ||
- More plugins | ||
|
||
## Contributing | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# DNS Test | ||
|
||
Resolves given domains to IPs | ||
|
||
## Test Details map | ||
|
||
1. `key`: `_log` | ||
- `value`: ip addresses for each domain tested | ||
|
||
|
||
## Example Configuration | ||
|
||
```yaml | ||
config: | | ||
domains: ["google.com"] | ||
repeats: 3 | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# Ping Test | ||
|
||
Sends an ICMP ping | ||
|
||
## Test Details map | ||
|
||
No extra info | ||
|
||
## Example Configuration | ||
|
||
```yaml | ||
config: | | ||
domain: 8.8.8.8 # Where to ping | ||
pings: 5 # How many pings to send | ||
privileged: true # Whether to run as root | ||
``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.