You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/services/store/entity/README.md
+53-7Lines changed: 53 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,12 +41,18 @@ idForwarding = true
41
41
storage_type = unified
42
42
```
43
43
44
-
With this configuration, you can run everything in-process with:
44
+
With this configuration, you can run everything in-process. Run the Grafana backend with:
45
45
46
46
```sh
47
47
bra run
48
48
```
49
49
50
+
or
51
+
52
+
```sh
53
+
make run
54
+
```
55
+
50
56
The default kubeconfig sends requests directly to the apiserver, to authenticate as a grafana user, create `grafana.kubeconfig`:
51
57
```yaml
52
58
apiVersion: v1
@@ -70,13 +76,22 @@ users:
70
76
username: <username>
71
77
password: <password>
72
78
```
73
-
Where `<username>` and `<password>` are credentials for basic auth against Grafana.
79
+
Where `<username>` and `<password>` are credentials for basic auth against Grafana. For example, with the [default credentials](https://github.com/grafana/grafana/blob/HEAD/contribute/developer-guide.md#backend):
80
+
```yaml
81
+
username: admin
82
+
password: admin
83
+
```
74
84
75
-
In this mode, you can interact with the k8s api via:
85
+
In this mode, you can interact with the k8s api. Make sure you are in the directory where you created `grafana.kubeconfig`. Then run:
76
86
```sh
77
87
kubectl --kubeconfig=./grafana.kubeconfig get playlist
78
88
```
79
89
90
+
If this is your first time running the command, a successful response would be:
91
+
```sh
92
+
No resources found in default namespace.
93
+
```
94
+
80
95
To create a playlist, create a file `playlist-generate.yaml`:
playlist.playlist.grafana.app/u394j4d3-s63j-2d74-g8hf-958773jtybf2 created
120
+
```
121
+
122
+
When running
123
+
```sh
124
+
kubectl --kubeconfig=./grafana.kubeconfig get playlist
125
+
```
126
+
you should now see something like:
127
+
```sh
128
+
NAME TITLE INTERVAL CREATED AT
129
+
u394j4d3-s63j-2d74-g8hf-958773jtybf2 Playlist with auto generated UID 5m 2023-12-14T13:53:35Z
130
+
```
131
+
102
132
### Use a separate database
103
133
104
-
To run against a separate database, update custom.ini:
134
+
By default Unified Storage uses the Grafana database. To run against a separate database, update `custom.ini` by adding the following section to it:
105
135
106
136
```
107
137
[entity_api]
108
138
db_type = mysql
109
139
db_host = localhost:3306
110
140
db_name = grafana
111
-
db_user = grafanauser
112
-
db_pass = grafanapass
141
+
db_user = <username>
142
+
db_pass = <password>
143
+
```
144
+
145
+
MySQL and Postgres are both supported. The `<username>` and `<password>` values can be found in the following devenv docker compose files: [MySQL](https://github.com/grafana/grafana/blob/main/devenv/docker/blocks/mysql/docker-compose.yaml#L6-L7) and [Postgres](https://github.com/grafana/grafana/blob/main/devenv/docker/blocks/postgres/docker-compose.yaml#L4-L5).
0 commit comments