In this section, you download the Photon OS 3.0 Greenplum Database OVA template from VMware Marketplace, deploy the OVA in VMware vSphere, perform a series of configuration changes to the virtual machine, and create a template from it. Finally, you verify that the virtual machine is in configured correctly by running the /etc/gpv/validate utility.

Downloading the Greenplum Database to a local machine

The Greenplum Database OVA template is available on VMware Marketplace.

Log in and download the preferred version. Make note of the directory where the file was saved.

Deploying the Greenplum Database Template OVA

  1. Log in to vCenter and navigate to Hosts and Clusters.
  2. Right click your cluster, then click Deploy OVF Template.
  3. Choose Local file, select the OVA file from your local machine, then click Next.
  4. Set Virtual machine name as greenplum-db-template. Select the desired Datacenter, then click Next.
  5. Select the desired compute resource, then click Next. Wait while vCenter queries the OVA advanced configuration options.
  6. Verify that the Review details section is correct, then click Next.
  7. Select your vSAN storage, then click Next.
  8. Select gp-virtual-external as the Destination Network, then click Next.
  9. Configure the Customize Template section:
    1. Set Number of Primary Segments to the number of Greenplum primary segments you plan to deploy.
      • For Mirrored deployment, primary segments count is half of the total number of segment virtual machines
      • For Mirrorless deployment, primary segments count is same as total number of segment virtual machines
    2. Choose between a Mirrored or Mirrorless deployment.
    3. Set Internal Network:
      • Internal Network MTU Size with the desired MTU size. The recommended size is 9000.
      • Internal Network IP Prefix with the leading octets for the gp-virtual-internal network IP range, for example 192.168.1.
    4. Set Routable Networking:
      • Hostname as greenplum-db-template.
      • NTP Server with a routable NTP server to sync with mdw and smdw.
    5. Click Next.
  10. Review the configuration, then click Finish.
  11. Do not power on the template until you have updated memory and CPU resources.

Modifying Resources

Based on your underlying hardware, you may need to change the default settings for CPU, memory and data disk size, which are preset to 8 vCPU, 30 GB and 16 GB respectively.

  1. Right click the greenplum-db-template virtual machine, then click Edit Settings.
  2. If you want to change the memory size, click on the number on the right of Memory and enter the desired allocated memory.
  3. If you want to change the number of CPUs, click on the number on the right of CPU and select the desired number of CPUs.
  4. If you want to change the size of Data disk as per the VM Sizing, click on the number on the right of Hard disk 2 and enter the desired size.

    Option 1: Deploying Greenplum Using a Pre-built OVA - 图1

  5. Click OK.

  6. Power on the greenplum-db-template virtual machine.

Validating the Virtual Machine Template

  1. Launch the web console and log in as gpadmin with the password changeme.
  2. Follow the prompt to reset the password of gpadmin.
  3. Use Ctrl+D to log out, then try login as root with password changeme.
  4. Follow the prompt to reset the password of root.
  5. As root, run /etc/gpv/validate and ensure there are no errors.
  6. If there are no errors, power off the virtual machine.

Provisioning the Virtual Machines

