Skip to content

Commit fe4f456

Browse files
Aiden-JeonJongseob Jeonanencore94
authored
new menu for prerequisites (#107)
* 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]>
1 parent 7f23e9e commit fe4f456

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2126
-188
lines changed

config/_default/menus/menus.en.toml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
# Main Section
2+
13
[[main]]
24
name = "Docs"
3-
url = "/docs/prologue/welcome/"
4-
# url = "/docs/1.0/prologue/introduction/"
5+
url = "/docs/welcome/"
56
weight = 10
67

8+
[[main]]
9+
name = "Prerequisites"
10+
url = "/prerequisites/intro"
11+
weight = 15
12+
713
# [[main]]
814
# name = "Blog"
915
# url = "/blog/"
@@ -19,11 +25,12 @@
1925
url = "/contact/"
2026
weight = 30
2127

22-
[[docs]]
23-
name = "Prologue"
24-
url = "/docs/prologue/"
25-
identifier = "prologue"
26-
weight = 1
28+
[[main]]
29+
name = "Help"
30+
url = "/help/"
31+
weight = 100
32+
33+
# Docs side menu
2734

2835
[[docs]]
2936
name = "Introduction"
@@ -73,11 +80,21 @@
7380
identifier = "appendix"
7481
weight = 60
7582

76-
[[docs]]
77-
name = "Help"
78-
url = "/docs/help/"
79-
identifier = "help"
80-
weight = 100
83+
# Prerequisites side menu
84+
85+
[[prerequisites]]
86+
name = "Docker"
87+
url = "/prerequisites/docker/"
88+
identifier = "docker"
89+
weight = 10
90+
91+
[[prerequisites]]
92+
name = "kubernetes"
93+
url = "/prerequisites/kubernetes/"
94+
identifier = "kubernetes"
95+
weight = 20
96+
97+
# Social Badges
8198

8299
[[social]]
83100
name = "GitHub"

config/_default/menus/menus.kor.toml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
# Main Section
2+
13
[[main]]
24
name = "Docs"
3-
url = "/docs/prologue/welcome/"
5+
url = "/docs/welcome/"
46
weight = 10
57

8+
[[main]]
9+
name = "Prerequisites"
10+
url = "/prerequisites/intro"
11+
weight = 15
12+
613
# [[main]]
714
# name = "Blog"
815
# url = "/blog/"
@@ -23,11 +30,7 @@
2330
url = "/help/"
2431
weight = 100
2532

26-
[[docs]]
27-
name = "Prologue"
28-
url = "/docs/prologue/"
29-
identifier = "prologue"
30-
weight = 1
33+
# Docs side menu
3134

3235
[[docs]]
3336
name = "Introduction"
@@ -77,6 +80,22 @@
7780
identifier = "appendix"
7881
weight = 60
7982

83+
# Prerequisites side menu
84+
85+
[[prerequisites]]
86+
name = "Docker"
87+
url = "/prerequisites/docker/"
88+
identifier = "docker"
89+
weight = 10
90+
91+
[[prerequisites]]
92+
name = "kubernetes"
93+
url = "/prerequisites/kubernetes/"
94+
identifier = "kubernetes"
95+
weight = 20
96+
97+
# Social Badges
98+
8099
[[social]]
81100
name = "GitHub"
82101
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>"

config/_default/params.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,4 @@ lastMod = false
9494
[menu.section]
9595
auto = false
9696
collapsibleSidebar = true
97+
mainSections = ["docs", "prerequisites"]

content/en/docs/api-deployment/seldon-children.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title : "5. Multi Models"
2+
title : "6. Multi Models"
33
description: ""
44
lead: ""
55
draft: false

content/en/docs/api-deployment/seldon-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title : "3. Seldon Fields"
2+
title : "4. Seldon Fields"
33
description: ""
44
lead: ""
55
draft: false

