Automata Redis
Project description
Automata Redis
both for conventional key-value & timeseries data.
Packaging
python3 -m build
Commands
- Timeseries Range (open ended)
TS.RANGE [KEY] 0 +
- Timeseries Range (latest value summarized)
TS.GET [KEY]
LXD Container
Create LXD container
cd ~/projects/scripts/bash-scripts/lxc/
./lxc-create-basic-ubuntu-container.sh automata-all 10.104.71.60 /projects/code/automata-projects/automata-deploy
lxc.list
Add these aliases to vi ~/bash/bash-profile-aliases/aliases/bash-projects
# automata all
alias automata-all.lxc.start="lxc.start-container automata-all"
alias automata-all.lxc.stop="lxc.stop-container automata-all"
alias automata-all.lxc.run-in="lxc.run-in.container automata-all"
alias automata-all.project="cd ~/projects/code/automata-projects/automata-deploy"
Remember to run source ~/.bashrc
Container Info
lxc image list images: ubuntu/22.04 amd64
Container Manipulation
lxc stop automata-all
lxc delete automata-all
Accessing Container
automata-all.lxc.run-in
Redis (Container)
Redis Install
sudo apt update
sudo apt install redis
Redis Config
sudo vi /etc/redis/redis.conf
- Change to
bind 10.104.71.60 127.0.0.1
(allow second IP for accessing on host by default) sudo systemctl restart redis-server
Redis Time Series
Prerequisites
sudo apt install make
sudo apt install python3-dev
Build & Install RedisTimeSeries Module
This is a module, which needs to be built, installed and configured into the Redis server.
mkdir -p ~/software/redis/module
cd ~/software/redis/module
git clone --recursive https://github.com/RedisTimeSeries/RedisTimeSeries.git
cd ~/software/redis/module/RedisTimeSeries
make setup
make build
sudo mkdir /etc/redis/modules
sudo mv bin/linux-x64-release/redistimeseries.so /etc/redis/modules/
(get the actual file not symbolic linked one)sudo vi /etc/redis/redis.conf
- Add the line
loadmodule /etc/redis/modules/redistimeseries.so
toredis.conf
Verify Redis log
less /var/log/redis/redis-server.log
should see:
192:M 26 Jul 2022 13:00:44.751 * <timeseries> RedisTimeSeries version 999999, git_sha=7c671138969c9dd9edcd9825427a9d360ac147e7
192:M 26 Jul 2022 13:00:44.752 * <timeseries> Redis version found by RedisTimeSeries : 6.0.16 - oss
192:M 26 Jul 2022 13:00:44.755 * <timeseries> loaded default CHUNK_SIZE_BYTES policy: 4096
192:M 26 Jul 2022 13:00:44.755 * <timeseries> loaded server DUPLICATE_POLICY: block
192:M 26 Jul 2022 13:00:44.755 * <timeseries> Setting default series ENCODING to: compressed
192:M 26 Jul 2022 13:00:44.756 * <timeseries> Detected redis oss
192:M 26 Jul 2022 13:00:44.759 * Module 'timeseries' loaded from /etc/redis/modules/redistimeseries.so
Verify via redis cli
redis-cli
INFO Modules
Should see:
# Modules
module:name=timeseries,ver=999999,api=1,filters=0,usedby=[],using=[],options=[]
Redis Port (outside container)
nc -zv 10.104.71.60 6379
Stop and start the container to ensure redis, has installed correctly.
Backup (Redis)
CONFIG get dir
(inredis-cli
) Tells where the dump file is locatedSAVE
/var/lib/redis
(should bedump.rdb
)sudo systemctl status redis-server
sudo systemctl stop redis-server
sudo cp /var/lib/redis/dump.rdb BACKUP-DIR
Restore (Redis)
sudo systemctl stop redis-server
sudo cp BACKUP-DIR /var/lib/redis/dump.rdb
sudo systemctl start redis-server
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for persuader-technology-automata-redis-0.3.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fb38835347722bc1ad4f41c962fc230a0d111f43edc8a77ac900fbb6eb1ae80 |
|
MD5 | da7df9ff030cda1a36cda4a30b34cd9d |
|
BLAKE2b-256 | cf4bb8ab1b27cec563e6798ad443383ad71bbd08a08577ce21abbc405f2eaf1e |
Close
Hashes for persuader_technology_automata_redis-0.3.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcc11ed3451e5b74cf9272c709141d6c63d372bfe43826904c1e132dbe06e244 |
|
MD5 | a81b9198137b0930bc81e6eb6623f09c |
|
BLAKE2b-256 | 6ac923d9fc6389b72e7f6ed12c11bb414aef626ec7c6f3f9bba36abd7ab965a5 |