An engine definition pairs a Postgres server type with the server image on which it will reside. Only an EDB Ark administrative user can define an engine. Once defined, all of the engines that reside within a specific tenant will be made available to all users with access to that tenant. You can use the DB Engine Administration section of the Admin tab to create and manage database engines (see Figure 4.15).Use the Add Engine dialog (see Figure 4.16) to define an engine. To access the Add Engine dialog, connect to the Ark console as a user with administrative privileges, navigate to the Admin tab, and select Add Engine.Use the fields on the Add Engine dialog to define a new server image/database pairing:
• Use the ID field to provide an identifier for the engine. Please note that the identifier must be unique, and may not be modified after saving the engine.
• Use the drop-down listbox in the DB Type field to select the type of database used in the pairing.
• Use the drop-down listbox in the Version field to specify the server version.
• Use the Name field to provide a name for the pairing. When the engine is enabled, the specified name will be included for use on the Create Cluster dialog.
• Use the drop-down listbox in the Server Type field to specify the server image on which the database will reside. The drop-down listbox displays those images previously defined on the Add Server dialog.
• Use the Yum repo URL field to provide the URL of the yum repository that will be used to initially provision database packages and to later update the database packages during cluster upgrade operations.http://[user_name[:password]@]repository_urluser_name specifies the name of a user with sufficient privileges to access the repository.password specifies the password associated with the repository user. Please note that if your password contains special characters (such as a $), you may need to percent-encode the characters.repository_url specifies the URL of the repository.http://user_name:email@example.com/9.x/redhat/rhel-\\$releasever-\\$basearchWhere x specifies the specific Advanced Server version (e.g., 9.6).http://user_name:firstname.lastname@example.org/dependencies/redhat/rhel-\\$releasever-\\$basearchhttp://user_name:email@example.com/tools/redhat/rhel-\\$releasever-\\$basearchPlease contact your EnterpriseDB account manager for connection credentials (the values specified in the user_name and password placeholders) for the EnterpriseDB repositories.http://yum.postgresql.org/9.x/redhat/rhel-6-x86_64/pgdg-centos9x-9.x-1.noarch.rpmWhere x specifies the specific PostgreSQL version (e.g., 96 or 9.6).When specifying multiple repositories in the Yum repo URL field, specify one repository per line. When you perform an update, any available updates in all of the specified repositories will be applied.
• Use the Required DB Packages field to provide a space-delimited list of packages that have been tested by EDB as the required minimum set to build a functional cluster instance.When defining a database engine, you must specify the required package list for the installation in the Required DB packages field on the Edit Engine Details dialog.
• Use the Optional Node Packages field to provide the names of any packages that should be installed (from the specified repository) on every cluster node during provisioning.Please note: packages added via the Optional Node Packages field on the master node of the cluster will also be provisioned on any standby nodes that are subsequently created. If the package requires manual configuration steps, you will be required to repeat those steps on each node of the cluster; package configurations will not be propagated to standby nodes. If you add a node through cluster operations (such as failover, scaling, or restoring a node from backup), any packages on the new node will require manual configuration.When you have completed the dialog, click Save to create the engine definition, or Cancel to exit without saving.For information about using the EnterpriseDB repository, and the Advanced Server packages available, please see the EDB Postgres Advanced Server Installation Guide, available at:To modify an engine, use the Edit Engine Details button to open the Edit Engine Details dialog (see Figure 4.17).Use fields on the Edit Engine dialog to specify property changes to an engine. When you’re finished, click the Save button to make the changes persistent and exit, or Cancel to exit without saving.You can use the disabled box to specify that an engine is (or is not) available for use in new clusters without removing the engine definition:Click the Save button to make any changes to the Edit Engine Details dialog persistent, or select Cancel to exit without modifying the engine definition.Please note that disabling an engine has no impact on any running clusters; it simple prevents users from creating new clusters with the engine. You can use this feature to phase out the use of older engines.To delete an engine, highlight an engine name in the DB Engine Administration list, and select the Delete Engine button. A dialog will open, asking you to confirm that you wish to delete the selected engine (see Figure 4.18).Click the Delete button to remove the engine definition, or select Cancel to exit without removing the engine definition.Please note that you cannot remove an engine that is referenced by one or more clusters and/or backups; if you attempt to remove an engine that is in use, EDB Ark will display the warning shown in Figure 4.19.When you create a cluster, you select the engine that EDB Ark will use when provisioning the cluster. If you modify the engine description, adding the list of RPM packages that will be installed when that engine is provisioned, each node of any cluster provisioned with that engine will include the functionality of the supporting component.To simplify PostGIS installation, add a list of the required RPM packages to the Optional Node Packages field of the Edit Engine Details dialog (see Figure 4.20). After installing PostGIS, you must create the PostGIS extensions. To provision replicas that contain the PostGIS functions, perform the installation and create the extensions on the master node of the cluster before adding replica nodes to your cluster.To modify an engine description, use Administrator credentials to connect to the Ark console, and navigate to the Admin tab. Select an engine ID from the list of engines in the DB Engine Administration list, and click Edit Engine Details.When the Edit Engine Details dialog opens (see Figure 4.21), use the fields on the dialog to specify the repository information and the names of optional RPM packages that the installer should provision on each node of the cluster.
• The PostGIS RPM packages are distributed from the enterprisedb tools repository; by default, the enterprisedb tools repository is included in the Yum Repo URL field.
• Add the names of the PostGIS RPM packages to the Optional Node Packages field on the Edit Engine Details dialog.Any EDB Ark clusters that are subsequently provisioned with that engine will automatically include an installation of the PostGIS on all nodes of the cluster (see Figure 4.22).For detailed information about creating a new server cluster, please see the EDB Ark Getting Started Guide, available through the EDB Ark Dashboard tab.You can use the psql client or the EDB Postgres Enterprise Manager (PEM) client to install the extensions. Before connecting with a client, an Administrator must open the listener port (by default, 5444) of the node for connections.The example that follows demonstrates creating the extensions with the PEM client on an Advanced Server host. The PEM client is installed with the Advanced Server graphical installer, and is also available for PostgreSQL users. For more information about the PEM client, visit:To open the PEM client, navigate through the Start menu (on Linux) or the Apps menu (on Windows), selecting Postgres Enterprise Manager v6 from the Postgres Plus Advanced Server 9.5 menu (see Figure 4.23).Before you can access an EDB Ark cluster, you must register the server; use the New Server Registration dialog to register the server. To open the New Server Registration dialog, select Add Server from the File menu.Provide information about the server in the New Server Registration dialog (see Figure 4.24):
• Provide the IP address of the server in the Host field. You can find the IP address in the DNSNAME column on the Details panel for the cluster on the EDB Ark console.
• Specify the Port through which you wish to connect to the server.If you are modifying a database or invoking administrative functions, you should connect to the master node's listener port, identified in the DBPORT column, on the Details panel of the Clusters tab. Before connecting to the server's listener port, an OpenStack administrator must modify the cluster’s security group to allow connections from the connecting client.
• Select a maintenance database using the drop-down listbox in the Maintenance DB field. Select edb if you are connecting to an Advanced Server database, or postgres if you are connecting to a PostgreSQL database.
• Provide the password associated with that role, in the Password field.Click OK to connect to EDB Ark; once connected, the server will appear in the tree control in the PEM Object browser (shown in Figure 4.25).After connecting to the server with the PEM client, you should create a database in which to install the PostGIS extensions. The PostGIS extensions must be installed in each database in which you wish to use PostGIS functions.To use the PEM client to create a database, right click on the Databases node of the tree control (under the EDB Ark server), and select New Database… from the context menu. The New Database… dialog opens (as shown in Figure 4.26).Provide details about the new database in the New Database… dialog. The New Database dialog is a point-and-click interface that allows you to implement options of the CREATE DATABASE command. For more information about the CREATE DATABASE command, please see:To use the PEM Query Tool to install the extensions, highlight the name of the database into which you are installing the extensions in the Object browser tree control, and select Query tool from the Tools menu. When the Query Tool opens, enter the commands that create the extensions in the SQL Editor pane:CREATE EXTENSION postgis;
CREATE EXTENSION fuzzystrmatch;
CREATE EXTENSION postgis_topology;
CREATE EXTENSION postgis_tiger_geocoder;Then, execute the commands; to execute the commands, select Execute from the Query menu, or click the Execute icon.The PostGIS extensions will be displayed in the Extensions node of the Object browser tree control (see Figure 4.28).The PostGIS functions are installed in the public schema of the database (see Figure 4.29).The PEM agent is responsible for executing tasks and reporting statistics from a monitored Postgres instance to the PEM server. The PEM agent can be installed with an RPM package; if you have administrative access to the Ark console, you can configure the console to automatically install the PEM agent on Master and Standby nodes when provisioning a cluster.After installing the PEM agent, the agent must be registered on each node that will be monitored by the PEM server. The steps that follow detail installing a PEM agent on an EDB Ark cluster, registering the agent with the server, and configuring the server to monitor the agent.You must be an EDB Ark Administrative user to modify an engine description. Using Administrative credentials, connect to the Ark console, and navigate to the Admin tab. Select an engine ID from the list of engines in the DB Engine Administration list, and click Edit Engine Details. The Edit Engine Details dialog opens (see Figure 4.31).The name of the package that installs the PEM agent is named pem-agent. The package is distributed from the enterprisedb tools repository; by default, the enterprisedb tools repository is included in the Yum Repo URL field.Add the name of the PEM agent RPM package (pem-agent) to the Optional Node Packages field on the Edit Engine Details dialog. Any EDB Ark clusters that are subsequently provisioned with that engine will automatically include an installation of the PEM agent on all nodes of the cluster. Please note that before monitoring a node, you must:
• modify the pg_hba.conf file on the node hosting the server to allow connections from any monitored node.
• modify the pg_hba.conf file on any monitored node, allowing connections from the PEM server.For more information about administrative features of the EDB Ark console, please see the EDB Ark Administrator's Guide, available through the EDB Ark Dashboard tab.Navigate to the Clusters tab, and create a new cluster that is provisioned using the engine definition modified in Step 1 (see Figure 4.32). As the cluster spins up, each node of the cluster will include the pem-agent RPM package.For detailed information about creating a new server cluster, please see the EDB Ark Getting Started Guide, available through the EDB Ark Dashboard tab.
Please note: by default, a replica node on an OpenStack host does not have a public IP address. After creating the cluster, you must manually assign a public IP address to each node you wish to monitor with PEM. For more information, please see:The PEM server consists of an instance of PostgreSQL, an associated PostgreSQL database for storage of monitoring data, and a server that provides web services for the PEM client. The PEM server may reside on a host outside of a monitored EDB Ark cluster, or on the master node of an Ark cluster.Before a PEM agent that resides on an Ark cluster can communicate with the PEM server, you must modify the pg_hba.conf file (see Figure 4.33) of the PostgreSQL database that stores PEM statistics to allow connections from any monitored servers as well as the PEM client.With your choice of editor, modify the pg_hba.conf file (located by default in the data directory under the PostgreSQL installation), adding entries for the IP address of the EDB Ark cluster. The connection properties should allow connections that use cert and md5 authentication.For detailed information about modifying the pg_hba.conf file, please see the PostgreSQL documentation, available from the EnterpriseDB website at:After modifying the pg_hba.conf file for the PostgreSQL installation that stores statistical information for PEM, you must restart the PEM backing database server to apply the changes. The name of the PEM service is:Where x specifies the version. For example:Use the Download SSH Key icon on the Clusters tab to download the SSH key for your cluster. When you download the key, a popup will open, informing you of the steps required to connect to the master node of your cluster (see Figure 4.34).Open a terminal window, modify the permissions on the downloaded file, and use the command shown on the popup to establish a connection with the server.Use your choice of editor to modify the pg_hba.conf file on the Ark node. By default, the pg_hba.conf file is located in /var/lib/ppas/9.5/data.Add entries to the pg_hba.conf file that allow connections from the PEM server (see Figure 4.35).After modifying the pg_hba.conf file, you must restart the server to apply the changes. The name of the service is Arkdb. Use the platform and version specific command for your cluster to restart the Arkdb service.You must register each PEM agent that resides in an Ark cluster with the PEM server. Using the SSH connection to the cluster node on which the agent resides, navigate into the directory that contains the PEM agent installation:PGPASSWORD=password ./pemagent --register-agent --pem-server x.x.x.x --pem-port port --pem-user user_namex.x.x.x specifies the IP address of the PEM server.port specifies the port on which the server is listening for connectionsuser_name specifies the name of the PEM user.After registering the agent, use the following command to ensure that the service is configured to restart when if the node restarts, and that the pemagent service is running:For more information about Postgres Enterprise Manager, and to download PEM documentation, please visit the EnterpriseDB website at: