- Create python virtual environment and activate it
python3 -m venv .venv source .venv/bin/activate - Install python packages in venv
python -m pip instal -r requirements.txt
-
Clone OSS Unity catalog github repository
git@github.com:unitycatalog/unitycatalog.git cd unitycatalog -
Follow the guide linked below to configure external identity provider - https://docs.unitycatalog.io/server/auth/#configure-your-external-identity-provider
-
[Optional] To enable UC server to vend AWS temporary credentials to access S3 buckets (for accessing External tables/volumes),enable set the parameters in etc/conf/server.properties as specified in https://docs.unitycatalog.io/server/configuration/#configuration
-
Start UC server
bin/start-uc-server -
Follow the guide below to configure authentication in Unity UI - https://docs.unitycatalog.io/server/auth/#configure-and-restart-the-unity-catalog-ui
-
Start UC UI(accessible at http://localhost:3000/)
yarn install yarn start -
Add user(present in external ID provider) account to the local database
bin/uc --auth_token $(cat etc/conf/token.txt) user create --name "<username>" --email <user-email-id> -
Grant necessary permissions to the user:
Catalog
bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type catalog --name unity --principal <user-emil-id> --privilege "USE CATALOG" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type catalog --name unity --principal <user-emil-id> --privilege "CREATE SCHEMA"Schema
bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type schema --name unity.devconf_demo --principal <user-emil-id> --privilege "USE SCHEMA" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type schema --name unity.devconf_demo --principal <user-emil-id> --privilege "CREATE TABLE" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type schema --name unity.devconf_demo --principal <user-emil-id> --privilege "CREATE VOLUME" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type schema --name unity.devconf_demo --principal <user-emil-id> --privilege "CREATE MODEL" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type schema --name unity.devconf_demo --principal <user-emil-id> --privilege "CREATE FUNCTION"Function
bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type function --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "EXECUTE" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type function --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "SELECT" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type function --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "MODIFY" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type function --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "MODIFY"Model
bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type registered_model --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "SELECT" bin/uc --auth_token $(cat etc/conf/token.txt) permission create --securable_type registered_model --name unity.devconf_demo.predict_diabetes_possibility --principal <user-emil-id> --privilege "MODIFY" -
Login with user account and save access token
bin/uc auth login --output jsonPretty -
Copy and rename
sample-config.pytoconfig.py. Use value foraccess_tokenrecieved in step 9 to replace value for 'agent' key in config.py
python register-model.py
python create-function.py
python master.py