Get started with Aiven for AlloyDB Omni
Start using Aiven for AlloyDB Omni by setting up a service and connecting to your new default database with a programming language of your choice.
Prerequisites
- Console
- CLI
- Terraform
- Kubernetes
- Access to the Aiven Console
- psql command line tool installed
- Terraform installed
- A personal token
- psql command line tool installed
- Aiven Operator for Kubernetes® installed
- Admin access to a Kubernetes cluster where you can run the operator
- A personal token
- A Kubernetes Secret
Create an Aiven for AlloyDB Omni service
- Console
- CLI
- Terraform
- Kubernetes
-
From your project, in the Services page, click Create service.
-
From the Select service page, click AlloyDB Omni.
-
Select the cloud provider and region to host your service on.
noteThe pricing for the same service can vary between different providers and regions. The service summary shows you the pricing for your selected options.
-
Select a service plan.
noteThis determines the number of servers and the memory, CPU, and disk resources allocated to your service. See Plans & Pricing.
-
Optional: Add disk storage.
-
Enter a name for your service.
importantYou cannot change the name after you create the service.
You can fork the service with a new name instead.
-
Optional: Add tags.
-
Click Create service.
The Overview page of the service opens. It shows the connection parameters for your service, its current status, and the configuration options.
The status of the service is Rebuilding during its creation. When the status becomes Running, you can start using the service. This typically takes couple of minutes and can vary between cloud providers and regions.
-
Determine the service specifications, including plan, cloud provider, region, and project name.
-
Run the following command to create an Aiven for AlloyDB Omni service named
demo-alloydbomni
:avn service create demo-alloydbomni \
--service-type alloydbomni \
--cloud CLOUD_AND_REGION \
--plan PLAN \
--project PROJECT_NAMEParameters:
avn service create demo-alloydbomni
: Command to create new Aiven service nameddemo-alloydbomni
.--service-type alloydbomni
: Specifies the service type as Aiven for AlloyDB Omni.--cloud CLOUD_AND_REGION
: Specifies the cloud provider and region for deployment.--plan PLAN
: Specifies the service plan or tier.--project PROJECT_NAME
: Specifies the project where the service will be created.
To see:
- A full list of default flags, run
avn service create -h
- Type-specific options, run
avn service types -v
The following example files are also available in the Aiven Terraform Provider repository on GitHub.
-
Create a file named
provider.tf
and add the following:Loading...
-
Create a file named
service.tf
and add the following:Loading...
-
To output connection details, create a file named
output.tf
and add the following:Loading...
-
Create a file named
variables.tf
and add the following:Loading...
-
Create the
terraform.tfvars
file and add the values for your token and project name.
To apply your Terraform configuration:
-
Initialize Terraform by running:
terraform init
The output is similar to the following:
Initializing the backend...
Initializing provider plugins...
- Finding aiven/aiven versions matching ">= 4.0.0, < 5.0.0"...
- Installing aiven/aiven v4.9.2...
- Installed aiven/aiven v4.9.2
...
Terraform has been successfully initialized!
... -
To create an execution plan and preview the changes, run:
terraform plan
-
To deploy your changes, run:
terraform apply --auto-approve
Use the AlloyDBOmni resource.
Configure the service
You can change your service settings by updating the service configuration.
See configuration options in Advanced parameters for Aiven for AlloyDB Omni.
- Console
- CLI
- Terraform
- Kubernetes
- Select the new service from the list of services on the Services page.
- On the Overview page, select Service settings from the sidebar.
- In the Advanced configuration section, make changes to the service configuration.
Use the avn service update command to change basic service settings, such as service version, IP filtering, cloud region, termination protection, or service plan.
Use other avn service commands for advanced settings and operations on your service.
See
the aiven_alloydbomni
resource documentation
for the full schema.
Update your AlloyDBOmni resource.
Connect to the service
- Console
- CLI
- Terraform
- Log in to the Aiven Console, and go to your organization > project > Aiven for AlloyDB Omni service.
- On the Overview page of your service, click Quick connect.
- In the Connect window, select a tool or language to connect to your service, follow the connection instructions, and click Done.
Connect to your new service with psql CLI tool.
Access your service with the psql client
using the alloydb_service_uri
Terraform output.
psql "$(terraform output -raw alloydb_service_uri)"
Discover more tools for connecting to Aiven for AlloyDB Omni in Connect to Aiven for AlloyDB Omni.
Connect a Google service account
Upload your Google service account key to the Aiven for AlloyDB Omni service so that you can use generative AI capabilities to build applications.
Build AI applications
Access and use AI models to build generative AI applications using AlloyDB AI.