Skip to content

Commit

Permalink
docs: add helm v3 command and regenerate notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
masonlr committed Mar 10, 2021
1 parent 8975a87 commit 4580715
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 47 deletions.
8 changes: 4 additions & 4 deletions doc/source/ingress/istio.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Ingress with Istio

Seldon core can be used in conjuction with [istio](https://istio.io/). Istio provides an [ingress gateway](https://istio.io/docs/tasks/traffic-management/ingress/) which Seldon Core can automatically wire up new deployments to. The steps to using istio are described below.
Seldon Core can be used in conjunction with [istio](https://istio.io/). Istio provides an [ingress gateway](https://istio.io/docs/tasks/traffic-management/ingress/) which Seldon Core can automatically wire up new deployments to. The steps to using istio are described below.

## Install Seldon Core Operator

Ensure when you install the seldon-core operator via Helm that you enabled istio. For example:

```bash
helm install seldon-core-operator --name seldon-core --set istio.enabled=true --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true
helm install seldon-core seldon-core-operator --set istio.enabled=true --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true
```

You need an istio gateway installed in the `istio-system` namespace. By default we assume one called seldon-gateway. For example you can create this with the following yaml:
Expand Down Expand Up @@ -70,14 +70,14 @@ spec:
If you have your own gateway you will use then you can provide the name when installing the seldon operator. For example if your gateway is called `mygateway` you can install the operator with:

```bash
helm install seldon-core-operator --name seldon-core --set istio.enabled=true --set istio.gateway=mygateway --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true
helm install seldon-core seldon-core-operator --set istio.enabled=true --set istio.gateway=mygateway --repo https://storage.googleapis.com/seldon-charts --set usageMetrics.enabled=true
```

You can also provide the gateway on a per Seldon Deployment resource basis by providing it with the annotation `seldon.io/istio-gateway`.

## Istio Configuration Annotation Reference

| Annotation | Default |Description |
| Annotation | Default |Description |
|------------|---------|------------|
|`seldon.io/istio-gateway:<gateway name>`| istio-system/seldon-gateway | The gateway to use for this deployment. If no namespace prefix is applied it will refer to the namespace of the Seldon Deployment. |
| `seldon.io/istio-retries` | None | The number of istio retries |
Expand Down
79 changes: 36 additions & 43 deletions notebooks/istio_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Error from server (AlreadyExists): namespaces \"seldon\" already exists\r\n"
"namespace/seldon created\r\n"
]
}
],
Expand Down Expand Up @@ -113,7 +113,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Error from server (AlreadyExists): error when creating \"resources/seldon-gateway.yaml\": gateways.networking.istio.io \"seldon-gateway\" already exists\r\n"
"gateway.networking.istio.io/seldon-gateway created\r\n"
]
}
],
Expand Down Expand Up @@ -151,7 +151,7 @@
{
"data": {
"text/plain": [
"'1.5.0-dev'"
"'1.7.0-dev'"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -191,7 +191,7 @@
"output_type": "stream",
"text": [
"NAME: mymodel\r\n",
"LAST DEPLOYED: Mon Nov 2 11:26:51 2020\r\n",
"LAST DEPLOYED: Wed Mar 10 16:37:01 2021\r\n",
"NAMESPACE: seldon\r\n",
"STATUS: deployed\r\n",
"REVISION: 1\r\n",
Expand All @@ -214,47 +214,47 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[04m\u001b[31;01m-\u001b[39;49;00m\u001b[04m\u001b[31;01m-\u001b[39;49;00m\u001b[04m\u001b[31;01m-\u001b[39;49;00m\r\n",
"\u001b[04m\u001b[31;01m#\u001b[39;49;00m \u001b[04m\u001b[31;01mS\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01mu\u001b[39;49;00m\u001b[04m\u001b[31;01mr\u001b[39;49;00m\u001b[04m\u001b[31;01mc\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01m:\u001b[39;49;00m \u001b[04m\u001b[31;01ms\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01md\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01mn\u001b[39;49;00m\u001b[04m\u001b[31;01m-\u001b[39;49;00m\u001b[04m\u001b[31;01ms\u001b[39;49;00m\u001b[04m\u001b[31;01mi\u001b[39;49;00m\u001b[04m\u001b[31;01mn\u001b[39;49;00m\u001b[04m\u001b[31;01mg\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01m-\u001b[39;49;00m\u001b[04m\u001b[31;01mm\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01md\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01m/\u001b[39;49;00m\u001b[04m\u001b[31;01mt\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01mm\u001b[39;49;00m\u001b[04m\u001b[31;01mp\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01ma\u001b[39;49;00m\u001b[04m\u001b[31;01mt\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01ms\u001b[39;49;00m\u001b[04m\u001b[31;01m/\u001b[39;49;00m\u001b[04m\u001b[31;01ms\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01md\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01mn\u001b[39;49;00m\u001b[04m\u001b[31;01md\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01mp\u001b[39;49;00m\u001b[04m\u001b[31;01ml\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01my\u001b[39;49;00m\u001b[04m\u001b[31;01mm\u001b[39;49;00m\u001b[04m\u001b[31;01me\u001b[39;49;00m\u001b[04m\u001b[31;01mn\u001b[39;49;00m\u001b[04m\u001b[31;01mt\u001b[39;49;00m\u001b[04m\u001b[31;01m.\u001b[39;49;00m\u001b[04m\u001b[31;01mj\u001b[39;49;00m\u001b[04m\u001b[31;01ms\u001b[39;49;00m\u001b[04m\u001b[31;01mo\u001b[39;49;00m\u001b[04m\u001b[31;01mn\u001b[39;49;00m\r\n",
"\u001b[04m\u001b[91m-\u001b[39;49;00m\u001b[04m\u001b[91m-\u001b[39;49;00m\u001b[04m\u001b[91m-\u001b[39;49;00m\r\n",
"\u001b[04m\u001b[91m#\u001b[39;49;00m \u001b[04m\u001b[91mS\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91mu\u001b[39;49;00m\u001b[04m\u001b[91mr\u001b[39;49;00m\u001b[04m\u001b[91mc\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91m:\u001b[39;49;00m \u001b[04m\u001b[91ms\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91md\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91mn\u001b[39;49;00m\u001b[04m\u001b[91m-\u001b[39;49;00m\u001b[04m\u001b[91ms\u001b[39;49;00m\u001b[04m\u001b[91mi\u001b[39;49;00m\u001b[04m\u001b[91mn\u001b[39;49;00m\u001b[04m\u001b[91mg\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91m-\u001b[39;49;00m\u001b[04m\u001b[91mm\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91md\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91m/\u001b[39;49;00m\u001b[04m\u001b[91mt\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91mm\u001b[39;49;00m\u001b[04m\u001b[91mp\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91ma\u001b[39;49;00m\u001b[04m\u001b[91mt\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91ms\u001b[39;49;00m\u001b[04m\u001b[91m/\u001b[39;49;00m\u001b[04m\u001b[91ms\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91md\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91mn\u001b[39;49;00m\u001b[04m\u001b[91md\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91mp\u001b[39;49;00m\u001b[04m\u001b[91ml\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91my\u001b[39;49;00m\u001b[04m\u001b[91mm\u001b[39;49;00m\u001b[04m\u001b[91me\u001b[39;49;00m\u001b[04m\u001b[91mn\u001b[39;49;00m\u001b[04m\u001b[91mt\u001b[39;49;00m\u001b[04m\u001b[91m.\u001b[39;49;00m\u001b[04m\u001b[91mj\u001b[39;49;00m\u001b[04m\u001b[91ms\u001b[39;49;00m\u001b[04m\u001b[91mo\u001b[39;49;00m\u001b[04m\u001b[91mn\u001b[39;49;00m\r\n",
"{\r\n",
" \u001b[34;01m\"kind\"\u001b[39;49;00m: \u001b[33m\"SeldonDeployment\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"apiVersion\"\u001b[39;49;00m: \u001b[33m\"machinelearning.seldon.io/v1\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"metadata\"\u001b[39;49;00m: {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"mymodel\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"namespace\"\u001b[39;49;00m: \u001b[33m\"seldon\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"labels\"\u001b[39;49;00m: {}\r\n",
" \u001b[94m\"kind\"\u001b[39;49;00m: \u001b[33m\"SeldonDeployment\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"apiVersion\"\u001b[39;49;00m: \u001b[33m\"machinelearning.seldon.io/v1\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"metadata\"\u001b[39;49;00m: {\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"mymodel\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"namespace\"\u001b[39;49;00m: \u001b[33m\"seldon\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"labels\"\u001b[39;49;00m: {}\r\n",
" },\r\n",
" \u001b[34;01m\"spec\"\u001b[39;49;00m: {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"mymodel\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"protocol\"\u001b[39;49;00m: \u001b[33m\"seldon\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"annotations\"\u001b[39;49;00m: {},\r\n",
" \u001b[34;01m\"predictors\"\u001b[39;49;00m: [\r\n",
" \u001b[94m\"spec\"\u001b[39;49;00m: {\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"mymodel\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"protocol\"\u001b[39;49;00m: \u001b[33m\"seldon\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"annotations\"\u001b[39;49;00m: {},\r\n",
" \u001b[94m\"predictors\"\u001b[39;49;00m: [\r\n",
" {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"default\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"graph\"\u001b[39;49;00m: {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"model\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"type\"\u001b[39;49;00m: \u001b[33m\"MODEL\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"default\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"graph\"\u001b[39;49;00m: {\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"model\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"type\"\u001b[39;49;00m: \u001b[33m\"MODEL\"\u001b[39;49;00m,\r\n",
" },\r\n",
" \u001b[34;01m\"componentSpecs\"\u001b[39;49;00m: [\r\n",
" \u001b[94m\"componentSpecs\"\u001b[39;49;00m: [\r\n",
" {\r\n",
" \u001b[34;01m\"spec\"\u001b[39;49;00m: {\r\n",
" \u001b[34;01m\"containers\"\u001b[39;49;00m: [\r\n",
" \u001b[94m\"spec\"\u001b[39;49;00m: {\r\n",
" \u001b[94m\"containers\"\u001b[39;49;00m: [\r\n",
" {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"model\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"image\"\u001b[39;49;00m: \u001b[33m\"seldonio/mock_classifier:1.5.0-dev\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"env\"\u001b[39;49;00m: [\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"model\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"image\"\u001b[39;49;00m: \u001b[33m\"seldonio/mock_classifier:1.7.0-dev\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"env\"\u001b[39;49;00m: [\r\n",
" {\r\n",
" \u001b[34;01m\"name\"\u001b[39;49;00m: \u001b[33m\"LOG_LEVEL\"\u001b[39;49;00m,\r\n",
" \u001b[34;01m\"value\"\u001b[39;49;00m: \u001b[33m\"INFO\"\u001b[39;49;00m\r\n",
" \u001b[94m\"name\"\u001b[39;49;00m: \u001b[33m\"LOG_LEVEL\"\u001b[39;49;00m,\r\n",
" \u001b[94m\"value\"\u001b[39;49;00m: \u001b[33m\"INFO\"\u001b[39;49;00m\r\n",
" },\r\n",
" ],\r\n",
" \u001b[34;01m\"resources\"\u001b[39;49;00m: {\u001b[34;01m\"requests\"\u001b[39;49;00m:{\u001b[34;01m\"memory\"\u001b[39;49;00m:\u001b[33m\"1Mi\"\u001b[39;49;00m}},\r\n",
" \u001b[94m\"resources\"\u001b[39;49;00m: {\u001b[94m\"requests\"\u001b[39;49;00m:{\u001b[94m\"memory\"\u001b[39;49;00m:\u001b[33m\"1Mi\"\u001b[39;49;00m}},\r\n",
" }\r\n",
" ]\r\n",
" },\r\n",
" }\r\n",
" ],\r\n",
" \u001b[34;01m\"replicas\"\u001b[39;49;00m: \u001b[34m1\u001b[39;49;00m\r\n",
" \u001b[94m\"replicas\"\u001b[39;49;00m: \u001b[34m1\u001b[39;49;00m\r\n",
" }\r\n",
" ]\r\n",
" }\r\n",
Expand Down Expand Up @@ -331,12 +331,12 @@
" tensor {\n",
" shape: 1\n",
" shape: 1\n",
" values: 0.7700289654241149\n",
" values: 0.721679221744617\n",
" }\n",
"}\n",
"\n",
"Response:\n",
"{'data': {'names': ['proba'], 'tensor': {'shape': [1, 1], 'values': [0.10464583547528208]}}, 'meta': {}}\n"
"{'data': {'names': ['proba'], 'tensor': {'shape': [1, 1], 'values': [0.1002015221659356]}}, 'meta': {'requestPath': {'model': 'seldonio/mock_classifier:1.7.0-dev'}}}\n"
]
}
],
Expand Down Expand Up @@ -364,9 +364,9 @@
"text": [
"Success:True message:\n",
"Request:\n",
"{'meta': {}, 'data': {'tensor': {'shape': [1, 1], 'values': [0.12757803284172686]}}}\n",
"{'meta': {}, 'data': {'tensor': {'shape': [1, 1], 'values': [0.17825624441824628]}}}\n",
"Response:\n",
"{'meta': {}, 'data': {'names': ['proba'], 'tensor': {'shape': [1, 1], 'values': [0.05791666150083342]}}}\n"
"{'meta': {'requestPath': {'model': 'seldonio/mock_classifier:1.7.0-dev'}}, 'data': {'names': ['proba'], 'tensor': {'shape': [1, 1], 'values': [0.06074453279395597]}}}\n"
]
}
],
Expand Down Expand Up @@ -394,13 +394,6 @@
"source": [
"!helm delete mymodel"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -420,7 +413,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.8.3"
},
"varInspector": {
"cols": {
Expand Down

0 comments on commit 4580715

Please sign in to comment.