This release of VMWare Tanzu Greenplum for Kubernetes can be deployed with TKGI running on Google Cloud Platform (GCP). Management scripts are provided to help you configure required GCP and Kubernetes resources, as well as to deploy a VMware Tanzu Greenplum cluster.

Follow each of the steps in this section to install required software and configure resources before you attempt to deploy VMware Tanzu Greenplum.

Step 1: Install VMware Tanzu Kubernetes Grid Integrated (TKGI) Edition

Follow the instructions in Google Cloud Platform (GCP) in the VMware Tanzu Kubernetes Grid Integrated (TKGI) Edition documentation. Completing these instructions creates a new TKGI installation including an Operations Manager URL, which will be referenced in later steps as <OPSMANAGER_IP_ADDRESS_OR_URL>.

Step 2: Install Client Tools

VMWare Tanzu Greenplum for Kubernetes provides a number of scripts to automate configuration tasks in Google Cloud Platform, TKGI, and Kubernetes. These scripts require your client system to have a number of tools installed. Follow these steps:

  1. On MacOS systems, use homebrew to install required client system tools:

    $ brew install jq yq kubernetes-helm kubectl
    $ brew cask install docker

    The above command installs several tools that are required for for the VMware Tanzu Greenplum scripts:

    • jq - for parsing json on the command line
    • yq - for parsing yaml on the command line
    • helm - the CLI for the Helm package manager for Kubernetes
    • kubectl - the CLI for deploying and managing applciations on Kubernetes
    • docker - software container platform and related tools
  2. Download and install the Google cloud tools. Ensure that the gcloud utility is available before you continue.

  3. Install the PKS CLI tool from the VMware Tanzu Network using the instructions at Installing the PKS CLI.

Step 3: Configure the GCP Service Account

  1. Login to GCP with the gcloud tool and set a new project:

    $ gcloud auth login
    $ gcloud projects list
    $ gcloud config set project <project_name>
  2. As a best practice, create a separate service account to use for deploying VMware Tanzu Greenplum:

    The VMware Tanzu Greenplum service account must have the following permissions, which are automatically set by the script:

    • Compute Viewer
    • Compute Network Admin
    • Storage Object Creator

    You can optionally grant these permissions to a different service account using IAM & admin in the GCP console.

  3. Activate the service account using the key file key.json:

    $ gcloud auth activate-service-account --key-file=./key.json
  4. Set a preferred availability zone with a command similar to:

    $ gcloud config set compute/zone us-west1-a

    Update the zone name as necessary for your configuration.

  5. Set up Google Container Registry to host Docker images

    Enable the Container Registry API

    Configure docker to use the gcloud command-line tool as a credential helper for the activated service-account:

    $ gcloud auth configure-docker

    For additional details see instructions.

Step 4: Configure the GCP Firewall

In order to provide communication between the nodes and containers running Greenplum, you must create a firewall rule and add it to the default deployment tag. This creates routes between nodes and their containers. Follow these steps:

  1. Access the Operations Manager configuration page at https://<OPSMANAGER_IP_ADDRESS_OR_URL>/infrastructure/iaas_configurations. Look for the field named Default Deployment Tag and record its value. If it is empty, record the value, greenplum-tag.

  2. Export a variable for the Default Deployment Tag value, as in:

    $ export DEFAULT_DEPLOYMENT_TAG="greenplum-tag"

    The Default Deployment Tag controls the default firewall rules for every VM that is created.

  3. Determine the Google Parent Network name. To do so, access the Operations Manager page at https://<OPSMANAGER_IP_ADDRESS_OR_URL>/infrastructure/networks/edit and disclose one of the networks that you created for TKGI in the Networks section. The Google Network Name value uses the format <parent-network-name>/<subnet-name>/<region-name>. Because all of the networks are based on the underlying Google Network, the first part of the full network name, <parent-network-name> corresponds to the Google Parent Network.

    For example, if the value of the Google Network Name reads gpcloud-pks-net/foo/us-west1 then gpcloud-pks-net corresponds to the Google Parent network.

  4. Export an environment for the Google parent network:

    $ export GOOGLE_PARENT_NETWORK="gpcloud-pks-net"
  5. Finally, create a firewall rule to allow inter-container traffic using DEFAULT_DEPLOYMENT_TAG and GOOGLE_PARENT_NETWORK variables that you exported:

    $ gcloud compute firewall-rules create greenplum-rule \
    --network=${GOOGLE_PARENT_NETWORK} \
    --action=ALLOW \
    --rules=tcp:1024-65535,tcp:22,icmp,udp \
    --source-ranges= \
    --target-tags ${DEFAULT_DEPLOYMENT_TAG}

