Preparing your Google Cloud account

BigAnimal requires you to check the readiness of your Google Cloud (GCP) account before you deploy your clusters. (You don't need to perform this check if you're using BigAnimal's cloud account as your deployment option.) The checks that you perform ensure that your Google Cloud account is prepared to meet your clusters' requirements and resource limits.

Note

Before proceeding, see Understanding requirements in Google Cloud for details on planning for your clusters' requirements and resource limits in Google Cloud.

Required roles

Ensure you have at least the following combined roles:

  • roles/iam.serviceAccountCreator
  • roles/iam.serviceAccountKeyAdmin
  • roles/iam.roleAdmin
  • roles/resourcemanager.projectIamAdmin
  • roles/compute.viewer

Alternatively, you can have an equivalent single role, such as:

  • roles/owner

Required APIs and services

Ensure the following Google Cloud APIs are enabled:

  • autoscaling.googleapis.com
  • cloudapis.googleapis.com
  • cloudresourcemanager.googleapis.com
  • compute.googleapis.com
  • container.googleapis.com
  • iam.googleapis.com
  • iamcredentials.googleapis.com
  • run.googleapis.com
  • secretmanager.googleapis.com
  • storage.googleapis.com
  • vpcaccess.googleapis.com

Check Google Cloud resource limits for running BigAnimal

EDB provides a shell script, called biganimal-csp-preflight, which checks whether requirements and resource limits are met in your Google Cloud account based on the clusters you plan to deploy.

  1. Open Google Cloud Shell in your browser.

  2. From Google Cloud Shell, run the following command:

    curl -sL https://raw.githubusercontent.com/EnterpriseDB/cloud-utilities/main/gcp/biganimal-csp-preflight | bash -s <GCP-project-ID> <region> [options]

    The required arguments are:

    ArgumentDescription
    <project-id>Google Cloud project ID of your BigAnimal deployment.
    <region>Google Cloud region where your clusters are being deployed. See Supported regions for a list of possible regions.

    Possible options are:

    OptionsDescription
    -h or --helpDisplays the command help.
    -i or --instance-typeGoogle Cloud instance type for the BigAnimal cluster. The help command provides a list of possible VM instance types. Choose the instance type that best suits your application and workload. Choose an instance type in the memory optimized M1, M2, or M3 series for large data sets. Choose from the compute-optimized C2 series for compute-bound applications. Choose from the general purpose E2, N2, and N2D series if you don't require memory or compute optimization.
    -x or --cluster-architectureDefines the Cluster architecture and can be single, ha, or eha. See Supported cluster types for more information.
    -e or --networkingType of network endpoint for the BigAnimal cluster, either public or private. See Cluster networking architecture for more information.
    -r or --activate-regionSpecifies region activation if no clusters currently exist in the region.
    --onboardChecks if the user and subscription are correctly configured.

    The behavior of the script defaults to --onboard if you provide no other options.

    For example, if you want to deploy a cluster in a Google Cloud account having an ID of 1234-5678-9012, with an instance type of n2-standard-8, in the us-east1 region, with a public endpoint, and with no existing cluster deployed, run the following command:

    curl -sL https://raw.githubusercontent.com/EnterpriseDB/cloud-utilities/main/gcp/biganimal-csp-preflight | bash -s \
    1234-5678-9012 \
    us-east1 \
    --instance-type n2-standard-8 \
    --networking public \
    --activate-region \
    --onboard\

The script displays the following output:

```
######################################################
Run GCP Preflight Checks with Google Cloud CLI 436.0.0

####################################
# Checking for enabled GCP APIs... #
####################################

NAME                                     RESULT
---------------------------------------  ---------
autoscaling.googleapis.com               Enabled
cloudapis.googleapis.com                 Enabled
cloudresourcemanager.googleapis.com      Enabled
compute.googleapis.com                   Enabled
container.googleapis.com                 Enabled
iam.googleapis.com                       Enabled
iamcredentials.googleapis.com            Enabled
run.googleapis.com                       Enabled
secretmanager.googleapis.com             Enabled
storage.googleapis.com                   Enabled
vpcaccess.googleapis.com                 Enabled

##############################################
Checking Service Quotas Limits on us-east1...
##############################################

Resource              Quota Name                            Limit    Used     Required    Gap      Suggestion
--------              ----------                            ----     -----    --------    ---      ----------
n2-standard-2 vCPUs   N2_CPUS                               500      0        6           494      OK
e2-standard-8 vCPUs   E2_CPUS                               2400     0        24          2376     OK
Shared-Core vCPUs     CPUS                                  2400     0        2           2398     OK
Static IP Addresses   STATIC_ADDRESSES                      700      0        1           699      OK
VPCs                  NETWORKS                              50       14       1           35       OK
Cloud Routers         ROUTERS                               20       6        1           13       OK

#######################
# Overall Suggestions #
#######################
```

Make sure the GCP Project ID <project_id> is the one that you want to use for BigAnimal.
Make sure the GCP account <gcp_account> has rights to create custom roles, service accounts, keys, and assign project grants.

Use the Quotas page in the Google Cloud console if you need to raise any service quota limits.
See https://cloud.google.com/docs/quota_detail/view_manage#requesting_higher_quota for more information.

Configure your Google Cloud account

If any APIs are listed as not enabled, see Enabling and Disabling Services in the Google Cloud documentation to enable the required APIs.

If you need to increase your quotas, see Request a higher quota limit.