From cd1e4df3e3dcfd62b30fba3705a0b569dbdb2316 Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Wed, 20 Apr 2022 12:10:28 +0100 Subject: [PATCH 1/8] chore: bump postgres from 10 to 14 --- .github/workflows/superset-e2e.yml | 2 +- .github/workflows/superset-python-integrationtest.yml | 2 +- .github/workflows/superset-python-presto-hive.yml | 4 ++-- docker-compose.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index be0df99551a40..e99c5ee05ef51 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -31,7 +31,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} services: postgres: - image: postgres:10-alpine + image: postgres:14-alpine env: POSTGRES_USER: superset POSTGRES_PASSWORD: superset diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index a5a7705bcd88e..926d6185bf4e8 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -88,7 +88,7 @@ jobs: SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset services: postgres: - image: postgres:10-alpine + image: postgres:14-alpine env: POSTGRES_USER: superset POSTGRES_PASSWORD: superset diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 3a4022d893eef..097b2f45adf9b 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -23,7 +23,7 @@ jobs: SUPERSET__SQLALCHEMY_EXAMPLES_URI: presto://localhost:15433/memory/default services: postgres: - image: postgres:10-alpine + image: postgres:14-alpine env: POSTGRES_USER: superset POSTGRES_PASSWORD: superset @@ -101,7 +101,7 @@ jobs: UPLOAD_FOLDER: /tmp/.superset/uploads/ services: postgres: - image: postgres:10-alpine + image: postgres:14-alpine env: POSTGRES_USER: superset POSTGRES_PASSWORD: superset diff --git a/docker-compose.yml b/docker-compose.yml index b7bf745ad6ff6..907ca51129caa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,7 @@ services: db: env_file: docker/.env - image: postgres:10 + image: postgres:14 container_name: superset_db restart: unless-stopped ports: From 18346e11f59edb0c58fba246c3bc07de1ed5999b Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Wed, 20 Apr 2022 15:00:34 +0100 Subject: [PATCH 2/8] update helm chart --- helm/superset/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 64600f5973ed4..3b99e2f3425ee 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -25,7 +25,7 @@ maintainers: version: 0.5.11 dependencies: - name: postgresql - version: 10.2.0 + version: 11.1.22 repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: redis From 788ad21eda43b30ced6ed0b1bee40e3ba1952b9c Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Wed, 20 Apr 2022 18:32:12 +0100 Subject: [PATCH 3/8] adding docs --- .../installation/configuring-superset.mdx | 26 +++++++++++++++++++ ...stalling-superset-using-docker-compose.mdx | 2 +- helm/superset/Chart.yaml | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index 86bddda180f30..07f03dc66a87e 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -69,6 +69,32 @@ you can add the endpoints to `WTF_CSRF_EXEMPT_LIST`: WTF_CSRF_EXEMPT_LIST = [‘’] ``` +### Using a production metadata database + +By default Superset is configured to use SQLlite, since it's a simple and fast way to get you started +(no installation needed) but for production environments you should a different database engine on a separate host or +container. + +Superset supports the following database engines/versions: + +| Database Engine | Supported Versions | +| --------------------------------------------------------- | --------------------------------- | +| [MySQL](https://www.mysql.com/) | 5.X | +| [PostgreSQL](https://www.postgresql.org/) | 10.X, 11.X, 12.X, 13.X, 14.X | + + +Use the following database drivers and connection strings: + +| Database | PyPI package | Connection String | +| -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------ | +| [MySQL](/docs/databases/mysql) | `pip install mysqlclient` | `mysql://:@/` | +| [PostgreSQL](/docs/databases/postgres) | `pip install psycopg2` | `postgresql://:@/` | +| SQLite | No additional library needed | `sqlite://` | + +To configure Superset metadata database set `SQLALCHEMY_DATABASE_URI` config key on `superset_config` +to the appropriate connection string: + + ### Running on a WSGI HTTP Server While you can run Superset on NGINX or Apache, we recommend using Gunicorn in async mode. This diff --git a/docs/docs/installation/installing-superset-using-docker-compose.mdx b/docs/docs/installation/installing-superset-using-docker-compose.mdx index 4d7056a165d8b..ced6ba5660a3b 100644 --- a/docs/docs/installation/installing-superset-using-docker-compose.mdx +++ b/docs/docs/installation/installing-superset-using-docker-compose.mdx @@ -109,7 +109,7 @@ username: admin password: admin ``` -### 5. Connecting your local database instance to superset +### 5. Connecting Superset to your local database instance When running Superset using `docker` or `docker-compose` it runs in its own docker container, as if the Superset was running in a separate machine entirely. Therefore attempts to connect to your local database with hostname `localhost` won't work as `localhost` refers to the docker container Superset is running in, and not your actual host machine. Fortunately, docker provides an easy way to access network resources in the host machine from inside a container, and we will leverage this capability to connect to our local database instance. diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 3b99e2f3425ee..2ac78630149b5 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -22,7 +22,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.5.11 +version: 0.6.0 dependencies: - name: postgresql version: 11.1.22 From 5a9b017eabcdcf5a6b8a8f204a7a100997946ed6 Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Wed, 20 Apr 2022 18:56:38 +0100 Subject: [PATCH 4/8] fix docs --- docs/docs/installation/configuring-superset.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index 07f03dc66a87e..75e80379ffd3e 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -71,9 +71,9 @@ WTF_CSRF_EXEMPT_LIST = [‘’] ### Using a production metadata database -By default Superset is configured to use SQLlite, since it's a simple and fast way to get you started -(no installation needed) but for production environments you should a different database engine on a separate host or -container. +By default Superset is configured to use SQLite, it's a simple and fast way to get you started +(no installation needed) but for production environments you should use a different database engine on +a separate host or container. Superset supports the following database engines/versions: From b73fd362a371db42776cd581b04f6954b79ceae7 Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Thu, 21 Apr 2022 08:50:36 +0100 Subject: [PATCH 5/8] Update docs/docs/installation/configuring-superset.mdx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- docs/docs/installation/configuring-superset.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index 75e80379ffd3e..14d5217df5298 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -72,7 +72,7 @@ WTF_CSRF_EXEMPT_LIST = [‘’] ### Using a production metadata database By default Superset is configured to use SQLite, it's a simple and fast way to get you started -(no installation needed) but for production environments you should use a different database engine on +(no installation needed). But for production environments you should use a different database engine on a separate host or container. Superset supports the following database engines/versions: From 5a657d4e8377ca7c5e081f44c5c0e3d5040034f7 Mon Sep 17 00:00:00 2001 From: Daniel Vaz Gaspar Date: Thu, 21 Apr 2022 08:50:45 +0100 Subject: [PATCH 6/8] Update docs/docs/installation/configuring-superset.mdx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- docs/docs/installation/configuring-superset.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index 14d5217df5298..4110da2ac3361 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -79,8 +79,8 @@ Superset supports the following database engines/versions: | Database Engine | Supported Versions | | --------------------------------------------------------- | --------------------------------- | -| [MySQL](https://www.mysql.com/) | 5.X | | [PostgreSQL](https://www.postgresql.org/) | 10.X, 11.X, 12.X, 13.X, 14.X | +| [MySQL](https://www.mysql.com/) | 5.X | Use the following database drivers and connection strings: From bcde872c2541c764a3577bc9b98d73107ebf2beb Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Thu, 21 Apr 2022 08:52:49 +0100 Subject: [PATCH 7/8] improve docs --- docs/docs/installation/configuring-superset.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index 4110da2ac3361..d3425cb17327d 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -69,7 +69,7 @@ you can add the endpoints to `WTF_CSRF_EXEMPT_LIST`: WTF_CSRF_EXEMPT_LIST = [‘’] ``` -### Using a production metadata database +### Using a production metastore By default Superset is configured to use SQLite, it's a simple and fast way to get you started (no installation needed). But for production environments you should use a different database engine on @@ -87,8 +87,8 @@ Use the following database drivers and connection strings: | Database | PyPI package | Connection String | | -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------ | -| [MySQL](/docs/databases/mysql) | `pip install mysqlclient` | `mysql://:@/` | | [PostgreSQL](/docs/databases/postgres) | `pip install psycopg2` | `postgresql://:@/` | +| [MySQL](/docs/databases/mysql) | `pip install mysqlclient` | `mysql://:@/` | | SQLite | No additional library needed | `sqlite://` | To configure Superset metadata database set `SQLALCHEMY_DATABASE_URI` config key on `superset_config` From c65caa56ee0e03e71fcd4d4de1ceee2d82cb97ad Mon Sep 17 00:00:00 2001 From: Daniel Gaspar Date: Thu, 21 Apr 2022 08:55:07 +0100 Subject: [PATCH 8/8] improve docs --- docs/docs/installation/configuring-superset.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/docs/installation/configuring-superset.mdx b/docs/docs/installation/configuring-superset.mdx index d3425cb17327d..1384b62741cba 100644 --- a/docs/docs/installation/configuring-superset.mdx +++ b/docs/docs/installation/configuring-superset.mdx @@ -85,14 +85,14 @@ Superset supports the following database engines/versions: Use the following database drivers and connection strings: -| Database | PyPI package | Connection String | -| -------------------------------------- | --------------------------------- | ------------------------------------------------------------------------ | -| [PostgreSQL](/docs/databases/postgres) | `pip install psycopg2` | `postgresql://:@/` | -| [MySQL](/docs/databases/mysql) | `pip install mysqlclient` | `mysql://:@/` | -| SQLite | No additional library needed | `sqlite://` | - -To configure Superset metadata database set `SQLALCHEMY_DATABASE_URI` config key on `superset_config` -to the appropriate connection string: +| Database | PyPI package | Connection String | +| ----------------------------------------- | --------------------------------- | ------------------------------------------------------------------------ | +| [PostgreSQL](https://www.postgresql.org/) | `pip install psycopg2` | `postgresql://:@/` | +| [MySQL](https://www.mysql.com/) | `pip install mysqlclient` | `mysql://:@/` | +| SQLite | No additional library needed | `sqlite://` | + +To configure Superset metastore set `SQLALCHEMY_DATABASE_URI` config key on `superset_config` +to the appropriate connection string. ### Running on a WSGI HTTP Server