cube store 很早就已经支持minio s3 了,以下是一个测试,以及数据查看
version: '3'
services:
minio:
image: minio/minio
ports:
- "9002:9000"
- "19001:19001"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server --console-address :19001 --quiet /data
cubestore_router:
image: cubejs/cubestore:latest
ports:
- "3306:3306"
- "3030:3030"
- "5432:5432"
environment:
- CUBESTORE_SERVER_NAME=cubestore_router:9999
- CUBESTORE_META_PORT=9999
- CUBESTORE_WORKERS=cubestore_worker_1:9001
- CUBESTORE_MINIO_BUCKET=demoapp
- CUBESTORE_MINIO_REGION=us-east-1
- CUBESTORE_MINIO_SERVER_ENDPOINT=http://minio:9000
- CUBESTORE_MINIO_ACCESS_KEY_ID=minio
- CUBESTORE_MINIO_SECRET_ACCESS_KEY=minio123
depends_on:
- minio
cubestore_worker_1:
image: cubejs/cubestore:latest
environment:
- CUBESTORE_SERVER_NAME=cubestore_worker_1:9001
- CUBESTORE_WORKER_PORT=9001
- CUBESTORE_META_ADDR=cubestore_router:9999
- CUBESTORE_WORKERS=cubestore_worker_1:9001
- CUBESTORE_MINIO_BUCKET=demoapp
- CUBESTORE_MINIO_REGION=us-east-1
- CUBESTORE_MINIO_SERVER_ENDPOINT=http://minio:9000
- CUBESTORE_MINIO_ACCESS_KEY_ID=minio
- CUBESTORE_MINIO_SECRET_ACCESS_KEY=minio123
depends_on:
- cubestore_router
- minio
docker-compose up -d
可以使用mysql cli 启动测试
mysql -uroot -h127.0.0.1
create schema demoapp;
create table demoapp.demoapp(id varchar(100),age int);
insert into demoapp.demoapp(id,age) values('1',3);
select * from demoapp.demoapp;
效果
s3
cube.js 计划使用cube store 替换redis 了,实际上这个是一个很大的变动,期待ga,redis 有些场景还是比较费事的,管理以及使用上都不是特别的好
https://cube.dev/docs/reference/environment-variables
https://cube.dev/docs/caching/using-pre-aggregations
https://cube.dev/docs/caching/running-in-production