content/en/docs/api-deployment/seldon-iris.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ date: 2021-12-22
66
lastmod: 2021-12-22
77
draft: false
88
weight: 411
9-
contributors: ["Youngcheol Jang"]
9+
contributors: ["Youngcheol Jang", "SeungTae Kim"]
1010
menu:
1111
docs:
1212
parent: "api-deployment"
@@ -97,7 +97,7 @@ echo "NODE_IP"=$NODE_IP
9797
echo "NODE_PORT"=$NODE_PORT
9898
```
9999

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

102102
```text
103103
NODE_IP=192.168.0.19

content/en/docs/api-deployment/seldon-mlflow.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title : "4. Model from MLflow"
2+
title : "5. Model from MLflow"
33
description: ""
44
lead: ""
55
draft: false
@@ -221,6 +221,9 @@ spec:
221221
- name: model_uri
222222
type: STRING
223223
value: "/mnt/models"
224+
- name: xtype
225+
type: STRING
226+
value: "dataframe"
224227
children: []
225228
EOF
226229
```
@@ -249,3 +252,34 @@ kubectl get po -n kubeflow-user-example-com | grep seldon
249252
```text
250253
seldon-example-model-0-model-5c949bd894-c5f28 3/3 Running 0 69s
251254
```
255+
256+
CLI를 이용해 생성된 API에는 다음 request를 통해 실행을 확인할 수 있습니다.
257+
258+
```text
259+
curl -X POST http://$NODE_IP:$NODE_PORT/seldon/seldon-deploy/sklearn/api/v1.0/predictions \
260+
-H 'Content-Type: application/json' \
261+
-d '{
262+
"data": {
263+
"ndarray": [
264+
[
265+
143.0,
266+
0.0,
267+
30.0,
268+
30.0
269+
]
270+
],
271+
"names": [
272+
"sepal length (cm)",
273+
"sepal width (cm)",
274+
"petal length (cm)",
275+
"petal width (cm)"
276+
]
277+
}
278+
}'
279+
```
280+
281+
정상적으로 실행될 경우 다음과 같은 결과를 받을 수 있습니다.
282+
283+
```text
284+
{"data":{"names":[],"ndarray":["Virginica"]},"meta":{"requestPath":{"model":"ghcr.io/mlops-for-all/mlflowserver:e141f57"}}}
285+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title : "3. Seldon Monitoring"
3+
description: "Prometheus & Grafana 확인하기"
4+
date: 2021-12-24
5+
lastmod: 2021-12-24
6+
draft: false
7+
weight: 412
8+
contributors: ["Jongseob Jeon"]
9+
menu:
10+
docs:
11+
parent: "api-deployment"
12+
---
13+
14+
## Grafana & Prometheus
15+
16+
이제, [지난 페이지]({{< relref "docs/api-deployment/seldon-iris.md" >}})에서 생성했던 SeldonDeployment 로 API Request 를 반복적으로 수행해보고, 대시보드에 변화가 일어나는지 확인해봅니다.
17+
18+
### 대시보드
19+
20+
[앞서 생성한 대시보드]({{< relref "docs/setup-components/install-components-pg.md" >}})를 포트 포워딩합니다.
21+
22+
```text
23+
kubectl port-forward svc/seldon-core-analytics-grafana -n seldon-system 8090:80
24+
```
25+
26+
### API 요청
27+
28+
[앞서 생성한 Seldon Deployment]({{< relref "docs/api-deployment/seldon-iris.md#using-cli" >}})에 요청을 **반복해서** 보냅니다.
29+
30+
```text
31+
curl -X POST http://$NODE_IP:$NODE_PORT/seldon/seldon-deploy/sklearn/api/v1.0/predictions \
32+
-H 'Content-Type: application/json' \
33+
-d '{ "data": { "ndarray": [[1,2,3,4]] } }'
34+
```
35+
36+
그리고 그라파나 대시보드를 확인하면 다음과 같이 Global Request Rate 이 `0 ops` 에서 순간적으로 상승하는 것을 확인할 수 있습니다.
37+
38+
<p align="center">
39+
<img src="/images/docs/setup-modules/repeat-raise.png" title="grafana"/>
40+
</p>
41+
42+
이렇게 프로메테우스와 그라파나가 정상적으로 설치된 것을 확인할 수 있습니다.

0 commit comments

Comments
 (0)