These examples show Azure as the cloud provider unless indicated otherwise. The functionality is the same when using AWS.
Create a cluster in interactive mode
The default mode for the create-cluster command 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 there are any missing required flags, the CLI exits with an error.
You are prompted to confirm you want to create the cluster. After the cluster creation process is completed, it generates a cluster ID.
Check your cluster was created successfully using the show-clusters command shown in the return message:
Create a cluster using a configuration file
You can use the --clusterConfigFile command to create one or more clusters with the same configuration in a noninteractive mode.
Here is 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 query an enumeration of valid values for above BigAnimal and cloud service provider related properties, CLI provides you a series of subcommands, for example: you can use show-cluster-architecture to list all available cloud architecture to your current login account.
Note
"Extreme High Availability" architecture is not enabled by default, to get access to this offering, contact your sales representative or Support.
For more information
Tip
You can turn off the confirmation step with the biganimal disable-confirm command.
Get cluster connection information
To use your BigAnimal cluster, you first need to get your cluster's connection information. To get your cluster's connection information, use the show-cluster-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
Instance type of cluster
Instance volume properties
Networking
Allowed IP list
Postgres database configuration
Retention period
Read-only workloads
IAM authentication
For example, to set the public allowed IP range list, use the --cidr-blocks flag:
To check whether the setting took effect, use the show-clusters command and view the detailed cluster information output in JSON format. For example,
Update the Postgres configuration of a cluster
To update the Postgres configuration of a BigAnimal cluster directly from the CLI:
To specify multiple configurations, you can use multiple --pg-config flags or include multiple configuration settings as a key-value array string separated by commas in one --pg-config flag. If a Postgres setting contains a comma, you need to specify it with a separate --pg-config flag.
Note
You can update "Cluster Architecture" with the --cluster-architecture flag. The only supported scenario is to update a “Single Node” cluster to a “High Availability” cluster.
Delete a cluster
To delete a cluster you no longer need, use the delete-cluster command. For example:
You can list all deleted clusters with the show-deleted-clusters command and restore them from their history backups as needed.
Restore a cluster
Biganimal continuously backs up your PostgrSQL clusters. Using CLI you can restore a cluster from its backup to any point in time as long as the backups are retained in the backup storage. The restored cluster can be a in another region and with different configurations, you can specify new configurations in restore command. For example:
The password for the restored cluster is a mandatory. The other parameters, if not specified, inherit the source database's settings. In interactive mode, the source database's settings appear as the default input, or appear as the first option in a selection list.
To restore a deleted cluster, use --from-deleted flag in the command.
Note
You can restore a cluster in a "Single" cluster to a "High Availability" cluster and vice versa. You can only restore an "Extreme High Availability" cluster to a cluster in using the same architecture.