Skip to content

Commit 151a9b2

Browse files
committed
Use in-cluster archive
1 parent cbc73ae commit 151a9b2

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ ARCHIVE_API_SSL=0
1111
ARCHIVE_API_HOST=127.0.0.1
1212
ARCHIVE_API_PORT=4000
1313
ARCHIVE_API_PATH=/trpc
14-
ARCHIVE_CLIENT_GCLOUD_SCOPE=
15-
ARCHIVE_CLIENT_GCLOUD_CREDENTIALS=

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This is a rebuild of [unkhz/ruuvitaulu](https://github.com/unkhz/ruuvitaulu), at
1414
Following shiny tools are used
1515

1616
- [Cloudflare workers](https://workers.cloudflare.com/) for serverless functions and apps
17-
- [Google Cloud Run](https://cloud.google.com/run) for apps that require nodejs apis
1817
- [Redis Streams](https://redis.io/docs/data-types/streams/) for durable processing of measurements
1918
- [TimescaleDb](https://www.timescale.com/) for SQL based long term storage of time series data
2019
- [Nx (package based)](https://nx.dev) for monorepo organization and task running
@@ -48,6 +47,7 @@ npm run setup
4847
### Running
4948

5049
Run gateway functionality in gateway box
50+
5151
```
5252
npm run start-gateway
5353
```
@@ -62,8 +62,8 @@ npm run start-gateway
6262
| Listener | Rust app / Ruuvi Station | Extract | captures measurements, forwards to gateway box |
6363
| Gatherer | Typescript app w/ Bun runtime | Staging | receives data from a different network, stores intermediate snapshots of measurement |
6464
| Queue | Redis streams | Staging | holds measurements, allows quantizing the time dimension of measurements |
65-
| Publisher | Typescript app w/ Bun runtime | Transform / Load | transforms intermediate data into final format, pushes final data forward towards Archive |
66-
| Archive | tRPC API for TimescaleDb | Load | stores data in final format, provides to consumers like Grafana, Configurator |
65+
| Publisher | Typescript app w/ Bun runtime | Transform / Load | transforms intermediate data into final format, pushes final data forward towards Archive |
66+
| Archive | tRPC API for TimescaleDb | Load | stores data in final format, provides to consumers like Grafana, Configurator |
6767

6868
#### Network topology diagram (example setup)
6969

packages/archive/.khz-k3s/deployment.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,23 @@ spec:
2020
containers:
2121
- name: ruuvipuserrin-archive
2222
image: ghcr.io/unkhz/ruuvipuserrin-archive:latest
23+
env:
24+
- name: PG_HOST
25+
value: acid-minimal-cluster.apps.svc.cluster.local
26+
- name: PG_PORT
27+
value: '5432'
28+
- name: PG_DB
29+
value: 'ruuvi'
30+
- name: PG_USER
31+
valueFrom:
32+
secretKeyRef:
33+
name: postgres.acid-minimal-cluster.credentials.postgresql.acid.zalan.do
34+
key: username
35+
- name: PG_PASSWORD
36+
valueFrom:
37+
secretKeyRef:
38+
name: postgres.acid-minimal-cluster.credentials.postgresql.acid.zalan.do
39+
key: password
2340
ports:
2441
- containerPort: 8080
2542
resources:

0 commit comments

Comments
 (0)