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.
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.
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 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's a sample configuration file in YAML format with Azure specified as the provider:
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 the BigAnimal and cloud service provider-related properties, CLI provides a series of subcommands. For example, you can use show-cluster-architecture to list all cloud architectures available to your current login account:
Extreme-high-availability architecture isn't enabled by default. To get access, contact your sales representative or Support.
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:
You can query the complete connection information with other output formats, like JSON or YAML. For example:
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:
Password of administrator account
Instance type of cluster
Instance volume properties
Allowed IP list
Postgres database configuration
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.
You can update the 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 using 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 the 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 in another region and with different configurations. You can specify new configurations in the restore-cluster command. For example:
The password for the restored cluster is 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 the --from-deleted flag in the command.
You can restore a cluster in a single cluster to a high-availability cluster and vice versa. You can restore an extreme-high-availability cluster only to a cluster using the same architecture.