Using Greenplum Command Center
VMware Tanzu Greenplum Command Center is a management and monitoring tool for VMware Tanzu Greenplum. This topic describes how to install and configure Command Center with VMware Tanzu Greenplum.
Unlike with other VMware Tanzu Greenplum distributions, VMware Tanzu Greenplum for Kubernetes automatically includes the Command Center installation file as part of the Greenplum Docker image. You can easily execute the installer at
/home/gpadmin/tools/installGPCC/gpccinstall-<version> from the master-0 pod, following the instructions at Installing and Upgrading VMware Tanzu Greenplum Command Center
in the Command Center documentation.
The procedure that follows shows how to quickly install Command Center in a new VMware Tanzu Greenplum for Kubernetes installation, including how to open the default Command Center port to access Command Center outside of the Kubernetes cluster.
The Prerequisites topic in the Command Center documentation describes the full list of prerequisites for running Command Center. The following prerequisites are especially relevant for VMware Tanzu Greenplum for Kubernetes deployments:
- The directory where Greenplum Command Center will be installed must be writable by the
gpadminuser on all Greenplum Database hosts. The default directory,
/usr/local/is not writable by
gpadminin new VMware Tanzu Greenplum for Kubernetes deployments. You can install Command Center to
/greenplumto meet this prerequisite.
Note: Do not install Command Center to
/home/gpadmin, because files in that location are removed when the Greenplum deployment is deleted and restarted.
To install to a different directory, follow the instructions in Selecting and Preparing an Installation Directory for Command Center in the Command Center documentation.
- Use the
PGPASSWORDenvironment variable before invoking the installer, to prevent the
.pgpassfile from being created.
.pgpassis always created in
/home/gpadminand would be removed after the Greenplum instance is deleted and restarted.
- The default Command Center port number, 28080, is not routed by default using the Greenplum service’s external IP address. The procedure that follows shows example instructions for how to route the default port number in a VMware Tanzu Greenplum for Kubernetes deployment.
.pgpassfile is not recommended for VMware Tanzu Greenplum for Kubernetes deployments. The
.pgpassfile is always created in
/home/gpadmin, and the contents of this directory are removed and recreated when you delete and redeploy VMware Tanzu Greenplum for Kubernetes. Instead, set the
PGPASSWORDbefore you install Command Center, and before you run the
gpcccommand to perform actions such as starting, stopping, or displaying the status of Command Center.
After you delete and redeploy a VMware Tanzu Greenplum for Kubernetes deployment, you must manually restart Command Center. You must also reconfigure the Greenplum service to allow the Command Center port number to be accessed from an external IP address. Follow steps 4 and 5 in Installing Command Center to complete these steps.
To install Command Center in a new VMware Tanzu Greenplum for Kubernetes deployment:
PGPASSWORDenvironment variable and execute the Command Center installer,
<version>is the Command Center version that was installed. The following example commands creates an input file for the installer to specify the
/greenpluminstallation directory, and uses default values for all other installation options:
$ kubectl exec master-0 -- bash -c 'echo -e "path = /greenplum" > /tmp/gpcc-config.txt && PGPASSWORD=changeme /tools/installGPCC/gpccinstall-* -c /tmp/gpcc-config.txt'
If you want to specify a non-default port, language, or security setting, either add those options to the input file or run the installer in interactive mode. The following command runs the interactive installer, which prompts you for all installation options:
$ kubectl exec -it master-0 -- bash -c "PGPASSWORD=changeme /home/gpadmin/tools/installGPCC/gpccinstall-*"
gpcc_path.shscript and set the
PGPASSWORDenvironment before starting Command Center. For example:
$ kubectl exec -it master-0 -- bash -c 'source /greenplum/greenplum-cc/gpcc_path.sh && PGPASSWORD=changeme gpcc start'
2020-10-08 18:39:15 Starting the gpcc agents and webserver... 2020-10-08 18:39:18 Agent successfully started on 2/2 hosts 2020-10-08 18:39:18 View Greenplum Command Center at http://master-0:28080
At this point, Command Center is running on the indicated port, but the port is not mapped to the external IP address for the service. Follow these steps to add the port mapping:
Load the Greenplum service configuration into your text editor:
$ kubectl edit svc greenplum
ports:section of the configuration, add a
name: gpdbentry to identify the existing port configuration for Greenplum Database. For example, change the following stanza:
ports: - nodePort: 32731 port: 5432 protocol: TCP targetPort: 5432
ports: - name: gpdb nodePort: 32731 port: 5432 protocol: TCP targetPort: 5432
Add a new stanza to the
ports:section to add a port configuration for GPCC. The following shows the completed
ports:section with the new
gpccstanza that configured the default port, 28080:
ports: - name: gpdb nodePort: 32731 port: 5432 protocol: TCP targetPort: 5432 - name: gpcc port: 28080 protocol: TCP targetPort: 28080
Save your changes to the service configuration file.
The service configuration should now show the available port number (28080 in the example above). For example:
$ kubectl get svc greenplum
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE greenplum LoadBalancer 10.102.197.205 10.102.197.205 5432:32731/TCP,28080:30684/TCP 20h
Access Command Center from your browser, using the external IP address and port number you have configured. In the above example, Command Center would be accessed from http://10.102.197.205:28080 For a new installation, log in using the
gpmonrole and the password that you set in the
For more information about using Command Center, see the VMware Tanzu Greenplum Command Center documentation.