What's the recommended way to use secrets within Global init scripts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2021 10:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 02:54 AM
The order of execution of init scripts is:
- Legacy global (deprecated)
- Cluster-named (deprecated)
- Global (new)
- Cluster-scoped
Arfrenece link that can help is - https://docs.databricks.com/clusters/init-scripts.html#global-init-scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2021 10:32 AM
You could specify a secret path in an environment at the cluster level
SPARKPASSWORD=<path-value>and this would be available in global init scripts / cluster-scoped init script
if [[ $SPARKPASSWORD ]]; then
use $SPARKPASSWORD
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2022 07:57 AM
I also have this question, and I don't understand the answer from @Sajith Appukuttan . This solution would require configuring each new cluster separately with the correct environment variable, correct? That seems like it defeats the purpose of using a global init script. Is there a method that does not require configuration of each new cluster separately?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024 07:23 AM
Hello everyone,
How did you solve this issue? Did you manage to get the secrets through global init script?
Thanks.