-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable ssh tunneling using env variables for superset #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @njuguna-n, thank you for these changes.
Please add steps on the README file to explain setting up SSH tunneling.
I also left some comments inline.
superset/superset_config.py
Outdated
} | ||
|
||
ENABLE_PROXY_FIX = True | ||
SECRET_KEY = "YOUR_OWN_RANDOM_GENERATED_STRING" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there another way to set this secret key? Maybe to also use an environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that should also be set with an env variable. I will make the change.
@@ -26,3 +26,4 @@ COUCHDB_SECURE=false | |||
# superset: required environment variables for 'gamma', 'prod' and 'local' | |||
SUPERSET_PASSWORD=password | |||
[email protected] | |||
SUPERSET_SSH_TUNNELING=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SUPERSET_SSH_TUNNELING=false | |
SUPERSET_SSH_TUNNELING=False |
With this setting: SUPERSET_SSH_TUNNELING=false
in my .env file DBT container exits with errors.
It works when I change this line to SUPERSET_SSH_TUNNELING=False
Please add this detail to the README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that. I will make the update.
Hey all! Amazing timing on this PR! I was just working on another superset deployment, and didn't know that there was built in support for SSH tunnels. Thank you for the hard work and PR here <3 What about more standard docker compose based deployment of Superset? There might be some history I'm missing which could make me appreciate why we're chose to use a bespoke compose solution for CHT Sync's Superset. I'm for sure coming into this late in the game, so there may be some real good reasons we're here! For example, I notice our compose file is limited as compared to the Superset's production one (aka I'm concerned about the lack of a caching layer, like Redis, which Superset's production deployments include. When I worked on the Covid MoH Mali Superset dashboard, there was a point when we realized the system was so slow because there was no cache - likely it was falling back to filesystem cache or, worse, no cache (I failed to find Superset's default 🤷 ). |
Oh - I do see that production install flow is "quick, login with |
@mrjones-plip I was created a ticket today specifically to handle how we set up superset especially for production so your comment has come at a handy time as well 😄. The initial idea of adding the superset image the way we did was to limit the number of Docker containers required to get cht-sync up and running, we already have 8 containers that are used in the dev environment. This approach definitely needs to change for production as you rightly pointed out |
oh - that totally makes sense @njuguna-n to have a simplified dev environment - thanks! I suspect we can follow Superset's lead and have dev and prod compose files an environment files. Lemme know if you need a hand. Also - I just tested with vanilla superset.tunnel.mp4 |
Is the SHH Tunnel option still there if you click on the |
Yes, it makes sense to follow do that. Do you think we still need a cache for superset on the dev instance? |
No - should be fine with without. KISS for dev , most def!
Hmm - maybe? I don't know how that feature works, but here's what I see: alchemy.mp4 |
There should be a toggle right above the Screen.Recording.2023-12-06.at.03.09.03.mov |
@njuguna-n - we got the tunnel working, but for sure had to use the Still no testing of the |
@mrjones-plip I pushed a commit to change how the superset container is created. Please have a look. |
@njuguna-n - wow! Some really nice work here at improving CHT Sync to not build custom images, use version pinned upstream images of all the important services and use docker compose inheritance to chain together multiple configs. Excellent! I trust the teams testing on this, so I haven't dived into running the code, but I did notice one possible error here in the readme in prod where you have an optional step 2 of :
Two changes I think are needed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update the e2e test to successfully connect to the superset instance?
Closing this PR since we have decided not to include Superset in this repo for now. More context on this in slack. |
#56
Enable SSH tunneling for superset