Use the Terraform software you installed in Creating the Jumpbox Virtual Machine to generate copies of the template virtual machine you just created. The following steps will guide you to configure them based on the number of virtual machines in your environment, IP address ranges, and other settings you specify in the installation script.

  1. Create a file named main.tf and copy the contents as described below,

    • For deploying in vSAN datastore ( vSAN storage ), copy the contents from OVA Script.

      or

    • For deploying in Datastore Cluster ( PowerFlex or any other storage provisioner ), copy the contents from Datastore Cluster OVA Script.

      • Note: We suggest to Turn ON vSphere Storage DRS on the Datastore Cluster and set Cluster automation level to No Automation (Manual Mode)
  2. Log in to the jumpbox virtual machine as root.

  3. Use scp to copy the main.tf file to the jumpbox, under the root user home directory.

  4. Update the following variables under the Terraform variables section of the main.tf script with the correct values for your environment. You collected the required information in the Prerequisites section.

    VariableDescription
    vsphere_userName of the VMware vSphere administrator level user.
    vsphere_passwordPassword of the VMware vSphere administrator level user.
    vsphere_serverThe IP address or, preferably, the Fully-Qualified Domain Name (FQDN) of your vCenter server.
    vsphere_datacenterThe name of the data center for Greenplum in your vCenter environment.
    vsphere_compute_clusterThe name of the compute cluster for Greenplum in your data center.
    vsphere_datastoreThe name of the vSAN datastore which will contain your Greenplum data. (if applicable)
    vsphere_datastore_clusterThe name of the PowerFlex datastore cluster which will contain your Greenplum data. (if applicable)
    vsphere_storage_policyThe name of the storage policy defined during Setting Up VMware vSphere Storage or Setting Up VMware vSphere Encryption. (if applicable)
    prefixA customizable prefix name for the resource pool, Greenplum VMs, and DRS affinity rules which will be created by Terraform
    gp_virtual_external_ipv4_addressesThe routable IP addresses for mdw and smdw, in that order; for example: [“10.0.0.111”, “10.0.0.112”].
    gp_virtual_external_ipv4_netmaskThe number of bits in the netmask for gp-virtual-external; for example: 24.
    gp_virtual_external_gatewayThe gateway IP address for the gp-virtual-external network.
    dns_serversThe DNS servers for the gp-virtual-external network, listed as an array; for example: [“8.8.8.8”, “8.8.4.4”].
    gp_virtual_etl_bar_ipv4_cidrThe leading octets for the internal, non-routable network gp-virtual-etl-bar; for example: ‘192.168.2.0/24’.
  5. Initialize Terraform:

    1. $ terraform init

    The output would be similar to:

    1. Terraform has been successfully initialized!
    2. You may now begin working with Terraform. Try running "terraform plan" to see
    3. any changes that are required for your infrastructure. All Terraform commands
    4. should now work.
    5. If you ever set or change modules or backend configuration for Terraform,
    6. re-run this command to reinitialize your working directory. If you forget, other
    7. commands will detect it and remind you to do so if necessary.
  6. Verify that your Terraform configuration is correct by running:

    1. terraform plan
  7. Deploy the cluster:

    1. terraform apply

    Answer Yes to the following prompt:

    1. Do you want to perform these actions?
    2. Terraform will perform the actions described above.
    3. Only 'yes' will be accepted to approve.
    4. Enter a value: yes

You can check the progress of the virtual machines creation under the Recent Tasks panel on your VMware vSphere client.

Once Terraform has completed, it generates a file named terraform.tfstate.
This file must not be deleted, as it keeps a record of all the virtual machines and their states.
Terraform also uses this file when modifying any virtual machines.
VMware recommends retaining a snapshot of the jumpbox virtual machine.

Monitoring the Greenplum Deployment

The initialization of the Greenplum is fully automated in the mdw virtual machine. Once the mdw virtual machine is created by the Terraform script, you can log in to mdw as root, and monitor the deployment process by running:

  1. $ journalctl -fu gpv-mdw

When the Greenplum cluster is initialized, you should see the following message:

  1. Dec 02 20:30:32 mdw bash[2228]: 2021-12-02 20:30:32 Starting the gpcc agents and webserver...
  2. Dec 02 20:30:35 mdw bash[2228]: 2021-12-02 20:30:35 Agent successfully started on 6/6 hosts
  3. Dec 02 20:30:35 mdw bash[2228]: 2021-12-02 20:30:35 View Greenplum Command Center at https://mdw:28080
  4. Dec 02 20:30:35 mdw bash[2228]: Greenplum Initialization Complete!

Setting Up the GPCC Login User

After the initialization, the GPCC (Greenplum Command Center) web service will be available at:

  1. https://mdw_public_ip:28080

Note: https will be enabled by default.

There are two default login users for GPCC: gpmon and gpcc_user. The GPCC login user gpmon is reserved for the service to function and should not be used, while the GPCC login user gpcc_user will be used to login to the GPCC web page.

In order to login to the web page, the password for the GPCC login user gpcc_user needs to be reset. Run /etc/gpv/reset-gpcc-password as the gpadmin Linux user on the mdw machine to reset the password. There will be a prompt to type and retype the new password.

Now you can login to the web page with username gpcc_user and the new password you just set.

Note: if you want to create a new login user for GPCC, refer to the GPCC documentation.

Next Steps

Now that the Greenplum Database has been deployed, follow the steps provided in Validating the Greenplum Installation to verify that Greenplum is installed correctly.