aws-quickstart/quickstart-apache-superset

Help to extend the base image

pgurumukhi opened this issue · 5 comments

Hi there,
First of all Thanks for proving the cloudformation template. It worked for me on an existing VPC and I was able to play with it easily.
Now I want to explore some more features and hence seek guidance. Feature that I want to use are:

  • Upgrade superset version to the latest minor version.
  • Want to query Snowflake database which we are using for reporting purpose.
  • Want to try the alerts (https://superset.apache.org/docs/installation/alerts-reports/), and so want to setup additional configuration for SMTP, modify configurations like superset_config.py, and install required packages like Chrome headless browser

Would it be possible for you to share some tips/samples for this?

  • Upgrade superset version to the latest minor version.
    v1.4.1 is already merged in official solution, may i know what specific feature your required in minor version? currently we do a quarter upstrean sync.

  • Want to query Snowflake database which we are using for reporting purpose.
    we will consider to add Snowflake driver into next release, or you can pull the base image and pack driver needed and replace cloudformation image url with new ones.

  • Want to try the alerts (https://superset.apache.org/docs/installation/alerts-reports/), and so want to setup additional configuration for SMTP, modify configurations like superset_config.py, and install required packages like Chrome headless browser
    similar with previous one, you may pull the base image and pack your own files like superset_config.py to overwrite

Thanks. I really like the one click setup. but to use it to its full power I really need to extend the base image to install additional drivers, extend query timeout, setup SMTP, other channels for alerts, etc....

Regarding extending the superset from base image, can you tell me in what path is superset running inside the image? Where would the files like superset_config.py lie so that I can overwrite the file?

Is there an example that I can use to extend the image?
I may be wrong, but I think that if I need to override the superset_config.py then I should know the contents of what has been set in the superset_config.py. If so, where would I find the config setup in superset_config.py?

I think I was able to do a customization using below Dockerfile. Is this correct way?

ARG SS_VERSION="v1.4.1"
FROM public.ecr.aws/p9r6s5p7/superset:${SS_VERSION}
USER root
# install anything required
RUN pip install snowflake-sqlalchemy==1.2.4
# We add the superset_config.py file to the container
COPY superset_config.py /app/
# We tell Superset where to find it
ENV SUPERSET_CONFIG_PATH /app/superset_config.py

Although what happened is that my previous dashboards, datasets everything got wiped out when I applied this change in Cloudformation :-( I should possibly set a persistence store as part of initial setup I think now.

@pgurumukhi your docker file layout looks correct. And yes you need to set persistence for your data if your plan on doing stack updates.

Yes, I was able to install the Snowflake connector and connect with Snowflake in Superset, and also was able to setup persistent mysql store for storing all of the metadata. I think I am good, and will close this ticket.

I would be happy to contribute to the documentation with an example for first time users. Let me know if you think its a good idea. Thanks again for all your help.