diff --git a/Dockerfile b/Dockerfile index 67e053f..8e6a8d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM redash/redash:latest +# Most recent version released as of 2022-05-10 +FROM redash/redash:10.1.0.b50633 COPY ./render-redash.sh /bin/render-redash ENTRYPOINT ["/bin/render-redash"] diff --git a/README.md b/README.md index 32b6ce8..91c94a0 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,26 @@ See the guide at https://render.com/docs/deploy-redash. If you need help, chat with us at https://render.com/chat. [Redash]: https://redash.io + +## Upgrade + +### From v8 to v10 + +*Note that Redash v10 requires more resources:* + +- The Web Service now uses the **Standard Plus** plan instead of the **Standard** plan because it needs more RAM. +- An additional **Background Worker** service, `redash-default-worker`, is deployed bringing the total Background Worker count up to three. + +Please see https://render.com/pricing to determine how these changes will affect your Render charges. + +**Steps to upgrade:** + +1. Make sure you have performed a backup of your existing Redash database. You can [manually trigger a database backup](https://render.com/docs/databases#backups) from the Render Dashboard. +2. Review the **Redash Dashboard URL Changes** section in the [v10.0.0 release notes](https://github.com/getredash/redash/releases/tag/v10.0.0). Note that you do *not* need to follow the **How to Upgrade** steps. Those are specific to deploying Redash with Docker Compose. The updates we've made to this repository have taken care of those steps for you. +3. Review the **Impact** section at [this link](https://github.com/getredash/redash/security/advisories/GHSA-g8xr-f424-h2rv) discussing the security vulnerabilities fixed in v10.1.0 to understand if they affect your previous deploy. +4. Go to **Render Dashboard** --> **Blueprints** --> your existing Redash Blueprint, and then click **Manual Sync**. This will deploy a v10 version of Redash for the Web Service and your Background Workers. +5. Run database migrations required for v10 from the **Shell** of your Web Service: `render-redash manage db upgrade`. +6. Clean-up resources that are no longer needed: + 1. Delete the `QUEUES`, `WORKERS_COUNT`, and `REDIS_HOSTPORT` environment variables in the `redash-scheduler` service. + 2. Delete the `REDIS_HOSTPORT` environment variable in the `redash-worker` service. + 3. Delete the `redash-redis` **Private Service**. Ensure you do not delete the newly created **Managed Redis** service. You can differentiate between the two using the **Type** column in the Dashboard. diff --git a/render-redash.sh b/render-redash.sh index 515ced4..59e5fa7 100755 --- a/render-redash.sh +++ b/render-redash.sh @@ -4,6 +4,5 @@ set -e export PYTHONUNBUFFERED=1 export REDASH_HOST="$RENDER_EXTERNAL_HOSTNAME" -export REDASH_REDIS_URL="redis://${REDIS_HOSTPORT}/0" exec /app/bin/docker-entrypoint "$@" diff --git a/render.yaml b/render.yaml index 3578334..eda3829 100644 --- a/render.yaml +++ b/render.yaml @@ -5,21 +5,25 @@ databases: services: # Do not forget to run `render-redash create_db` in Render Shell after creating this service. + # If you have upgraded from a previous version, run `render-redash manage db upgrade` instead. - type: web name: redash env: docker - plan: standard + plan: standard plus dockerCommand: render-redash server + healthCheckPath: /ping envVars: + - key: PORT + value: 5000 - key: REDASH_DATABASE_URL fromDatabase: name: redash property: connectionString - - key: REDIS_HOSTPORT + - key: REDASH_REDIS_URL fromService: - type: pserv + type: redis name: redash-redis - property: hostport + property: connectionString - fromGroup: redash-shared - fromGroup: redash-mail @@ -32,17 +36,13 @@ services: fromDatabase: name: redash property: connectionString - - key: REDIS_HOSTPORT + - key: REDASH_REDIS_URL fromService: - type: pserv + type: redis name: redash-redis - property: hostport + property: connectionString - fromGroup: redash-shared - fromGroup: redash-mail - - key: QUEUES - value: "celery" - - key: WORKERS_COUNT - value: 1 - type: worker name: redash-worker @@ -54,24 +54,43 @@ services: fromDatabase: name: redash property: connectionString - - key: REDIS_HOSTPORT + - key: REDASH_REDIS_URL fromService: - type: pserv + type: redis name: redash-redis - property: hostport + property: connectionString - fromGroup: redash-shared - fromGroup: redash-mail - key: QUEUES value: "queries,scheduled_queries,schemas" + - key: WORKERS_COUNT + value: 2 - - type: pserv - name: redash-redis + - type: worker + name: redash-default-worker env: docker - repo: https://github.com/render-examples/redis.git - disk: - name: data - mountPath: /var/lib/redis - sizeGB: 10 + plan: standard + dockerCommand: render-redash worker + envVars: + - key: REDASH_DATABASE_URL + fromDatabase: + name: redash + property: connectionString + - key: REDASH_REDIS_URL + fromService: + type: redis + name: redash-redis + property: connectionString + - fromGroup: redash-shared + - fromGroup: redash-mail + - key: QUEUES + value: "periodic emails default" + - key: WORKERS_COUNT + value: 1 + + - type: redis + name: redash-redis + ipAllowList: [] envVarGroups: - name: redash-shared