Skip to content

Commit 54c4709

Browse files
authored
Merge pull request #15 from alexzyWu/dev-0.2.0
add minio and log collector helm chart
2 parents eeac65d + 3503d5a commit 54c4709

27 files changed

+2262
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
apiVersion: extensions/v1beta1
2+
kind: DaemonSet
3+
metadata:
4+
annotations:
5+
deployment.kubernetes.io/revision: "1"
6+
generation: 1
7+
labels:
8+
log_collector_image_short_name: fluent-bit
9+
service: prophecis-lhelper
10+
name: lhelper-f70c7b86-e700-4b6a-5760-0fceec1a93b6
11+
namespace: prophecis
12+
spec:
13+
template:
14+
metadata:
15+
creationTimestamp: null
16+
labels:
17+
log_collector_image_short_name: fluent-bit
18+
service: prophecis-lhelper
19+
spec:
20+
automountServiceAccountToken: false
21+
containers:
22+
- env:
23+
- name: RESULT_STORE_TYPE
24+
value: host_mount
25+
- name: SCHED_POLICY
26+
value: dense
27+
- name: MODEL_STORE_TYPE
28+
- name: FLUENT_ELASTICSEARCH_HOST
29+
value: elasticsearch.prophecis.svc.cluster.local
30+
- name: FLUENT_ELASTICSEARCH_PORT
31+
value: "9200"
32+
- name: FLUENT_ELASTICSEARCH_USER
33+
value: test
34+
- name: FLUENT_ELASTICSEARCH_PASSWD
35+
value: test
36+
- name: JOB_STATE_DIR
37+
value: /job
38+
- name: TRAINING_DATA_NAMESPACE
39+
value: prophecis
40+
- name: EM_DESCRIPTION
41+
value: |
42+
evaluation_metrics:
43+
type: fluent-bit
44+
imagetag: ""
45+
in: ""
46+
linelookahead: 0
47+
eventtypes: []
48+
groups: {}
49+
xxx_nounkeyedliteral: {}
50+
xxx_unrecognized: []
51+
xxx_sizecache: 0
52+
image: wedatasphere/prophecis:fluent-bit-1.2.1
53+
imagePullPolicy: Always
54+
name: log-collector
55+
resources:
56+
limits:
57+
cpu: 60m
58+
memory: "314572800"
59+
requests:
60+
cpu: 60m
61+
memory: "314572800"
62+
terminationMessagePath: /dev/termination-log
63+
terminationMessagePolicy: File
64+
volumeMounts:
65+
- mountPath: /job
66+
name: jobdata
67+
- mountPath: /etc/localtime
68+
name: timezone-volume
69+
readOnly: true
70+
- mountPath: /fluent-bit/etc/
71+
name: fluent-bit-log-collector-config-all
72+
dnsPolicy: ClusterFirst
73+
imagePullSecrets:
74+
- name: hubsecret
75+
restartPolicy: Always
76+
schedulerName: default-scheduler
77+
securityContext: {}
78+
terminationGracePeriodSeconds: 30
79+
volumes:
80+
- hostPath:
81+
path: /mlss/di/jobs/prophecis
82+
type: DirectoryOrCreate
83+
name: jobdata
84+
- hostPath:
85+
path: /usr/share/zoneinfo/Asia/Shanghai
86+
type: ""
87+
name: timezone-volume
88+
- configMap:
89+
defaultMode: 420
90+
name: fluent-bit-log-collector-config-all
91+
name: fluent-bit-log-collector-config-all
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: fluent-bit-log-collector-config-all
5+
namespace: prophecis
6+
labels:
7+
k8s-app: fluent-bit
8+
data:
9+
# Configuration files: server, input, filters and output
10+
# ======================================================
11+
fluent-bit.conf: |
12+
[SERVICE]
13+
Flush 1
14+
Log_Level info
15+
Daemon off
16+
Parsers_File parsers.conf
17+
HTTP_Server On
18+
HTTP_Listen 0.0.0.0
19+
HTTP_Port 2020
20+
@INCLUDE training-log.conf
21+
@INCLUDE record_modifier.conf
22+
@INCLUDE output-elasticsearch.conf
23+
training-log.conf: |
24+
[INPUT]
25+
Name tail
26+
Tag training.*
27+
Path /job/*.log
28+
Parser syslog
29+
DB /job/training-log.db
30+
Mem_Buf_Limit 5MB
31+
Skip_Long_Lines On
32+
Refresh_Interval 10
33+
Key line
34+
record_modifier.conf: |
35+
[FILTER]
36+
Name lua
37+
Match training.*
38+
script training.lua
39+
call cb_print
40+
Type_int_key rindex time
41+
Match training.*
42+
[FILTER]
43+
Name nest
44+
Match training.*
45+
Operation nest
46+
Wildcard time
47+
Wildcard rindex
48+
Wildcard training_id
49+
Nest_under meta
50+
training.lua: |
51+
start_line_num = 1
52+
function cb_print(tag, timestamp, record)
53+
fname_strat_num = string.find(tag,".training")+1
54+
fname_end_num = string.find(tag,".",-1)
55+
fname = string.sub(tag,fname_strat_num,-5)
56+
57+
fline_name = "/job/"..fname.."-line.pos"
58+
print(fline_name)
59+
-- check if file exists
60+
local file = io.open(fline_name, "r")
61+
-- if file not exists, create file and set default value
62+
if(file == nil)
63+
then
64+
print("file not exists")
65+
file = io.open(fline_name, "w+")
66+
file:write(start_line_num)
67+
end
68+
file:close()
69+
-- read current line num from line.pos
70+
file = io.open(fline_name, "r")
71+
local current = file:read()
72+
file:close()
73+
-- object which will be returned
74+
new_record = {}
75+
new_record["training_id"] = fname
76+
-- line num
77+
new_record["rindex"] = tonumber(current)
78+
79+
fname_strat_num = string.find(tag,".training")+1
80+
fname_end_num = string.find(tag,".",-1)
81+
fname = string.sub(tag,fname_strat_num,-5)
82+
new_record["training_id"] = fname
83+
84+
-- current timestamp
85+
origin_time = string.format("%d", timestamp*1000)
86+
-- new_record["time"] = string.sub(origin_time,1,-8)
87+
new_record["time"] = tonumber(origin_time)
88+
-- other key from input
89+
for key, val in pairs(record) do
90+
new_record[key] = val
91+
end
92+
-- save back in line.pos
93+
file = io.open(fline_name, "w+")
94+
current = current + 1
95+
file:write(current)
96+
file:close()
97+
return 1, timestamp, new_record
98+
end
99+
output-elasticsearch.conf: |
100+
[OUTPUT]
101+
Name es
102+
Match *
103+
Host ${FLUENT_ELASTICSEARCH_HOST}
104+
Port ${FLUENT_ELASTICSEARCH_PORT}
105+
HTTP_User ${FLUENT_ELASTICSEARCH_USER}
106+
HTTP_Passwd ${FLUENT_ELASTICSEARCH_PASSWD}
107+
Index dlaas_learner_data
108+
#Logstash_Format On
109+
Replace_Dots On
110+
Retry_Limit False
111+
Type logline
112+
# Time_Key time
113+
114+
[OUTPUT]
115+
Name stdout
116+
Match *
117+
118+
119+
parsers.conf: |
120+
[PARSER]
121+
Name apache
122+
Format regex
123+
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
124+
Time_Key time
125+
Time_Format %d/%b/%Y:%H:%M:%S %z
126+
127+
[PARSER]
128+
Name apache2
129+
Format regex
130+
Regex ^(?<host>[^ ]*) [^ ]* (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^ ]*) +\S*)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
131+
Time_Key time
132+
Time_Format %d/%b/%Y:%H:%M:%S %z
133+
134+
[PARSER]
135+
Name apache_error
136+
Format regex
137+
Regex ^\[[^ ]* (?<time>[^\]]*)\] \[(?<level>[^\]]*)\](?: \[pid (?<pid>[^\]]*)\])?( \[client (?<client>[^\]]*)\])? (?<message>.*)$
138+
139+
[PARSER]
140+
Name nginx
141+
Format regex
142+
Regex ^(?<remote>[^ ]*) (?<host>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] "(?<method>\S+)(?: +(?<path>[^\"]*?)(?: +\S*)?)?" (?<code>[^ ]*) (?<size>[^ ]*)(?: "(?<referer>[^\"]*)" "(?<agent>[^\"]*)")?$
143+
Time_Key time
144+
Time_Format %d/%b/%Y:%H:%M:%S %z
145+
146+
[PARSER]
147+
Name json
148+
Format json
149+
Time_Key time
150+
Time_Format %d/%b/%Y:%H:%M:%S %z
151+
152+
[PARSER]
153+
Name docker
154+
Format json
155+
Time_Key time
156+
Time_Format %Y-%m-%dT%H:%M:%S.%L
157+
Time_Keep On
158+
159+
[PARSER]
160+
Name syslog
161+
Format regex
162+
Regex ^\<(?<pri>[0-9]+)\>(?<time>[^ ]* {1,2}[^ ]* [^ ]*) (?<host>[^ ]*) (?<ident>[a-zA-Z0-9_\/\.\-]*)(?:\[(?<pid>[0-9]+)\])?(?:[^\:]*\:)? *(?<message>.*)$
163+
# Time_Format %b %d %H:%M:%S
164+
Time_Format %S%L
165+
Time_Keep On
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
appVersion: master
3+
description: MinIO is a high performance data infrastructure for machine learning,
4+
analytics and application data workloads.
5+
home: https://min.io
6+
icon: https://min.io/resources/img/logo/MINIO_wordmark.png
7+
keywords:
8+
- storage
9+
- object-storage
10+
- S3
11+
maintainers:
12+
13+
name: Minio
14+
15+
name: Acaleph
16+
name: minio
17+
sources:
18+
- https://github.com/minio/minio
19+
version: 5.0.30

helm-charts/MinioDeployment/OWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
approvers:
2+
- krisis
3+
- harshavardhana
4+
- nitisht
5+
- wlan0
6+
- dvaldivia
7+
reviewers:
8+
- krisis
9+
- harshavardhana
10+
- nitisht
11+
- wlan0
12+
- dvaldivia
13+

0 commit comments

Comments
 (0)