- 3 Minutes to read
- DarkLight
AlloyDB
- 3 Minutes to read
- DarkLight
AlloyDB is a fully managed, PostgreSQL-compatible database service that's designed for your most demanding workloads, including hybrid transactional and analytical processing. AlloyDB pairs a Google-built database engine with a cloud-based, multi-node architecture to deliver enterprise-grade performance, reliability, and availability.
Prerequisites
- You have configured an AlloyDB instance.
- You have configured your AlloyDB Auth Proxy.
- You have configured a VPC firewall to allow incomming connections from Dataddo IPs to AlloyDB Auth Proxy instance on port 5432.
Authorize Connection to AlloyDB
In AlloyDB
Create an AlloyDB Instance
- In your Google Cloud Console, look for AlloyDB and click on Create Cluster.
- Configure the Availability of the of the cluster, Location and Password for the default user.
- Under the Networking section, select the default network, and click on Set up connection. Use Automatically alocated IP range and finish setting up the connection.
- Click on Create Cluster to obtain a Private IP address.
Create an Instance for AlloyDB Auth Proxy
AlloyDB requires an auth proxy to make authorized, encrypted connections to an instance. You can follow GCP's instructions, to create your auth proxy and generate a connection string to use with Dataddo. However, we'll also continue below with a Dataddo-specific implementation.
- In your Google Cloud Console, go to the VM instances page and click on Create instance.
- Provide the name of the instance and set full access to all Cloud APIs. In the Network interfaces section, configure the VPC network configured for private services access to your AlloyDB instance.
Install AlloyDB Auth Proxy on the Instance
Connect to the instance you created in the previous step and download the auth proxy as per GCP instructions.
Start the instance by running the command below.
./alloydb-auth-proxy "projects/<project-id>/locations/<region>/clusters/<alloydb-cluster-id>/instances/<alloydb-instance-id>" --address "0.0.0.0"
Configure Network
- In the Google Cloud Console, go to the VPC Network and click on Create Firewall Rule.
- Add all Dataddo IPs using CIDR notation (e.g. 52.17.68.150/32) and set the port to default of 5432.
- Click on Create to finalize the process.
In Dataddo
- In the Authorizers tab, click on Authorize New Service and select AlloyDB.
- You will be asked to fill the following fields:
- Server IP or Hostname: Public IP or hostname of your AlloyDB auth proxy instance.
- Database: Name of the database you will use for writing or reading the data. The default value is postgres.
- Username: AlloyDB username for accessing the database. The default value is postgres.
- Password: AlloyDB password to creating AlloyDB instance.
- Port: Port to connect to AlloyDB. The default value is 5432.
- TLS/SSL Settings: Keep the PREFER value, this will ensure the SSL connection when available. If you want to enforce SSL without a fallback to unencrypted connection, use REQUIRED.
- [Optional] Configure the connection via SSH tunnel. To do so, please follow these steps
- Click on Save.
Create a New AlloyDB Destination
- On the Destinations page, click on the Create Destination button and select the destination from the list.
- Select your authorizer from the drop-down menu.
- Name your destination and click on Save.
Click on Add new Account in drop-down menu during authorizer selection and follow the on-screen prompts. You can also go to the Authorizers tab and click on Add New Service.
Create a Flow to AlloyDB
- Navigate to Flows and click on Create Flow.
- Click on Connect Your Data to add your source(s).
- Click on Connect Your Data Destination to add the destination.
- Choose the write mode and fill in the other required information.
- Check the Data Preview to see if your configuration is correct.
- Name your flow and click on Create Flow to finish the setup.