Using the Advanced Server Operator

Once the Operator is installed by the administrator, end users can install the CLI tool, epasctl, on their own client machines and start deploying and managing EDB containers using the CLI tool.

Installing the Advanced Server Operator CLI (epasctl)

  1. Install the CLI tool on client machine:

    On any Linux machine, download the CLI tarball operator-cli.tgz and expand. The tarball contains the following files:

    • epasctl
    • apiserver.crt
    • apiserver.key
    • .epasconfig
    • sample-create-epas.yaml
  2. Update the CLI configuration file ( .epasconfig)

    In the .epasconfig file, set the following parameters:

Setting Value Description
apiserverUrl https:<ipaddres>:<port> The URL provided by the administrator after the Operator is installed as mentioned in Step 6 of Section 1.1
namespace User-specified The namespace the user wants to use for deploying the Advanced Server cluster and related objects. The namespace has to be one of the user namespaces specified during the Operator installation as mentioned in the config(header) section of Section 1.1
  1. Verify the CLI installation:

    Run the following command to verify the CLI installation:

    ./epasctl version

Using the Advanced Server Operator CLI

This section provides examples on how to use the CLI tool to deploy and manage EDB containers in your designated namespace as an end-user.

Creating an Advanced Server Cluster

To create an Advanced Server cluster in the designated namespace, complete the following steps:

  1. Create a cluster specification file - The description of the settings is provided in Cluster Specifications section. For examples, refer to the sample-create-epas.yaml file (obtained from the downloaded tarball).

  2. Create the cluster by running the following command:

    ./epasctl create cluster cluster_name -f cluster_name-spec-file.yaml

Where cluster_name is the name of the cluster.

Cluster Specifications

Section Setting Values Description
database image

edb-as

edb-as-lite

EPAS image to be used
imageTag v10, v11 EPAS version
standbyCount User-specified Number of standbys
user User-specified Database user
password User-specified Database password
enterprisedbPassword User-specified Password for default user “enterprisedb”
replUser User-specified Replication user
replPassword User-specified Replication password
pgport User-specified Database port
localeParameter User-specified Locale
nameserver User-specified IP address of nameserver
enableHAMode Yes, No Enable high-availability (default ‘Yes’)
enableArchiveMode Yes, No

Enable archiving

(default ‘Yes’)

enableMonitorMode Yes, No Enable monitoring (PEM)
initdbOpts User-specified initdb options
reuseDataVolume Yes, No Reuse data if exists on volume (default ‘Yes’)
restoreFile User-specified File to restore data from
restoreDir User-specified Directory to restore data from
     
     
queryrouter enabled true, false Enable query routing (PgPool)
backup enabled true, false Enable backup
numBackupsToKeep User-specified Backup retention policy
schedule User-specified Backup schedule in cron format

Backing up an Advanced Server Cluster

You can back up an existing cluster automatically or manually.

Automatic Backup:

To automate backups, set the schedule in the backup section of the cluster specification file during the cluster creation as mentioned in the config section.

Manual Backup:

To perform a manual backup, use the command:

./epasctl backup cluster cluster_name --manual

Scaling an Advanced Server Cluster

An existing cluster may be scaled by increasing or decreasing the number of standbys:

Run the following command for scaling a cluster:

./epasctl scale cluster cluster_name –standby-count= desired-standby-count

Displaying Status of an Advanced Server Cluster

To display the status of an existing cluster, run the command

./epasctl show cluster cluster_name

Monitoring an Advanced Server Cluster

To enable monitoring of the cluster, set the enableMonitorMode setting to Yes in the database section of the cluster specification file.

Details of the PEM console:

Console URL: Displayed upon successful creation of the cluster

Credentials: Provided in the .pemserverpass file.

The URL of the PEM console can be redisplayed by running the cluster status command:

./epasctl show cluster cluster_name

Deleting an Advanced Server Cluster

To delete a cluster along with its associated objects, run the following command:

./epasctl delete cluster my_cluster

List of Supported Functions

Function Example Command Description
Create database cluster ./epasctl create cluster edb1 –f create-epas.yaml Creates a Advanced Server cluster based on the specs provided in the input manifest, i.e. create-epas.yaml
Scale database cluster ./epasctl scale cluster edb1 –standby-count=3 Scales a Advanced Server cluster up or down by changing the number of standbys
Backup database cluster manually ./epasctl backup cluster edb1 –manual Manually (on-demand) backs up a Advanced Server cluster. For automated backups, the backup schedule is provided in the input manifest in the backup section
Show status of database cluster ./epasctl show cluster edb1 Displays the current status of the EPAS cluster
Delete database cluster ./epasctl delete cluster edb1 Deletes the Advanced Server cluster along with its associated objects
Provide failover capability In the input manifest, set enableHAMode=Yes in the database section Enables the Advanced Server cluster to function in high availability mode via EDB Failover Manager (EFM)
Monitor database cluster In the input manifest, set enableMonitorMode=Yes in the database section Automatically registers the Advanced Server cluster with the PEM server deployed in its namespace
Backup database cluster automatically In sample-create-epas.yaml, set enableMonitorMode = “Yes” Automatically backs up the Advanced Server cluster per provided schedule