Deploying Polaris on Google Cloud Platform (GCP)
Build and launch Polaris using the GCP Startup Script at the location provided in the command below. This script will start a Cloud SQL for PostgreSQL instance, which will be used as the backend Postgres instance holding all Polaris data. Additionally, Polaris will be bootstrapped to use this database and Docker containers will be spun up for Spark SQL and Trino.
The requirements to run the script below are:
- Install the
gcloudCLI, if it is not already installed on the GCP VM. Instructions to download thegcloudCLI can be found here. - Ensure the
Cloud SQL Admin APIhas been enabled in your project and that your VM’s Principal has access to the correct role:roles/cloudsql.admin. - Ensure the VM’s Principal has access to at least Read-only scope on Compute Engine:
compute.readonly.
export ASSETS_PATH=$(pwd)/getting-started/assets/
export CLIENT_ID=root
export CLIENT_SECRET=s3cr3t
export POSTGRES_PASSWORD=your_secure_password # Optional: If not set, a random password will be generated
./getting-started/assets/cloud_providers/deploy-gcp.sh
Environment Variables🔗
The deployment script accepts the following environment variables:
ASSETS_PATH(required): Path to the getting-started assets directoryCLIENT_ID(required): Client ID for Polaris authenticationCLIENT_SECRET(required): Client secret for Polaris authenticationPOSTGRES_PASSWORD(optional): Password for the PostgreSQL database- If not provided, a random 16-character password will be automatically generated and will be displayed in the script output
- Cannot be set to
postgresfor security reasons
Next Steps🔗
Congrats, you now have a running instance of Polaris! For further information regarding how to use Polaris, check out the Creating a Catalog and Using Polaris pages.
Cleanup Instructions🔗
To shut down the Polaris server, run the following commands:
export ASSETS_PATH=$(pwd)/getting-started/assets/
docker compose -p polaris -f getting-started/jdbc/docker-compose.yml down
To deploy Polaris in a production setting, please review further recommendations at the Configuring Polaris for Production page.