CDKTF (Deprecated)
Prerequisites¶
- You need either of the following installed:
- Install via docker:
- Docker installed on your laptop
- Install Locally (optional):
- Python >= 3.8
- Install nodejs == 18.14.0
- Install terraform 1.3.1
- Install cerberus-python-client
- Configure your github integration to your repos using SSH.
- Configure the databricks cli cfg file.
pip install databricks-cli
and thendatabricks configure -t
which will configure the databricks cli with a token.
Install Via Docker¶
We recommend to use docker container for development purposes as it's easier to have version upgrades by changing the docker version.
-
Add the following alias to your profile or zsh_profile:
-
Please change your directory to the root of your project. Then run the
bfs
command. -
This will launch the bash shell inside the container. It will do the following:
- Mount your current working directory as read-write to the working directory in the container.
- Mount your
~/.ssh
directory as read-only to the~/.ssh
in the container. - Mount your
~/.databrickscfg
file as read-only to the~/.databrickscfg
in the container.
-
You will also need to install any required packages of your respective project inside the docker container.
Upgrade the brickflow container¶
-
If the brickflow version in your container is outdated and needed to upgrade then run the below command in your shell which pull the latest docker image
Install locally (optional if you choose not to use docker)¶
Alternatively instead of docker you can install locally but you will need to resolve all the deps.
The project relies on terraform and cdktf to deploy your python projects.
- Install brew if not installed already using - brew-install
- Install node using
brew install node
- Install cdktf-cli via
npm install -g cdktf-cli
- Install the brickflow package via
pip install brickflows
Setup Project¶
-
The first step is to initialize the project. It will do the following:
- Create the entrypoint.py file in your workflows module.
- Update your .gitignore file with the correct directories to ignore.
-
To initialize the project inside the bfs shell run:
-
It will prompt you for the:
- Project Name
- Git https url of your project
- Workflows Directory Path
- Brickflow Version
- Spark Expectations Version