Skip to content

Commit 9ea7ced

Browse files
authored
Update Readme, docker and packages (#8)
1 parent e02ac02 commit 9ea7ced

File tree

8 files changed

+321
-219
lines changed

8 files changed

+321
-219
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Change Log
2+
3+
## 2.0.0 (2021-10-11)
4+
5+
### Features / Enhancements
6+
7+
- Added Streaming dashboard
8+
- Update screenshots and dashboards for Grafana 8.2
9+
- Added demo on https://demo.volkovlabs.io
10+
11+
## v1.0.0 (2020-07-12)
12+
13+
### Features / Enhancements
14+
15+
- Initial release

LICENSE

Lines changed: 183 additions & 183 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Pop-up store demo using RedisTimeSeries, RedisGears and Redis Data Source for Grafana</h1>
1+
# Pop-up store demo using RedisTimeSeries, RedisGears and Redis plugins for Grafana</h1>
22

33
![Pop-up](https://github.com/RedisTimeSeries/redis-pop-up-store/blob/master/images/pop-up.gif)
44

5-
[![Grafana 7](https://img.shields.io/badge/Grafana-7-orange)](https://www.grafana.com)
6-
[![RedisTimeSeries](https://img.shields.io/badge/RedisTimeSeries-inspired-yellowgreen)](https://oss.redislabs.com/redistimeseries/)
7-
[![RedisGears](https://img.shields.io/badge/RedisGears-powered-green)](https://oss.redislabs.com/redisgears/) [![Redis Data Source](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Data%20Source&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-datasource)](https://grafana.com/grafana/plugins/redis-datasource) [![Redis Application](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Data%20Source&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-app)](https://grafana.com/grafana/plugins/redis-app)
5+
[![Grafana 8](https://img.shields.io/badge/Grafana-8-orange)](https://www.grafana.com)
6+
[![Redis Data Source](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Data%20Source&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-datasource)](https://grafana.com/grafana/plugins/redis-datasource) [![Redis Application](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Application&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-app)](https://grafana.com/grafana/plugins/redis-app)
87

9-
The Pop-up store demo is using [Redis Streams](https://redis.io/topics/streams-intro), [RedisTimeSeries](https://oss.redislabs.com/redistimeseries/), [RedisGears](https://oss.redislabs.com/redisgears/) and [Redis Datasource](https://github.com/RedisTimeSeries/grafana-redis-datasource) to visualize data pipeline in Grafana.
8+
The Pop-up store demo is using [Redis Streams](https://redis.io/topics/streams-intro), [RedisTimeSeries](https://oss.redis.com/redistimeseries/), [RedisGears](https://oss.redis.com/redisgears/) and [Redis plugins](https://redisgrafana.github.io) to visualize data pipeline in Grafana.
109

1110
## How it works
1211

@@ -50,7 +49,7 @@ gb.map(complete)
5049
gb.register(prefix='queue:orders', batch=3, trimStream=True)
5150
```
5251

53-
- Grafana query streams and Time-Series keys every 5 seconds to display samples using Grafana Redis Datasource.
52+
- Grafana query streams and Time-Series keys every 5 seconds to display samples using Grafana plugins.
5453

5554
## What is displayed on Grafana dashboard
5655

@@ -70,29 +69,29 @@ gb.register(prefix='queue:orders', batch=3, trimStream=True)
7069

7170
## Start Redis with RedisTimeSeries and RedisGears modules installed and Grafana
7271

73-
For detailed instructions please take a look at [redismod - a Docker image with select Redis Labs modules](https://hub.docker.com/r/redislabs/redismod).
74-
7572
```
76-
npm run start:docker
73+
npm run start
7774
```
7875

79-
## Register [StreamReaders](https://oss.redislabs.com/redisgears/readers.html#streamreader)
76+
## Register [StreamReaders](https://oss.redis.com/redisgears/readers.html#streamreader)
8077

8178
Install Readers to add Time-Series and complete orders
8279

8380
```
84-
npm run register:gears
81+
npm run register
8582
```
8683

8784
## Install [ioredis](https://github.com/luin/ioredis) module and run simulation
8885

8986
Script `pop-up-store.js` will add customers to stream `queue:customers` and their orders to `queue:orders`.
9087

9188
```
92-
npm run start:simulation
89+
npm run simulation
9390
```
9491

95-
## Open Grafana Dashboard using browser http://localhost:3000
92+
## Grafana Dashboards
93+
94+
Open Grafana Dashboard using browser http://localhost:3000
9695

9796
## Redis-cli
9897

docker-compose.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@ version: "3.4"
22

33
services:
44
redis:
5-
container_name: redismod
6-
image: redislabs/redismod:latest
5+
container_name: redis
6+
image: ghcr.io/redisgrafana/redis-prophet:latest
77
ports:
88
- "6379:6379"
9-
# Uncomment and edit the local path in the following line to have
10-
# Redis' data persisted to the host's filesystem.
11-
# volumes:
12-
# - ./dump.rdb:/data/dump.rdb
139

1410
grafana:
1511
container_name: grafana
16-
image: grafana/grafana:latest
12+
image: ghcr.io/redisgrafana/redis-app:latest
1713
ports:
1814
- "3000:3000"
1915
environment:
@@ -22,9 +18,5 @@ services:
2218
- GF_AUTH_BASIC_ENABLED=false
2319
- GF_ENABLE_GZIP=true
2420
- GF_USERS_DEFAULT_THEME=light
25-
- GF_INSTALL_PLUGINS=redis-app
2621
volumes:
2722
- ./provisioning:/etc/grafana/provisioning
28-
- ./dashboards:/var/lib/grafana/dashboards
29-
# Uncomment to preserve Grafana configuration
30-
# - ./data:/var/lib/grafana

gears-execute.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install StreamReader to add Queue to Time-Series
2-
cat gears/timeseries.py | docker exec -i redismod redis-cli -x RG.PYEXECUTE
2+
cat gears/timeseries.py | docker exec -i redis redis-cli -x RG.PYEXECUTE
33

44
# Install StreamReader to complete orders
5-
cat gears/complete.py | docker exec -i redismod redis-cli -x RG.PYEXECUTE
5+
cat gears/complete.py | docker exec -i redis redis-cli -x RG.PYEXECUTE

package-lock.json

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"author": "Mikhail Volkov",
33
"dependencies": {
4-
"ioredis": "^4.17.3"
4+
"ioredis": "^4.17.3",
5+
"lodash": "^4.17.21"
56
},
67
"description": "Pop-up store using RedisTimeSeries, RedisGears and Redis Datasource for Grafana",
78
"license": "Apache-2.0",
89
"name": "redis-pop-up-store",
910
"scripts": {
10-
"start:simulation": "npm i; node src/pop-up-store.js",
11-
"start:docker": "docker-compose up",
12-
"stop:docker": "docker-compose down",
13-
"register:gears": "./gears-execute.sh && docker exec -it redismod redis-cli RG.DUMPREGISTRATIONS",
14-
"redis-cli": "docker exec -it redismod redis-cli"
11+
"redis-cli": "docker exec -it redis redis-cli",
12+
"register": "./gears-execute.sh && docker exec -it redis redis-cli RG.DUMPREGISTRATIONS",
13+
"simulation": "npm i; node src/pop-up-store.js",
14+
"start": "docker-compose pull && docker-compose up",
15+
"stop": "docker-compose down",
16+
"upgrade": "yarn upgrade --latest"
1517
},
16-
"version": "1.1.0"
18+
"version": "2.0.0"
1719
}

yarn.lock

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"cluster-key-slot@^1.1.0":
6+
"integrity" "sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw=="
7+
"resolved" "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz"
8+
"version" "1.1.0"
9+
10+
"debug@^4.3.1":
11+
"integrity" "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ=="
12+
"resolved" "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz"
13+
"version" "4.3.1"
14+
dependencies:
15+
"ms" "2.1.2"
16+
17+
"denque@^1.1.0":
18+
"integrity" "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ=="
19+
"resolved" "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz"
20+
"version" "1.5.0"
21+
22+
"ioredis@^4.17.3":
23+
"integrity" "sha512-HxZHYYSC7URouhGKI7l7PhVuSMk6VcdnBMjUcIkW4DhKVqzutF7eixZHKHf51X0SCnbI0eljMtToEydCMIrA2g=="
24+
"resolved" "https://registry.npmjs.org/ioredis/-/ioredis-4.24.6.tgz"
25+
"version" "4.24.6"
26+
dependencies:
27+
"cluster-key-slot" "^1.1.0"
28+
"debug" "^4.3.1"
29+
"denque" "^1.1.0"
30+
"lodash.defaults" "^4.2.0"
31+
"lodash.flatten" "^4.4.0"
32+
"p-map" "^2.1.0"
33+
"redis-commands" "1.7.0"
34+
"redis-errors" "^1.2.0"
35+
"redis-parser" "^3.0.0"
36+
"standard-as-callback" "^2.1.0"
37+
38+
"lodash.defaults@^4.2.0":
39+
"integrity" "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw="
40+
"resolved" "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz"
41+
"version" "4.2.0"
42+
43+
"lodash.flatten@^4.4.0":
44+
"integrity" "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8="
45+
"resolved" "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz"
46+
"version" "4.4.0"
47+
48+
"lodash@^4.17.21":
49+
"integrity" "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
50+
"resolved" "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
51+
"version" "4.17.21"
52+
53+
"ms@2.1.2":
54+
"integrity" "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
55+
"resolved" "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
56+
"version" "2.1.2"
57+
58+
"p-map@^2.1.0":
59+
"integrity" "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw=="
60+
"resolved" "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz"
61+
"version" "2.1.0"
62+
63+
"redis-commands@1.7.0":
64+
"integrity" "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ=="
65+
"resolved" "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz"
66+
"version" "1.7.0"
67+
68+
"redis-errors@^1.0.0", "redis-errors@^1.2.0":
69+
"integrity" "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60="
70+
"resolved" "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz"
71+
"version" "1.2.0"
72+
73+
"redis-parser@^3.0.0":
74+
"integrity" "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ="
75+
"resolved" "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz"
76+
"version" "3.0.0"
77+
dependencies:
78+
"redis-errors" "^1.0.0"
79+
80+
"standard-as-callback@^2.1.0":
81+
"integrity" "sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A=="
82+
"resolved" "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz"
83+
"version" "2.1.0"

0 commit comments

Comments
 (0)