Skip to content

Commit

Permalink
#1297 WIP Update Analytics Helm Chart (#1331)
Browse files Browse the repository at this point in the history
* 1297 WIP Update Analytics Helm Chart

Signed-off-by: glindsell <gl@seldon.io>

* Update README.md

ns: seldon -> seldon-system

* first try

* add preprocessor and structure notebook

* pack outlier detection into seldon deployment

* add endpoint that combines the classification and outlier detection

* polish example and return outliers score via tags

* cleanup model wrapper

* push alternative layout of the example

* add combiner to the example

* add comments in new notebook

* use jsonData instead of strData for return values

* add logging

* introduce base image to optimize s2i builds

* remove redundant version of the example

* adjust image names

* add images and remove output from requirement installation cells

* Bump pillow from 6.2.0 to 7.0.0 in /python

Bumps [pillow](https://github.com/python-pillow/Pillow) from 6.2.0 to 7.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](python-pillow/Pillow@6.2.0...7.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump okhttp from 4.2.2 to 4.3.0 in /engine

Bumps [okhttp](https://github.com/square/okhttp) from 4.2.2 to 4.3.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.2.2...parent-4.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Automatically find deployment names in e2e tests, closes #820

New approach is based on getting deyployment names directly from
SeldonDeployment objects. This allow to avoid hard-coded hashes in
test scripts.

* set deployment replicas

* Use https for training set

* Remove log4j from pom

* Update link

* apply fix to other tests and iterate over deployments in wait_for_rollout

* adjust to tests being run with Python 3.6

* remove note about missing graph, add nblink

* modify local operator tests to use proper namespace and run helm uninstall at the end

* update to new kind

* request ephemeral storage

* exception should be logged

* Bump okhttp from 4.3.0 to 4.3.1 in /engine

Bumps [okhttp](https://github.com/square/okhttp) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.3.0...parent-4.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* operator build test

* 1297 WIP Update Analytics Helm Chart

Signed-off-by: glindsell <gl@seldon.io>

* typo fix: missing api in io.seldon.wrapper.api.SeldonPredictionService

* Create and use seldonio/core-builder:0.10

* fix operator build - controller-gen install for go modules

* make gpu image Python 3 exclusive, closes #1324

* version 1.0.1

* version 1.0.2-SNAPSHOT

* seldon-core python version 1.0.1

* python wrapper version usage updated

* update images reference doc

Co-authored-by: RafalSkolasinski <r.j.skolasinski@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gonzalez <adrian.gonz.mar@gmail.com>
Co-authored-by: Ryan Dawson <ryandawson@cantab.net>
Co-authored-by: Gurminder Sunner <gsunner2000@gmail.com>
  • Loading branch information
6 people authored Jan 15, 2020
1 parent e2c0eb4 commit 95951e9
Show file tree
Hide file tree
Showing 31 changed files with 140 additions and 695 deletions.
9 changes: 9 additions & 0 deletions helm-charts/seldon-core-analytics/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: grafana
repository: https://kubernetes-charts.storage.googleapis.com
version: 4.2.3
- name: prometheus
repository: https://kubernetes-charts.storage.googleapis.com
version: 9.7.4
digest: sha256:c313809a039950dbef7a16b0e1cd27ea3611ffd6780d123da68a3a3f9400d8f8
generated: "2020-01-08T14:10:53.298192702Z"
9 changes: 9 additions & 0 deletions helm-charts/seldon-core-analytics/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ name: seldon-core-analytics
sources:
- https://github.com/SeldonIO/seldon-core
version: 1.0.2-SNAPSHOT
dependencies:
- name: "grafana"
condition: grafana.enabled
version: "~4.2.3"
repository: "https://kubernetes-charts.storage.googleapis.com"
- name: "prometheus"
condition: prometheus.enabled
version: "~9.7.3"
repository: "https://kubernetes-charts.storage.googleapis.com"
12 changes: 4 additions & 8 deletions helm-charts/seldon-core-analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,20 @@ This is a Prometheus and Grafana installation with a basic Grafana dashboard sho

## Installation

The Helm chart takes the following parameters:

* ```grafana_prom_admin_password``` : The password for logging into Grafana with the admin account
* ```persistence.enabled``` : Whether to try and run with persistence. If ```true``` then you need to provide a persistent volume with a claim name ```seldon-claim``` which Prometheus will mount to store metrics.

The Helm chart parameters for Prometheus and Grafana can be found and edited in values.yaml, examples of which can be seen for Prometheus [here](https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml) and for Grafana [here](https://github.com/helm/charts/blob/master/stable/grafana/values.yaml).

An example install is shown below:

```
helm install seldon-core-analytics --name seldon-core-analytics --set grafana_prom_admin_password=password --set persistence.enabled=false --repo https://storage.googleapis.com/seldon-charts --namespace seldon
helm install seldon-core-analytics . -n seldon-system
```

To access the Grafana dashboard port-forward to the Grafana pod:

```
kubectl port-forward $(kubectl get pods -n seldon -l app=grafana-prom-server -o jsonpath='{.items[0].metadata.name}') -n seldon 3000:3000
kubectl port-forward $(kubectl get pods -l app=grafana -n seldon-system -o jsonpath='{.items[0].metadata.name}') -n seldon-system 3000:3000
```

You can then open http://localhost:3000 to log into Grafana using your set password.
You can then open http://localhost:3000 to log into Grafana using your set password from values.yaml.


Binary file not shown.
Binary file not shown.

This file was deleted.

32 changes: 19 additions & 13 deletions helm-charts/seldon-core-analytics/files/grafana/configs/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@

## For development if updating the Seldon Example Dashboard.
## For development if creating a new dashboard.

* Save the dashboard to JSON by exporting it.
* Overwrite the prediction-analytics-dashboard.json with the exported JSON
* Run ```./convert-exported-graph.sh```
* Then import the new dashboard
* Port forward the grafana port
```
kubectl port-forward $(kubectl get pods -n seldon -l app=grafana-prom-server -o jsonpath='{.items[0].metadata.name}') -n seldon 3000:3000
```
* export the password used when starting the analytics, e.g.
This helm chart deploys Grafana Dashboards using a sidecar
(https://github.com/helm/charts/tree/master/stable/grafana#sidecar-for-dashboards)

To modify or add a dashboard please follow the steps below.

* Save the dashboard to JSON by exporting it and copy it to the `files/grafana/config` directory.
* Save a new configmap in the `templates/grafana` directory for the dashboard using the template below, replacing <new-dashboard> with the name of your dashboard:
* <new-dashboard>-configmap.yaml
```
export GF_SECURITY_ADMIN_PASSWORD=password
apiVersion: v1
data:
{{ (.Files.Glob "files/grafana/configs/<new-dashboard>.json").AsConfig | indent 2 }}
kind: ConfigMap
metadata:
creationTimestamp: null
name: <new-dashboard>
namespace: {{ .Release.Namespace }}
labels:
seldon_dashboard: "1"
```
* run ```import-dashboards-job.sh```

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
{
"__inputs": [
{
"name": "DS_PROM",
"label": "prom",
"description": "Prometheus Metrics Server",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__requires": [
{
"type": "grafana",
Expand Down Expand Up @@ -54,7 +44,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -166,7 +156,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"editable": true,
"error": false,
"format": "percent",
Expand Down Expand Up @@ -245,7 +235,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -324,7 +314,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -405,7 +395,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -484,7 +474,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -563,7 +553,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -642,7 +632,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -721,7 +711,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -800,7 +790,7 @@
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -885,7 +875,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 3,
"editable": true,
"error": false,
Expand Down Expand Up @@ -981,7 +971,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 3,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1077,7 +1067,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 3,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1195,7 +1185,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 3,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1290,7 +1280,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1385,7 +1375,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1478,7 +1468,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1589,7 +1579,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1682,7 +1672,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1786,7 +1776,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -1930,7 +1920,7 @@
{
"aliasColors": {},
"bars": false,
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
Expand Down Expand Up @@ -2036,7 +2026,7 @@
{
"allValue": ".*",
"current": {},
"datasource": "${DS_PROM}",
"datasource": "prometheus",
"hide": 0,
"includeAll": true,
"label": null,
Expand Down
Loading

0 comments on commit 95951e9

Please sign in to comment.