Skip to content

Commit

Permalink
add loki in helm and docker-compose (#290)
Browse files Browse the repository at this point in the history
Signed-off-by: akihikokuroda <akihikokuroda2020@gmail.com>
  • Loading branch information
akihikokuroda authored Mar 16, 2023
1 parent 76802c1 commit 0fd66bd
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,27 @@ services:
image: prom/prometheus:v2.42.0
ports:
- 9000:9090
loki:
image: grafana/loki:2.7.4
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
networks:
- safe-tier

promtail:
image: grafana/promtail:2.7.4
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
networks:
- safe-tier

grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
networks:
- safe-tier
networks:
safe-tier:
10 changes: 8 additions & 2 deletions infrastructure/helm/quantumserverless/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ dependencies:
- name: keycloak
repository: https://charts.bitnami.com/bitnami
version: 13.3.0
- name: repository
repository: ""
version: 0.1.0
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 19.7.2
digest: sha256:61b4adc88d3a07f0ed0b669cdcaf76de28f0ceb3af01905eebb20bc100b81215
generated: "2023-03-14T15:46:28.318204316-04:00"
- name: loki
repository: https://grafana.github.io/helm-charts
version: 4.8.0
digest: sha256:996849006aacd6baed57c17db52ebeff1ff3a4af4322e09e52c2281724bb50c6
generated: "2023-03-16T14:30:49.858207-04:00"
5 changes: 5 additions & 0 deletions infrastructure/helm/quantumserverless/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ dependencies:
condition: prometheusEnable
version: 19.7.2
repository: https://prometheus-community.github.io/helm-charts
- name: loki
condition: lokiEnable
version: 4.8.0
repository: https://grafana.github.io/helm-charts

7 changes: 7 additions & 0 deletions infrastructure/helm/quantumserverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Main configuration to setup your k8s cluster and the services that this project
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add kuberay https://ray-project.github.io/kuberay-helm
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
```

```shell
Expand Down Expand Up @@ -123,6 +124,12 @@ For our Ray Charts dependencies we are using the configuration created by the Ra

For our Prometheus dependency we are using the charts managed by the Prometheus community. To simplify the configuration we offered you with a straigh-forward initial parameters setup. But if you are interested in more complex configurations you have access to all the parameters in the chart's [values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/values.yaml).

**loki**

- For our loki charts dependencies, we are using the single binary configuration created by Grafana project. To simplify the configuration we offered you with a straigh-forward initial parameters setup.
But if you are interested in more complex configurations, you have access to all the parameters documented [here](https://grafana.com/docs/loki/next/installation/helm/) and source code of the helm charts are
[here](https://github.com/grafana/loki/tree/main/production/helm/loki).

## Usage

- Ray Api Server access needs the access token issued by the keycloak. Here is the example to obtain the access token and send request to the Ray API Server
Expand Down
26 changes: 26 additions & 0 deletions infrastructure/helm/quantumserverless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,29 @@ repositoryEnable: true
prometheusEnable: true
# prometheus:
# special configuration over the prometheus sub-chart

# ===================
# loki
# ===================

lokiEnable: true

loki:
loki:
commonConfig:
replication_factor: 1
storage:
type: 'filesystem'
auth_enabled: false
write:
replicas: 0
read:
replicas: 0
backend:
replicas: 0
singleBinary:
replicas: 1
gateway:
service:
type: NodePort

0 comments on commit 0fd66bd

Please sign in to comment.