From 0e62286eeac2eb566e9dbe0860a0dde4273846a0 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 31 Mar 2023 13:06:06 +0200 Subject: [PATCH 1/6] Fix menu order --- docs/content/Deployment/Platform-Cube-Cloud.mdx | 2 +- docs/content/Deployment/Platform-Docker.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/Deployment/Platform-Cube-Cloud.mdx b/docs/content/Deployment/Platform-Cube-Cloud.mdx index 61b7586f81664..b66d2eac98dfe 100644 --- a/docs/content/Deployment/Platform-Cube-Cloud.mdx +++ b/docs/content/Deployment/Platform-Cube-Cloud.mdx @@ -4,7 +4,7 @@ menuTitle: Cube Cloud permalink: /deployment/platforms/cube-cloud category: Deployment subCategory: Platforms -menuOrder: 1 +menuOrder: 10 --- This guide walks you through deploying Cube with [Cube Cloud][link-cube-cloud], diff --git a/docs/content/Deployment/Platform-Docker.mdx b/docs/content/Deployment/Platform-Docker.mdx index 65e1cf5591f92..f71ea91934001 100644 --- a/docs/content/Deployment/Platform-Docker.mdx +++ b/docs/content/Deployment/Platform-Docker.mdx @@ -4,7 +4,7 @@ menuTitle: Docker permalink: /deployment/platforms/docker category: Deployment subCategory: Platforms -menuOrder: 2 +menuOrder: 11 --- This guide walks you through deploying Cube with Docker. From ec148568bb04f534fda257c069885d71da6920b0 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 31 Mar 2023 13:06:32 +0200 Subject: [PATCH 2/6] Remove remnants of Redis --- docs/content/Configuration/Advanced/Multitenancy.mdx | 7 ------- docs/content/Deployment/Platform-Docker.mdx | 6 ------ 2 files changed, 13 deletions(-) diff --git a/docs/content/Configuration/Advanced/Multitenancy.mdx b/docs/content/Configuration/Advanced/Multitenancy.mdx index 657e974899120..cd703092372f6 100644 --- a/docs/content/Configuration/Advanced/Multitenancy.mdx +++ b/docs/content/Configuration/Advanced/Multitenancy.mdx @@ -349,13 +349,6 @@ input. -## Connecting to Redis - -When configured for multitenancy, Cube uses a separate connection pool for each -configured tenant. This means that the `CUBEJS_REDIS_POOL_MIN` and -`CUBEJS_REDIS_POOL_MAX` environment variables specify the minimum and maximum -number of Redis connections **per-tenant**. - [ref-config]: /config [ref-config-opts]: /config#options-reference [ref-config-db]: /config/databases diff --git a/docs/content/Deployment/Platform-Docker.mdx b/docs/content/Deployment/Platform-Docker.mdx index f71ea91934001..3b494ab90a40b 100644 --- a/docs/content/Deployment/Platform-Docker.mdx +++ b/docs/content/Deployment/Platform-Docker.mdx @@ -207,7 +207,6 @@ services: - CUBEJS_DB_BQ_CREDENTIALS= - CUBEJS_DB_EXPORT_BUCKET=cubestore - CUBEJS_CUBESTORE_HOST=cubestore_router - - CUBEJS_REDIS_URL=redis://redis:6379 - CUBEJS_API_SECRET=secret - CUBEJS_JWK_URL=https://cognito-idp..amazonaws.com//.well-known/jwks.json - CUBEJS_JWT_AUDIENCE= @@ -220,7 +219,6 @@ services: - cubestore_worker_1 - cubestore_worker_2 - cube_refresh_worker - - redis ``` ### <--{"id" : "Security"}--> Securing Cube Store @@ -274,14 +272,12 @@ services: - CUBEJS_DB_BQ_CREDENTIALS= - CUBEJS_DB_EXPORT_BUCKET=cubestore - CUBEJS_CUBESTORE_HOST=cubestore_router - - CUBEJS_REDIS_URL=redis://redis:6379 - CUBEJS_API_SECRET=secret volumes: - .:/cube/conf depends_on: - cubestore_router - cube_refresh_worker - - redis ``` ## Extend the Docker image @@ -337,7 +333,6 @@ services: - CUBEJS_DB_BQ_CREDENTIALS= - CUBEJS_DB_EXPORT_BUCKET=cubestore - CUBEJS_CUBESTORE_HOST=cubestore_router - - CUBEJS_REDIS_URL=redis://redis:6379 - CUBEJS_API_SECRET=secret volumes: - .:/cube/conf @@ -346,7 +341,6 @@ services: depends_on: - cubestore_router - cube_refresh_worker - - redis ``` [medium-letsencrypt-nginx]: From 7f2155ebe59b2b82a89227ee29da6938ebe013fb Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 31 Mar 2023 13:07:59 +0200 Subject: [PATCH 3/6] Remove content duplication --- docs/content/Deployment/Overview.mdx | 80 +--------------------------- 1 file changed, 2 insertions(+), 78 deletions(-) diff --git a/docs/content/Deployment/Overview.mdx b/docs/content/Deployment/Overview.mdx index e678f46c373b6..000331dcb3d56 100644 --- a/docs/content/Deployment/Overview.mdx +++ b/docs/content/Deployment/Overview.mdx @@ -42,84 +42,8 @@ also need access to the data schema files. Cube Store cluster can be configured via environment variables. -Below you can find an example Docker Compose configuration for a Cube cluster: - -```yaml -version: '2.2' - -services: - cube_api: - image: cubejs/cube - ports: - - 4000:4000 - environment: - - CUBEJS_DB_TYPE=bigquery - - CUBEJS_DB_BQ_PROJECT_ID=cubejs-k8s-cluster - - CUBEJS_DB_BQ_CREDENTIALS= - - CUBEJS_DB_EXPORT_BUCKET=cubestore - - - CUBEJS_CUBESTORE_HOST=cubestore_router - - - CUBEJS_API_SECRET=secret - volumes: - - .:/cube/conf - depends_on: - - cubestore_worker_1 - - cubestore_worker_2 - - cube_refresh_worker - - cube_refresh_worker: - image: cubejs/cube - environment: - - CUBEJS_DB_TYPE=bigquery - - CUBEJS_DB_BQ_PROJECT_ID=cubejs-k8s-cluster - - CUBEJS_DB_BQ_CREDENTIALS= - - CUBEJS_DB_EXPORT_BUCKET=cubestore - - - CUBEJS_CUBESTORE_HOST=cubestore_router - - - CUBEJS_API_SECRET=secret - - - CUBEJS_REFRESH_WORKER=true - volumes: - - .:/cube/conf - - cubestore_router: - image: cubejs/cubestore:latest - environment: - - CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002 - - CUBESTORE_REMOTE_DIR=/cube/data - - CUBESTORE_META_PORT=9999 - - CUBESTORE_SERVER_NAME=cubestore_router:9999 - volumes: - - .cubestore:/cube/data - - cubestore_worker_1: - image: cubejs/cubestore:latest - environment: - - CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002 - - CUBESTORE_SERVER_NAME=cubestore_worker_1:10001 - - CUBESTORE_WORKER_PORT=10001 - - CUBESTORE_REMOTE_DIR=/cube/data - - CUBESTORE_META_ADDR=cubestore_router:9999 - volumes: - - .cubestore:/cube/data - depends_on: - - cubestore_router - - cubestore_worker_2: - image: cubejs/cubestore:latest - environment: - - CUBESTORE_WORKERS=cubestore_worker_1:10001,cubestore_worker_2:10002 - - CUBESTORE_SERVER_NAME=cubestore_worker_2:10002 - - CUBESTORE_WORKER_PORT=10002 - - CUBESTORE_REMOTE_DIR=/cube/data - - CUBESTORE_META_ADDR=cubestore_router:9999 - volumes: - - .cubestore:/cube/data - depends_on: - - cubestore_router -``` +You can find an example Docker Compose configuration for a Cube deployment in +the platform-specific guide for [Docker][ref-deploy-docker]. ## API Instance From 297867c23c5d63f73334b6e21a5ccf814f3bc7b3 Mon Sep 17 00:00:00 2001 From: Igor Lukanin Date: Fri, 31 Mar 2023 13:09:25 +0200 Subject: [PATCH 4/6] Slightly edit the page --- docs/content/Deployment/Overview.mdx | 32 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/docs/content/Deployment/Overview.mdx b/docs/content/Deployment/Overview.mdx index 000331dcb3d56..ce6567a09f8c8 100644 --- a/docs/content/Deployment/Overview.mdx +++ b/docs/content/Deployment/Overview.mdx @@ -10,16 +10,20 @@ redirect_from: --- This section contains a general overview of deploying a Cube cluster in -production. You can find platform-specific guides for: - -- [Cube Cloud][ref-deploy-cubecloud] -- [Docker][ref-deploy-docker] +production. You can also check platform-specific guides for [Cube +Cloud][ref-deploy-cubecloud] and [Docker][ref-deploy-docker]. If you are moving Cube to production, check out the [Production Checklist][ref-deploy-prod-list]. -As shown in the diagram below, a typical production Cube cluster consists of one -or multiple API instances, a Refresh Worker and a Cube Store cluster. +## Components + +As shown in the diagram below, a typical production deployment of Cube includes +the following components: + +- one or multiple API instances +- a refresh worker +- a Cube Store cluster
Date: Fri, 31 Mar 2023 13:09:35 +0200 Subject: [PATCH 5/6] Add Redis notice --- docs/content/Deployment/Overview.mdx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/content/Deployment/Overview.mdx b/docs/content/Deployment/Overview.mdx index ce6567a09f8c8..3b3a0eef1c3b9 100644 --- a/docs/content/Deployment/Overview.mdx +++ b/docs/content/Deployment/Overview.mdx @@ -203,6 +203,22 @@ services: - cubestore_router ``` +## Redis + +Earlier, [Redis][redis] was used in production deployments as storage +for in-memory cache and query queue. Since version v0.32.0, Cube Store is used +for that purpose. It is still possible to [configure][ref-config-redis] Cube to +use Redis; however, it is strongly not recommended. Please check the [blog +post][blog-details] for details. + + + +Redis support is deprecated and will be removed from Cube in the future. Upgrade +to v0.32.0 or later to use Cube Store instead of Redis. See the [migration +guide][blog-migration-guide]. + + + [dh-cubejs]: https://hub.docker.com/r/cubejs/cube [dh-cubestore]: https://hub.docker.com/r/cubejs/cubestore [gh-cube-examples-k8s]: @@ -214,3 +230,8 @@ services: [ref-deploy-docker]: /deployment/platforms/docker [ref-config-env]: /reference/environment-variables [ref-config-js]: /config +[redis]: https://redis.io +[ref-config-redis]: /reference/environment-variables#cubejs-redis-password +[blog-details]: https://cube.dev/blog/how-you-win-by-using-cube-store-part-1 +[blog-migration-guide]: + https://cube.dev/blog/how-you-win-by-using-cube-store-part-1#how-to-migrate-to-cube-store From 4db389cdb118294d066f6e5758aa263a92570222 Mon Sep 17 00:00:00 2001 From: Hassan Khan Date: Fri, 31 Mar 2023 13:28:11 +0200 Subject: [PATCH 6/6] docs: minor adjustments --- docs/content/Deployment/Overview.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/Deployment/Overview.mdx b/docs/content/Deployment/Overview.mdx index 3b3a0eef1c3b9..fd6a5544e8997 100644 --- a/docs/content/Deployment/Overview.mdx +++ b/docs/content/Deployment/Overview.mdx @@ -21,9 +21,9 @@ Checklist][ref-deploy-prod-list]. As shown in the diagram below, a typical production deployment of Cube includes the following components: -- one or multiple API instances -- a refresh worker -- a Cube Store cluster +- One or multiple API instances +- A Refresh Worker +- A Cube Store cluster