Step 5: Configure the Kubernetes Load Balancer

Create or re-use a Load Balancer for a new Kubernetes cluster. If a TCP load balancer from a previous kubernetes cluster exists, reuse it by specifying the front-end IP address below in the Step 6: Deploy a Kubernetes Cluster.

If no load balancer exists, use these commands to create one:

$ export LB_NAME=greenplum-cluster1-lb
$ gcloud compute target-pools create ${LB_NAME}
$ REGION=$(gcloud config get-value compute/region)
$ gcloud compute forwarding-rules create ${LB_NAME}-forwarding-rule \
    --target-pool ${LB_NAME} --ports 8443 --ip-protocol TCP --region ${REGION}
$ echo " Front-end IP Address of load balancer for ${LB_NAME}:"
$ gcloud compute forwarding-rules describe ${LB_NAME}-forwarding-rule --region ${REGION} --format="value(IP_ADDRESS)"

You will reset the backend instances to attach to the new Kubernetes cluster in the next section.

Step 6: Deploy a Kubernetes Cluster

Follow these steps to deploy a new TKGI cluster using the firewall rules and load balancer you configured for Kubernetes:

  1. Follow the instructions to Logging in to Enterprise PKS.

  2. Execute the create_pks_cluster_on_gcp.bash script, specifying the IP address of the Load Balancer's front end. The command uses the syntax create_cluster.bash <my_cluster-name> <IP_address_of_Load_Balancer>. For example:

    $ cd workspace
    $ samples/scripts/create_pks_cluster_on_gcp.bash gpdb

    This creates a Kubernetes cluster and assigns it to be accessed via the specified load balancer. You can use either an existing Load Balancer or a newly-created one, as described in Step 5: Set Up the Kubernetes Load Balancer.

  3. Use the kubectl command to show the system containers and newly-created nodes available for deploying VMware Tanzu Greenplum:

    $ kubectl get pods --namespace kube-system
    $ kubectl get nodes 


What permissions are required for the Google Service Account?

The service account used by TKGI must have the compute.admin role to create a new service. As part of creating a service, it must create firewall rules and create an external ip for the load balancer.

How can I use bosh to obtain a shell?

In order to get a Bash shell on a particular node, go through Operations Manager to use it as a jump box:

  1. In the Google Cloud web interface, look for "compute instances" and identify Ops Manager.

  2. Click the "ssh" button to launch an ssh shell on that instance.

  3. After launching the ssh shell, use the BOSH CLI command from the Ops Manager Interface Credentials Tab. Look for a Bosh Commandline Credentials line that looks like:

    BOSH_CLIENT=<SOME_CLIENT> BOSH_CLIENT_SECRET=<SOME_SECRET> BOSH_CA_CERT=/var/tempest/workspaces/default/root_ca_certificate BOSH_ENVIRONMENT=<SOME_IP> bosh
  4. Create an alias named pks and use it in commands below:

    BOSH_CLIENT=<SOME_CLIENT> BOSH_CLIENT_SECRET=<SOME_SECRET> BOSH_CA_CERT=/var/tempest/workspaces/default/root_ca_certificate bosh alias-env pks -e <SOME_IP>
  5. For convenience, export the above two variables in the current shell:

    export BOSH_CA_CERT=/var/tempest/workspaces/default/root_ca_certificate

    After exporting those variables, the following command should work:

    bosh -e pks deployments
  6. Determine the IP address of the node you want by listing the nodes for each pod:

    kubectl get pods -o wide
    bosh -e pks vms
    bosh -e pks ssh <VM_NAME_FROM_COMMAND_ABOVE>

How do I set permissions for MacOS HomeBrew?

If necessary, execute the command:

sudo chown -R $USER:admin /usr/local
check-circle-line exclamation-circle-line close-line
Scroll to top icon