Cluster-scoped init scripts are init scripts defined in a cluster configuration. Cluster-scoped init scripts apply to both clusters you create and those created to run jobs.
You can configure cluster-scoped init scripts using the UI, the CLI, and by invoking the Clusters API. This section focuses on performing these tasks using the UI. For the other methods, see the Databricks CLI and the Clusters API.
You can add any number of scripts, and the scripts are executed sequentially in the order provided.
If a cluster-scoped init script returns a non-zero exit code, the cluster launch fails. You can troubleshoot cluster-scoped init scripts by configuring cluster log delivery and examining the init script log. See Init script logging.
Configure a cluster-scoped init script using the UIâThis section contains instructions for configuring a cluster to run an init script using the Databricks UI.
Databricks recommends managing all init scripts as cluster-scoped init scripts. If you are using compute with standard or dedicated access mode (formerly shared and single user access modes), store init scripts in Unity Catalog volumes. If you are using compute with no-isolation shared access mode, use workspace files for init scripts.
For standard access mode, you must add init scripts to the allowlist
. See Allowlist libraries and init scripts on compute with standard access mode (formerly shared access mode).
To use the UI to configure a cluster to run an init script, complete the following steps:
/Workspace/<path-to-script>/<script-name>.sh
/Volumes/<catalog>/<schema>/<volume>/<path-to-script>/<script-name>.sh
s3://bucket-name/path/to/init-script
In dedicated access mode, the identity of the assigned principal (a user or service principal) is used.
In standard access mode, the identity of the cluster owner is used.
note
No-isolation shared access mode does not support volumes, but uses the same identity assignment as standard access mode.
To remove a script from the cluster configuration, click the trash icon at the right of the script. When you confirm the delete you will be prompted to restart the cluster. Optionally you can delete the script file from the location you uploaded it to.
note
If you configure an init script using the S3 source type, you must configure access credentials.
Databricks recommends using instance profiles to manage access to init scripts stored in S3. Use the following documentation in the cross-reference link to complete this setup:
warning
Cluster-scoped init scripts on DBFS are end-of-life. The DBFS option in the UI exists in some workspaces to support legacy workloads and is not recommended. All init scripts stored in DBFS should be migrated. For migration instructions, see Migrate init scripts from DBFS.
Configure S3 regionâYou must specify the S3 region for the bucket containing the init script if the bucket is in a different region than your workspace. Select auto
only if your bucket and workspace share a region.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4