Skip to main content

Privacera Documentation

Set up Varada connector in Trino with Privacera Plugin on Privacera Platform

Installation
  1. Create EC2 instance. See Varada requirements documentation to learn more.

  2. SSH into EC2 instance and switch to root user.

    sudo su - root
  3. Install Java 11.

       sudo amazon-linux-extras install java-openjdk11
  4. Install trino-server.

    cd /opt   
    
    mkdir -p /opt/trino   
    mkdir -p /opt/trino/data   
    
    cd /opt/trino/   
    
    wget https://repo1.maven.org/maven2/io/trino/trino-server/370/trino-server-370.tar.gz   
    tar -xzf trino-server-370.tar.gz   
    ln -s trino-server-370  trino-server   
    
    wget https://repo1.maven.org/maven2/io/trino/trino-cli/370/trino-cli-370-executable.jar   
    chmod +x trino-cli-370-executable.jar   
    ln -s trino-cli-370-executable.jar trino-cli
  5. Create the necessary configuration files in the /opt/trino/trino-server/etc directory. See the Trino documentation to learn more.

  6. Start trino-server.

     cd /opt/trino/trino-server   
    ./bin/launcher restart
  7. Connect trino-cli to verify trino service.

    ./trino-cli --catalog hive 
    select * from customer.customer_data;
  8. Install Privacera Plugin.

Deploy Varada Connector

To learn more see: Varada Trino Connector: Community Edition Setup

  1. Download varada-trino connector, create the varada-install directory and unpack the tarball.

       mkdir /tmp/varada-install   
    tar -zxf /tmp/varada-trino-connector.tar.gz -C /tmp/varada-install
  2. Then install.

    sudo python3 /tmp/varada-install/varada-connector-*-varada-con/varada/installer.py -e /tmp/varada-install/varada-connector-*-varada-con/ -o hive -c varada -w r5d.4xlarge -m s3://privacera-dev-siva -p /opt/trino/trino-server/plugin/ -d /opt/trino/trino-server/etc/ -b 8088 -u my-cluster 
  3. Create workerDB directory.

    mkdir -p /var/lib/presto/varada/workerDB/
  4. Restart the trino-server.

    cd /opt/trino/trino-server   
    ./bin/launcher restart
  5. You can now test Privacera access control through trino-cli. To test the varada catalog you will need to add policies in privacera_trino.