yawyd313 afab9cf38c 资源文件使用缓存 | hai 1 mes | |
---|---|---|
argo-helm | hai 11 meses | |
argo-workflow | hai 1 mes | |
bak_kafka | hai 1 mes | |
bak_kafka_ha | hai 1 mes | |
certmanager | hai 11 meses | |
ch | hai 1 mes | |
ch-cold | hai 1 mes | |
ch-keeper | hai 11 meses | |
ch-single | hai 1 mes | |
chaos-mesh | hai 1 mes | |
ck-cold | hai 1 ano | |
ck-ui | hai 11 meses | |
clickhouse | hai 1 mes | |
clickhouse_etc | hai 1 ano | |
createcert | hai 1 ano | |
data | hai 1 mes | |
dataroom | hai 1 mes | |
deepflow | hai 1 mes | |
dev | hai 11 meses | |
dinky | hai 11 meses | |
docker-registry | hai 1 mes | |
droneci | hai 1 mes | |
es | hai 1 ano | |
flink | hai 11 meses | |
flink-kubernetes-operator | hai 11 meses | |
fluentd | hai 1 ano | |
gogs | hai 1 mes | |
grafana | hai 1 mes | |
halo | hai 1 mes | |
hdfs | hai 1 mes | |
i6000pusher | hai 1 mes | |
ingress-nginx | hai 1 mes | |
jaeger | hai 1 ano | |
jenkins | hai 11 meses | |
kafka | hai 1 mes | |
kafka-delay | hai 11 meses | |
kafka-ha | hai 1 mes | |
kafka-ui | hai 1 mes | |
kafka_bitnami | hai 1 ano | |
kibana | hai 1 ano | |
loki-distributed | hai 11 meses | |
metallb | hai 1 mes | |
metric-server | hai 11 meses | |
minio | hai 11 meses | |
mysql | hai 1 mes | |
mysql.bak | hai 1 mes | |
neo4j-helm | hai 11 meses | |
network-policy | hai 1 ano | |
nginx | hai 1 ano | |
nginxgatewayfabric | hai 9 meses | |
ngx-proxy | hai 1 mes | |
oas-session | hai 1 mes | |
ob-agent-stream | hai 1 mes | |
ob-event | hai 1 mes | |
ob-proxy | hai 1 mes | |
ob-server | hai 1 mes | |
ob-server_bak | hai 1 ano | |
ob-tools | hai 1 mes | |
ob2 | hai 11 meses | |
obui | hai 1 mes | |
openebs | hai 11 meses | |
operator | hai 1 mes | |
otel | hai 1 mes | |
otel-data-replay | hai 1 mes | |
prometheus | hai 1 mes | |
pycli | hai 11 meses | |
rbac | hai 11 meses | |
redis | hai 11 meses | |
rook | hai 11 meses | |
scripts | hai 11 meses | |
swagger-ui | hai 1 mes | |
tempo | hai 1 ano | |
tempo-distributed | hai 11 meses | |
test-oas | hai 1 mes | |
trace-stream-creator | hai 1 mes | |
victoria-metrics-cluster | hai 1 mes | |
xxl-jobs | hai 1 mes | |
.gitignore | hai 11 meses | |
README.md | hai 1 ano | |
check.sh | hai 11 meses | |
ingress-ceph-controller.yaml | hai 11 meses | |
km1.imglist | hai 1 ano | |
quota-observe.yaml | hai 1 ano | |
storageClass_local.yaml | hai 11 meses | |
storageClass_tmp.yaml | hai 11 meses |
[TOC]
使用helm chart/deploy/ingress-nginx
安装
helm install ingress-nginx . -n ingress-nginx
如80、443端口不可用,修改contorller.hostPort
修改controller.ingressResource.enable/default
为true
如node
很多,将controller.kind
改为deployment ,并设置nodeSelector,不然ingress解析不到
kubectl apply -f deploy/openebs/openebs-operator.yaml
deploy/clickhouse
global.storageClass
shard
和replica
auth.username
, auth.password
ingress
修改persistence.storangeClass: openebs-hostpath
helm install clickhouse . -n obse部署nginx ingress controller(如有跳过)部署nginx ingress controller(如有跳过)部署nginx ingress controller(如有跳过)rve --create-namespace
使用deploy/tempo
开启otel receiver
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:4318"
配置metrics_generator_processors
metrics_generator_processors:
- 'service-graphs'
- 'span-metrics'
max_search_bytes_per_trace: 0
配置tempo.metricGenerator
, 指向部署的prometheus
metricsGenerator:
enabled: true
remoteWriteUrl: "http://prometheus-server.observe.svc.cluster.local:80/api/v1/write"
配置存储方式
persistence:
enabled: true
storageClassName: openebs-hostpath
执行部署
helm install tempo . -n observe
使用deploy/prometheus
修改persistentVolume.storageClass
执行部署
helm install prometheus . -n observe
确定部署mode
配置exportor
otlp:
endpoint: "tempo.observe.svc.cluster.local:4317"
tls:
insecure: true
prometheus:
endpoint: "0.0.0.0:8889"
#namespace: default
clickhouse:
endpoint: "tcp://clickhouse-headless.observe.svc.cluster.local:9000?dial_timeout=10s&compress=lz4"
database: otel
username: default
password: "cecf@cestong.com"
ttl_days: 10
#logs_table: otel_logs
#traces_table: otel_traces
#metrics_table: otel_metrics
timeout: 5s
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s
开启otel receiver
otlp:
protocols:
grpc:
endpoint: ${MY_POD_IP}:4317
http:
endpoint: ${MY_POD_IP}:4318
配置pipeline
,把otel
收到的trace
输出至clickhouse
和tempo ( otel )
配置pipeline
,把otel
收到的metrics
输出至clickhouse
和prometheus
配置podAnnotations
,让prometheus
自动来采集收集到的metrics
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "8889"
执行部署
helm install otel-collector . -n observe
部署mysql
git地址:https://git.cestong.com.cn/cecf/cluster-config
所有配置已经修改好,直接部署即可
cd mysql
helm -n observe install mysql .
注意 当前配置使用的是NodePort向外暴露端口,端口固定为30306,客户环境可能需要更换,更换位置如下
# values.yaml文件 477行
476 nodePorts:
477 mysql: "30306"
初始化sql
# 获取mysql root密码
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace observe mysql -o jsonpath="{.data.mysql-root-password}" | base64 -d)
# 进入到同一个命名空间的mysql客户端的pod中
kubectl run mysql-client --rm --tty -i --restart='Never' --image docker.io/bitnami/mysql:5.7.42-debian-11-r27 --namespace observe --env MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD --command -- bash
# 登录mysql
mysql -h mysql.observe.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"
# 选择数据库
use otel;
# 执行sql语句
部署数据清洗程序
部署方式
kubectl -n observe apply -f cronjob.yaml
注意 要修改cronjob.yaml中 mysql 和 clickhouse 的用户及权限
修改ingress
,配置对应的域名
配置persistence.storageClassName
设置adminPassword
执行部署
helm install grafana . -n observe
安装clickhouse
插件
设置tempo
, prometheus
, clickhouse
数据源
导入dashboard
更改front/ui中的域名
编译打包
执行部署deploy/obui
kubectl apply -f deployment-front.yaml
kubectl apply -f deployment.yaml
kubectl apply -f ingress_rewrite.yaml
kubectl apply -f ingress.yaml
kubectl apply -f svc-front.yaml
kubectl apply -f svc.yaml
配置OTEL_COLLECTOR_NAME
指向部署的opentelemetry-collector
执行部署
helm install otel-demo . -n observe
在目标监控程序中增加Java参数
- '-javaagent:/sidecar/agent/opentelemetry-javaagent.jar'
- '-Dotel.resource.attributes=service.name=item-svc'
- '-Dotel.traces.exporter=otlp'
- '-Dotel.metrics.exporter=otlp'
deploy/obui
下的配置文件生成ingress-nginx
绑定的主机ip, 将域名绑定到这些ip服务 | CPU | Mem | 存储 |
---|---|---|---|
clickhouse | 4 | 8 | 200G |
tempo | 4 | 8 | 200G |
otel-collector | 3 | 6 | 0 |
prometheus | 2 | 4 | 100G |
grafana | 2 | 4 | 30G |
obui/front | 2 | 2 | 0 |
otel-demo | 4 | 8 | 0 |
总计 | 21核 | 40G | 530G |
服务 | CPU | Mem | 存储 |
---|---|---|---|
clickhouse | 4 | 8 | 200G |
clickhouse-zookeeper | 0.25/0.5 | ||
tempo | 4 | 8 | 200G |
otel-collector | 3 | 6 | 0 |
prometheus | 2 | 4 | 100G |
grafana | 2 | 4 | 30G |
obui/front | 2 | 2 | 0 |
otel-demo | 4 | 8 | 0 |
总计 | 21核 | 40G | 530G |
租户名称: observe
[x] docker hub的地址,push
[x] ingress class和storageclass名称
[ ] 域名转发到ingress上,ingress创建不了
[ ] prometheus mustFromJson