|
| 1 | +--- |
| 2 | +template: main.html |
| 3 | +--- |
| 4 | + |
| 5 | +# Metrics store |
| 6 | + |
| 7 | +One of Iter8's key advantages is that it incorporates its own metrics store simplifying the set up and execution of A/B/n and performance tests. Iter8 currently supports the following databases: |
| 8 | + |
| 9 | +- BadgerDB |
| 10 | +- Redis |
| 11 | + |
| 12 | +Iter8 uses BadgerDB by default. Note, however, that BadgerDB is not suitable for production use and is only suitable for a single instance of Iter8. Support for other databases are in the works. See [below](#contribute-a-new-metrics-store-implementation) for details on how to contribute additional implementations. |
| 13 | + |
| 14 | +## Using Redis as the metrics store |
| 15 | + |
| 16 | +We assume that Redis is deployed. For example, for a basic deployment: |
| 17 | + |
| 18 | +```shell |
| 19 | +kubectl create deploy redis --image=redis/redis-stack:latest --port=6379 |
| 20 | +kubectl expose deploy redis --port=6379 |
| 21 | +``` |
| 22 | + |
| 23 | +Run Iter8 with the metrics store implementation set to `redis` and specify its endpoint: |
| 24 | + |
| 25 | +```shell |
| 26 | +helm upgrade --install --repo https://iter8-tools.github.io/iter8 --version 0.18 iter8 controller \ |
| 27 | +--set clusterScoped=true \ |
| 28 | +--set metrics.implementation=redis \ |
| 29 | +--set metrics.redis.addresss=redis:6379 |
| 30 | +``` |
| 31 | + |
| 32 | +## Contribute a new metrics store implementation |
| 33 | + |
| 34 | +To contribute a new metrics store implementation: |
| 35 | + |
| 36 | +1. Create an [issue](https://github.com/iter8-tools/iter8/issues) for discussion. |
| 37 | + |
| 38 | +2. Submit a pull request on the [Iter8 project](https://github.com/iter8-tools/iter8) with the following updates: |
| 39 | + |
| 40 | + - Create sub-folder in [storage](https://github.com/iter8-tools/iter8/tree/master/storage) and provide an implementation of this [interface](https://github.com/iter8-tools/iter8/blob/master/storage/interface.go) including test cases. |
| 41 | + |
| 42 | + - Add a new case to [metrics.GetClient()](https://github.com/iter8-tools/iter8/blob/master/storage/client/client.go) |
| 43 | + |
| 44 | + - Update [go.mod](https://github.com/iter8-tools/iter8/blob/master/go.mod) and [go.sum](https://github.com/iter8-tools/iter8/blob/master/go.sum) if needed. |
| 45 | + |
| 46 | + - Update the default Helm chart configuration [values.yaml](https://github.com/iter8-tools/iter8/blob/master/charts/controller/values.yaml) and bump the chart version in [Chart.yaml](https://github.com/iter8-tools/iter8/blob/master/charts/controller/Chart.yaml). |
| 47 | + |
| 48 | + - Please also consider including your information in our list of [adopters](https://github.com/iter8-tools/iter8/blob/master/ADOPTERS.md). |
| 49 | + |
| 50 | +3. Submit a second pull request on the Iter8 [docs project](https://github.com/iter8-tools/docs) updating the list of available implementations. |
| 51 | + |
| 52 | +4. Alert the project reviewers on [Slack](https://join.slack.com/t/iter8-tools/shared_invite/zt-awl2se8i-L0pZCpuHntpPejxzLicbmw) `#development` channel. |
0 commit comments