Skip to content

Commit 8ffb888

Browse files
authored
Getting started with Perses (#6669)
Signed-off-by: Friedrich Gonzalez <[email protected]>
1 parent 7a81c78 commit 8ffb888

File tree

9 files changed

+980
-13
lines changed

9 files changed

+980
-13
lines changed

docs/getting-started/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CORTEX_VERSION=v1.19.0
22
GRAFANA_VERSION=10.4.2
3-
PROMETHEUS_VERSION=v2.51.2
3+
PROMETHEUS_VERSION=v3.2.1
44
SEAWEEDFS_VERSION=3.67
5+
PERSES_VERSION=v0.49-distroless-debug

docs/getting-started/_index.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ This example uses [Docker Compose](https://docs.docker.com/compose/) to set up:
4141
1. An instance of [SeaweedFS](https://github.com/seaweedfs/seaweedfs/) for S3-compatible object storage
4242
1. An instance of [Cortex](https://cortexmetrics.io/) to receive metrics.
4343
1. An instance of [Prometheus](https://prometheus.io/) to send metrics to Cortex.
44-
1. An instance of [Grafana](https://grafana.com/) to visualize the metrics.
44+
1. An instance of [Perses](https://perses.dev) for latest trend on dashboarding
45+
1. An instance of [Grafana](https://grafana.com/) for legacy dashboarding
4546

4647
#### Instructions
4748

@@ -53,14 +54,7 @@ $ cd cortex/docs/getting-started
5354
##### Start the services
5455

5556
```sh
56-
# Start SeaweedFS to emulate S3 storage for Cortex.
57-
$ docker-compose up seaweedfs -d --wait
58-
# Create buckets in SeaweedFS.
59-
$ for bucket in cortex-blocks cortex-ruler cortex-alertmanager; do
60-
curl --aws-sigv4 "aws:amz:local:seaweedfs" --user "any:any" -X PUT http://localhost:8333/$bucket
61-
done
62-
# Start the remaining services.
63-
$ docker-compose up -d --wait
57+
$ docker compose up -d
6458
```
6559

6660
We can now access the following services:
@@ -123,7 +117,7 @@ Other things to explore:
123117
### Clean up
124118

125119
```sh
126-
$ docker-compose down
120+
$ docker compose down -v
127121
```
128122

129123
## Microservice Mode

docs/getting-started/cortex-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# and development.
44

55
# https://cortexmetrics.io/docs/configuration/configuration-file/#supported-contents-and-default-values-of-the-config-file
6-
target: all,compactor,alertmanager
6+
target: all
77

88
# Disable the requirement that every request to Cortex has an
99
# X-Scope-OrgID header. `fake` will be substituted in instead.
@@ -100,4 +100,4 @@ alertmanager_storage:
100100
backend: s3
101101
s3:
102102
<<: *s3
103-
bucket_name: cortex-alertmanager
103+
bucket_name: cortex-alertmanager

docs/getting-started/docker-compose.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ services:
3939
- ./dashboards/:/var/lib/grafana/dashboards/:ro
4040
ports:
4141
- "3000:3000"
42+
perses:
43+
image: persesdev/perses:${PERSES_VERSION}
44+
command: "--config=/etc/perses/config/config.yaml"
45+
ports:
46+
- "8080:8080"
47+
volumes:
48+
- ./perses/config.yaml:/etc/perses/config/config.yaml:ro
49+
- ./perses/datasource.yaml:/etc/perses/resources/datasource.yaml:ro
50+
- ./perses/project.yaml:/etc/perses/resources/project.yaml:ro
51+
- ./perses/dashboards/cortex-writes.yaml:/etc/perses/resources/cortex-writes.yaml:ro
4252
prometheus:
4353
image: prom/prometheus:${PROMETHEUS_VERSION}
4454
command:
@@ -55,8 +65,11 @@ services:
5565
- -s3.config=/workspace/seaweedfs-config.json
5666
ports:
5767
- "8333:8333"
68+
post_start:
69+
- command: /seaweedfs-init.sh
5870
volumes:
5971
- ./seaweedfs-config.json:/workspace/seaweedfs-config.json:ro
72+
- ./seaweedfs-init.sh:/seaweedfs-init.sh:ro
6073
healthcheck:
6174
test: wget -qO- http://127.0.0.1:8333/status
6275
interval: 10s
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
security:
2+
readonly: false
3+
enable_auth: false
4+
cookie:
5+
same_site: lax
6+
secure: false
7+
8+
database:
9+
file:
10+
extension: yaml
11+
folder: /perses
12+
13+
schemas:
14+
datasources_path: /etc/perses/cue/schemas/datasources
15+
interval: 5m
16+
panels_path: /etc/perses/cue/schemas/panels
17+
queries_path: /etc/perses/cue/schemas/queries
18+
variables_path: /etc/perses/cue/schemas/variables
19+
provisioning:
20+
folders:
21+
- /etc/perses/resources

0 commit comments

Comments
 (0)