These examples show Azure as the cloud provider unless indicated otherwise.
Although the functionality is the same when using AWS or Google Cloud, there may be additional input flags based on the cloud provider type. Use the -h or --help flags for more information on the CLI commands.
Managing single-node and primary/standby high-availability clusters
Use the cluster commands to create, retrieve information on, and manage single-node and primary/standby high-availability clusters.
Create a cluster in interactive mode
The default mode for the cluster create and pgd create commands is an interactive mode that guides you through the required cluster configuration by providing you with the valid values.
Tip
You can turn off prompting using the biganimal config set interactive_mode off command. With prompting disabled, if any required flags are missing, the CLI exits with an error.
For example, to create a primary/standby high-availability cluster:
You're prompted to confirm that you want to create the cluster. After the cluster creation process is complete, it generates a cluster ID.
Check your cluster was created successfully using the cluster show command shown in the return message:
Create a cluster using a configuration file
You can use the create --config-file command to create one or more clusters with the same configuration in a noninteractive mode.
Here's a sample configuration file in YAML format with Azure specified as the provider:
Note
For backward compatibility, allowIpRangeMap and pgConfigMap properties also support embedded JSON format.
To create the cluster using the sample configuration file config_file.yaml:
To enable you to view valid values to use in the configuration file for Cloud Service and cloud service provider-related properties, the CLI provides a series of cluster subcommands. For example, you can use cluster show-architectures to list all Cloud Service database architectures available in your cloud service provider account:
Tip
You can turn off the confirmation step with the biganimal disable-confirm command.
Get cluster connection information
To use your Cloud Service cluster, you first need to get your cluster's connection information. To get your cluster's connection information, use the cluster show-connection command:
Tip
You can query the complete connection information with other output formats, like JSON or YAML. For example:
Update cluster
After the cluster is created, you can update attributes of the cluster, including both the cluster’s profile and its deployment architecture. You can update the following attributes:
Cluster name
Password of administrator account
Cluster architecture
Number of standby replicas
Instance type of cluster
Instance volume properties
Networking
Allowed IP list
Postgres database configuration
Volume properties, size, IOPS
Retention period
Read-only workloads
IAM authentication
Cloud service provider subscription IDs
Service account IDs
For example, to set the public allowed IP range list, use the --cidr-blocks flag:
To check whether the setting took effect, use the cluster show command, and view the detailed cluster information output in JSON format. For example: