Skip to content

Commit

Permalink
new menu for prerequisites (#107)
Browse files Browse the repository at this point in the history
* update

Signed-off-by: Jongseob Jeon <[email protected]>

* add preprequisites docker (#108)

* rebase

* add docker posts

Signed-off-by: Jongseob Jeon <[email protected]>

* add post and fix pre-commit

Signed-off-by: Jongseob Jeon <[email protected]>

* update

Signed-off-by: Jongseob Jeon <[email protected]>

* finalize docker

Signed-off-by: Jongseob Jeon <[email protected]>

* change title requirements to install

Signed-off-by: Jongseob Jeon <[email protected]>

* Apply suggestions from code review

Co-authored-by: Jaeyeon Kim <[email protected]>

* Apply suggestions from code review

Co-authored-by: Jaeyeon Kim <[email protected]>

* update

Signed-off-by: Jongseob Jeon <[email protected]>

Co-authored-by: Jongseob Jeon <[email protected]>
Co-authored-by: Jaeyeon Kim <[email protected]>

Co-authored-by: Jongseob Jeon <[email protected]>
Co-authored-by: Jaeyeon Kim <[email protected]>
  • Loading branch information
3 people authored Mar 13, 2022
1 parent 7f23e9e commit fe4f456
Show file tree
Hide file tree
Showing 50 changed files with 2,126 additions and 188 deletions.
41 changes: 29 additions & 12 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Main Section

[[main]]
name = "Docs"
url = "/docs/prologue/welcome/"
# url = "/docs/1.0/prologue/introduction/"
url = "/docs/welcome/"
weight = 10

[[main]]
name = "Prerequisites"
url = "/prerequisites/intro"
weight = 15

# [[main]]
# name = "Blog"
# url = "/blog/"
Expand All @@ -19,11 +25,12 @@
url = "/contact/"
weight = 30

[[docs]]
name = "Prologue"
url = "/docs/prologue/"
identifier = "prologue"
weight = 1
[[main]]
name = "Help"
url = "/help/"
weight = 100

# Docs side menu

[[docs]]
name = "Introduction"
Expand Down Expand Up @@ -73,11 +80,21 @@
identifier = "appendix"
weight = 60

[[docs]]
name = "Help"
url = "/docs/help/"
identifier = "help"
weight = 100
# Prerequisites side menu

[[prerequisites]]
name = "Docker"
url = "/prerequisites/docker/"
identifier = "docker"
weight = 10

[[prerequisites]]
name = "kubernetes"
url = "/prerequisites/kubernetes/"
identifier = "kubernetes"
weight = 20

# Social Badges

[[social]]
name = "GitHub"
Expand Down
31 changes: 25 additions & 6 deletions config/_default/menus/menus.kor.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Main Section

[[main]]
name = "Docs"
url = "/docs/prologue/welcome/"
url = "/docs/welcome/"
weight = 10

[[main]]
name = "Prerequisites"
url = "/prerequisites/intro"
weight = 15

# [[main]]
# name = "Blog"
# url = "/blog/"
Expand All @@ -23,11 +30,7 @@
url = "/help/"
weight = 100

[[docs]]
name = "Prologue"
url = "/docs/prologue/"
identifier = "prologue"
weight = 1
# Docs side menu

[[docs]]
name = "Introduction"
Expand Down Expand Up @@ -77,6 +80,22 @@
identifier = "appendix"
weight = 60

# Prerequisites side menu

[[prerequisites]]
name = "Docker"
url = "/prerequisites/docker/"
identifier = "docker"
weight = 10

[[prerequisites]]
name = "kubernetes"
url = "/prerequisites/kubernetes/"
identifier = "kubernetes"
weight = 20

# Social Badges

[[social]]
name = "GitHub"
pre = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-github\"><path d=\"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22\"></path></svg>"
Expand Down
1 change: 1 addition & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ lastMod = false
[menu.section]
auto = false
collapsibleSidebar = true
mainSections = ["docs", "prerequisites"]
2 changes: 1 addition & 1 deletion content/en/docs/api-deployment/seldon-children.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title : "5. Multi Models"
title : "6. Multi Models"
description: ""
lead: ""
draft: false
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/api-deployment/seldon-fields.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title : "3. Seldon Fields"
title : "4. Seldon Fields"
description: ""
lead: ""
draft: false
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/api-deployment/seldon-iris.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ date: 2021-12-22
lastmod: 2021-12-22
draft: false
weight: 411
contributors: ["Youngcheol Jang"]
contributors: ["Youngcheol Jang", "SeungTae Kim"]
menu:
docs:
parent: "api-deployment"
Expand Down Expand Up @@ -97,7 +97,7 @@ echo "NODE_IP"=$NODE_IP
echo "NODE_PORT"=$NODE_PORT
```

다음과 비슷하게 출력되어야 합니다.
다음과 비슷하게 출력되어야 하며, 클라우드 등을 통해 설정할 경우, internal ip 주소가 설정되는 것을 확인할 수 있습니다.

```text
NODE_IP=192.168.0.19
Expand Down
36 changes: 35 additions & 1 deletion content/en/docs/api-deployment/seldon-mlflow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title : "4. Model from MLflow"
title : "5. Model from MLflow"
description: ""
lead: ""
draft: false
Expand Down Expand Up @@ -221,6 +221,9 @@ spec:
- name: model_uri
type: STRING
value: "/mnt/models"
- name: xtype
type: STRING
value: "dataframe"
children: []
EOF
```
Expand Down Expand Up @@ -249,3 +252,34 @@ kubectl get po -n kubeflow-user-example-com | grep seldon
```text
seldon-example-model-0-model-5c949bd894-c5f28 3/3 Running 0 69s
```

CLI를 이용해 생성된 API에는 다음 request를 통해 실행을 확인할 수 있습니다.

```text
curl -X POST http://$NODE_IP:$NODE_PORT/seldon/seldon-deploy/sklearn/api/v1.0/predictions \
-H 'Content-Type: application/json' \
-d '{
"data": {
"ndarray": [
[
143.0,
0.0,
30.0,
30.0
]
],
"names": [
"sepal length (cm)",
"sepal width (cm)",
"petal length (cm)",
"petal width (cm)"
]
}
}'
```

정상적으로 실행될 경우 다음과 같은 결과를 받을 수 있습니다.

```text
{"data":{"names":[],"ndarray":["Virginica"]},"meta":{"requestPath":{"model":"ghcr.io/mlops-for-all/mlflowserver:e141f57"}}}
```
42 changes: 42 additions & 0 deletions content/en/docs/api-deployment/seldon-pg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title : "3. Seldon Monitoring"
description: "Prometheus & Grafana 확인하기"
date: 2021-12-24
lastmod: 2021-12-24
draft: false
weight: 412
contributors: ["Jongseob Jeon"]
menu:
docs:
parent: "api-deployment"
---

## Grafana & Prometheus

이제, [지난 페이지]({{< relref "docs/api-deployment/seldon-iris.md" >}})에서 생성했던 SeldonDeployment 로 API Request 를 반복적으로 수행해보고, 대시보드에 변화가 일어나는지 확인해봅니다.

### 대시보드

[앞서 생성한 대시보드]({{< relref "docs/setup-components/install-components-pg.md" >}})를 포트 포워딩합니다.

```text
kubectl port-forward svc/seldon-core-analytics-grafana -n seldon-system 8090:80
```

### API 요청

[앞서 생성한 Seldon Deployment]({{< relref "docs/api-deployment/seldon-iris.md#using-cli" >}})에 요청을 **반복해서** 보냅니다.

```text
curl -X POST http://$NODE_IP:$NODE_PORT/seldon/seldon-deploy/sklearn/api/v1.0/predictions \
-H 'Content-Type: application/json' \
-d '{ "data": { "ndarray": [[1,2,3,4]] } }'
```

그리고 그라파나 대시보드를 확인하면 다음과 같이 Global Request Rate 이 `0 ops` 에서 순간적으로 상승하는 것을 확인할 수 있습니다.

<p align="center">
<img src="/images/docs/setup-modules/repeat-raise.png" title="grafana"/>
</p>

이렇게 프로메테우스와 그라파나가 정상적으로 설치된 것을 확인할 수 있습니다.
Loading

0 comments on commit fe4f456

Please sign in to comment.