Repository navigation
Expand file tree
/
Copy pathdatabricks.yml
More file actions
82 lines (78 loc) · 3.27 KB
/
Copy pathdatabricks.yml
File metadata and controls
82 lines (78 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# This is a Databricks asset bundle definition for tokedab_cicd_project.
# See https://docs.databricks.com/dev-tools/bundles/index.html for documentation.
bundle:
name: tokedab_cicd_project
uuid: 284fa2f4-ca92-4531-b6be-a63bb1d84599
include:
- resources/*.yml
# dev / test / prod share one serverless workspace (provisioned by infra/) and
# are separated by catalog (citibike_<target>) and bundle root path. test/prod
# live under the deployer's home folder, so always deploy them as the same identity.
workspace:
host: https://adb-7405614049452326.6.azuredatabricks.net
# Variable declarations. These variables are assigned in the dev/test/prod targets below.
variables:
source_volume_path:
description: UC Volume path Auto Loader watches for new Citibike archives
runner_sp:
description: >-
Service principal that test/prod jobs run as. It owns the tables in its
catalog (infra/databricks grants it ALL_PRIVILEGES), so runs don't depend
on who deployed.
default: ""
targets:
dev:
# The default target uses 'mode: development' to create a development copy.
# - Deployed resources get prefixed with '[dev my_user_name]'
# - Any job schedules and triggers are paused by default.
# See also https://docs.databricks.com/dev-tools/bundles/deployment-modes.html.
mode: development
default: true
variables:
source_volume_path: /Volumes/citibike_dev/00_landing/source_data/citibike_trips/
presets:
artifacts_dynamic_version: true
test:
mode: production
presets:
name_prefix: '[test] '
workspace:
# Deployer's home folder: writable only by them (and admins).
root_path: /Workspace/Users/${workspace.current_user.userName}/.bundle/${bundle.name}/${bundle.target}
variables:
source_volume_path: /Volumes/citibike_test/00_landing/source_data/citibike_trips/
runner_sp:
lookup:
service_principal: citibike-test-deployer
run_as:
service_principal_name: ${var.runner_sp}
permissions:
# Grant CAN_MANAGE to whoever deploys (a person locally, or the CI service
# principal) — avoids hardcoding a personal identity in a public repo.
- user_name: ${workspace.current_user.userName}
level: CAN_MANAGE
# The run_as SP must read the notebooks in the deployer's home folder.
- service_principal_name: ${var.runner_sp}
level: CAN_VIEW
prod:
mode: production
presets:
name_prefix: '[prod] '
workspace:
# Deployer's home folder: writable only by them (and admins).
root_path: /Workspace/Users/${workspace.current_user.userName}/.bundle/${bundle.name}/${bundle.target}
variables:
source_volume_path: /Volumes/citibike_prod/00_landing/source_data/citibike_trips/
runner_sp:
lookup:
service_principal: citibike-prod-deployer
run_as:
service_principal_name: ${var.runner_sp}
permissions:
# Grant CAN_MANAGE to whoever deploys (a person locally, or the CI service
# principal) — avoids hardcoding a personal identity in a public repo.
- user_name: ${workspace.current_user.userName}
level: CAN_MANAGE
# The run_as SP must read the notebooks in the deployer's home folder.
- service_principal_name: ${var.runner_sp}
level: CAN_VIEW