Skip to content

VMware Vsphere

manishingole-coder edited this page Apr 30, 2020 · 10 revisions

Vmware (vsphere)

Introduction:

This document will take you through steps of creating and configuring the database cluster ( 3 nodes, 1 Master and 2 standby ) in the Vmware vsphere. It also provides scripts to deploy EDB tools like Failover Manager, Postgres Enterprise Manager, etc. We have used Terraform for the provisioning of the infrastructure and Ansible for configuration of EDB software on the provisioned nodes.

We have used centos7 as base template for the creation of vm.

Prerequisite:

  • Terraform installed on your machine
  • Ansible installed on your machine.
  • Vmware vsphere access information and rights
  • Centos-7 Template created with GNOME configured
  • Subscription for EDB yum repository(If using EDB Postgres)
  • sshpass installed on your machine
  •        (Mac - sshpass -  brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb)
    

Install Terraform:

You can install terraform by following instructions here. We have have tested with terraform version 0.12.18

Install Ansible:

You can install Ansible by following instruction here

Subscription for EDB yum repository:

If you are installing EDB Postgresql you need EDB yum repository credentials to download software. This you have to provide in a terraform input file.

Create a 3 node DB cluster.

Installation and configuration:

Download deployment scripts from the git repository. The file will download in the folder. Go inside DB_Cluster_VMWARE folder and edit the file having .tf extension using your favorite editor.

Each field has its description commented out. Please fill the input parameter.

  • EDB_yumrepo_username
  • EDB_yumrepo_password
  • dcname
  • ssh_user
  • ssh_password
  • dbengine
  • replication_type
  • replication_password
  • db_user
  • db_password
  • cpucore
  • ramsize
  • template_name
  • user
  • password
  • vsphere_server
  • datastore
  • compute_cluster
  • network
  • cluster_name

Though you can find field descriptions in the input file, here are detailed explanations for each of the fields.

EDB_Yum_Repo_Username and EDB_Yum_Repo_Password

This is a mandatory field if you have selected enterprise postgres(epas10,epas11,epas12) as your DB engine. Optional field if you have selected postgres (pg10,pg11,pg12) as your DB engine.

dcname

This is the name of the datacenter in vmware vsphere.

ssh_password

This is a mandatory field. Provide password for the ssh_user.

ssh_user

This is the ssh user name you can provide who will login and configure the DB cluster with replication. By default username is root however you can provide user name of your choice. Make sure this user has all the privileges.

dbengine

We are providing an option to select different DB engines and create a cluster with it. These DB engines are as follows.

Name DBengine
For postgresql version 10 pg10
For postgresql version 11 pg11
For postgresql version 12 pg12
For Enterprise postgresql version 10 epas10
For Enterprise postgresql version 11 epas11
For Enterprise postgresql version 12 epas12

replication_password

We are creating 3 node clusters with replication set up among those. This field will set a replication password for replication role edbrepuser, which we are creating on your behalf and assigning the password of your choice.

db_password

This is a custom DB password for your dbuser. If you leave this field blank default password will be postgres.

cpucore

Provide number of cpu core for your new vm.

ramsize

Provide ramsize for your new vm.

template_name

Provide name of template created in vmware vsphere.This is base template with centos 7 ISO image and configured with at least one user.

user

Provide username of vmware vsphere user.

password

Provide password of vmware vsphere username

vsphere_server

Provide vmware vsphere server address or URL

datastore

Provide storage name in your datacenter

compute_cluster

Provide a compute cluster name in your datacenter.

network

Provide network name in your datacenter.

Once you edit a file and supplied mandatory fields save this file and exit from it.

cluster_name

This is an optional field for tagging your resources. You can leave this field blank and we will use default dbengine value as a tag name.

Deploy

Run following command to start running terraform config file. Make sure you are in the same directory where terraform input file is present

terraform init

terraform apply

This will prompt you to enter yes. Type yes and hit enter. This will start the process of creating a cluster. If successful it will display IP’s of 3 node clusters.

Ansible Deployment for 3 Node Cluster.

If you have the infrastructure ready and want to configure DB cluster with replication you can run Ansible playbooks and configure it.

Below are the steps you can follow to configure it.

Go to module directory EDB_SRSETUP_VMWARE/utilities/scripts.

Create hosts file with the following content.

master_ip ansible_user= ansible_ssh_pass=

slave1_ip ansible_user= ansible_ssh_pass=

slave2_ip ansible_user= ansible_ssh_pass=

Replace username and password with your values.

Use below command to run ansible-playbook. Make sure you are providing extra arguments.

**ansible-playbook -i hosts setupsr.yml --extra-vars='USER= PASS= EPASDBUSER= PGDBUSER= ip1= ip2= ip3= REPLICATION_USER_PASSWORD= DBPASSWORD= REPLICATION_TYPE= DB_ENGINE= MASTER= SLAVE1= SLAVE2=' **

Where

  • USER is EDB yum repo user name(If using EDB Postgres)

  • PASS is EDB yum repo user password

  • EPASDBUSER is DB username for EDB Postgres(leave blank if using community Postgres)

  • PGDBUSER is DB username for community Postgres(leave blank if using EDB Postgres)

  • ip1 is internal IP of master server

  • ip2 is internal IP of slave1

  • ip3 is internal IP of slave2

  • REPLICATION_USER_PASSWORD is replication user/role password.

  • DBPASSWORD is DB password.

  • REPLICATION_TYPE synchronous or asynchronous

  • DB_ENGINE provide options like pg10 or pg11 or epas10 or epas12

  • MASTER is master server IP

  • SLAVE1 is slave1 server IP

  • SLAVE2 is slave2 server IP

SetUp EFM Cluster

Introduction

In this document, we will walk you through steps of setting up EFM on the cluster which was created earlier.

Prerequisite

The DB cluster for which EFM we are going to set must be created using EDB deployment scripts.

Installation and configuration

Download the deployment scripts from the git repository. This will download the directory. Go inside EFM_Setup_VMWARE directory and open an input file in your favorite editor having .tf extension.

Add the below fields in that file. You can read the description of those fields that are commented out.

  • EDB_Yum_Repo_Username
  • EDB_Yum_Repo_Password
  • ssh_password
  • notification_email_address
  • efm_role_password
  • db_user

Though you can find field descriptions in the input file, here are detailed explanations for each of the fields.

EDB_Yum_Repo_Username and EDB_Yum_Repo_Password

This is a mandatory field if you have selected Postgres(pg10,pg11,pg12) as your DB engine. Optional field if you have selected enterprisedb as your dbengine as this field already configured when you have created cluster previously.

ssh_password

This is a ssh_user password to connect vm.

notification_email_address

Provide an email address where you will receive a notification related to your EFM cluster operation.

efm_role_password

We are creating a separate DB role for EFM operation called edbefm and assigning permission to perform operations required in failover management. In this field, you need to provide a password for this role.

db_user

If you have created a custom DB user while creating the cluster you need to provide a name for that user. This field we require to create an EFM role as we need to fire create role query by connecting to DB.

Deploy

Once you have supplied all these fields save input file and exit from it.

Run the following command to start setting up EFM cluster

terraform init

terraform apply

This will prompt you to confirm the creation of cluster. Type yes and hit enter to proceed. Once finished you can see resource created messages on your terminal.

Ansible Deployment for EFM set up.

If you have the infrastructure ready and want to configure EFM, you can run Ansible playbooks and configure it.

Below are the steps you can follow to configure it.

Go to module directory EFM_Setup_VMWARE/utilities/scripts.

Create hosts file with following content.

master_ip ansible_user= ansible_ssh_pass=

slave1_ip ansible_user= ansible_ssh_pass=

slave2_ip ansible_user= ansible_ssh_pass=

Replace username and password with your values.

Use below command to run ansible-playbook. Make sure you are providing extra arguments.

ansible-playbook -i hosts setupefm.yml --extra-vars='DB_ENGINE= USER= PASS= MASTER= SLAVE1= SLAVE2= EFM_USER_PASSWORD= DBUSER= NOTIFICATION_EMAIL'

Where

  • DB_ENGINE provide options like pg10 or pg11 or epas10 or epas12

  • USER is yum repo user name

  • PASS is yum repo user password.

  • DBUSER is DB username.

  • EFM_USER_PASSWORD is password for EFM role.

  • NOTIFICATION_EMAIL is email address for EFM notification.

  • MASTER is master server IP.

  • SLAVE1 is slave1 IP.

  • SLAVE2 is slave2 IP.

Create a PEM monitoring server

Introduction

Pem monitoring server is used to monitor DB servers. In this document, we will walk you through steps of creating PEM monitoring server

Prerequisite

  • Terraform installed on your machine
  • Ansible installed on your machine.
  • Vmware vsphere access rights
  • Centos-7 Template created with GNOME configured
  • Subscription for EDB yum repository.

Installation & Configuration

Download the terraform input file from the git repository. The file will download in the folder. Go inside that folder and edit the file using your favorite editor.

Each field has its description commented out.

  • EDB_yumrepo_username
  • EDB_yumrepo_password
  • dcname
  • ssh_user
  • ssh_password
  • dcname
  • db_password
  • template_name
  • user
  • password
  • vsphere_server
  • cpucore
  • ramsize
  • datastore
  • compute_cluster
  • network

EDB_Yum_Repo_Username and EDB_Yum_Repo_Password

This is a mandatory field. You can register and create

dcname

This is the name of the datacenter in vmware vsphere.

ssh_password

This is a mandatory field. Provide password for the ssh_user.

ssh_user

This is the ssh user name you can provide who will login and configure the cluster. By default username is centos however you can provide user name of your choice. Make sure this user has all the privileges.

db_password

This is the PEM server backend DB password you need to supply. We will install Enterprise Postgresql version 11 as backend database to pemserver.

template_name

Provide name of template create in vmware vsphere.This is base template with centos 7 ISO image and configured with at least one user.

user

Provide username of vmware vsphere user.

password

Provide password of vmware vsphere username

vsphere_server

Provide vmware vsphere server address or URL

datastore

Provide storage name in your datacenter

compute_cluster

Provide a compute cluster name in your datacenter.

network

Provide network name in your datacenter.

Once you fill all the details save this file and exit from it.

Deploy

Run terraform init and then terraform apply command

After this it will prompt you to enter yes. Type yes and hit enter. This will start the process of creating a cluster. If successful it will display IP of newly created server.

Access the PEM server

https://<ip_address_of_PEM_host>:8443/pem

Username: enterprisedb Password: The DB password you entered in db_password field

Ansible Deployment for PEM monitoring server.

If you have the infrastructure ready and want to configure that as PEM monitoring server, you can run Ansible playbooks and configure it.

Below are the steps you can follow to configure it.

Go to module directory EDB_PEM_SERVER_VMWARE/utilities/scripts.

Create hosts file with following content.

pem_ip ansible_user=username ansible_ssh_pass=password

Replace username and password with your values.

Use below command to run ansible-playbook. Make sure you are providing extra arguments.

ansible-playbook -i hosts pemserver.yml --extra-vars='USER= PASS= DB_PASSWORD= PEM_IP='

Where

USER is yum repo user name if DB_ENGINE is pg10,pg11,pg12.

PASS is yum repo user password if DB_ENGINE is pg10,pg11,pg12.

PEM_IP is IP of PEM server.

DB_PASSWORD is password for PEM server local DB

Register PEM Agent with PEM server

Introduction

To start monitoring DB servers created earlier with PEM monitoring servers we need to register an agent with it. This is pemagent. Following document will explain how we can register a pem agent with a pem server.

Prerequisite

DB cluster created using EDB deployment scripts. PEM server created using EDB deployment scripts.

Installation & Configuration

Download deployment scripts from git repo. This will download a folder where your terraform input file is present. Go inside PEM_Agent_VMWARE directory and open file with .tf extension in your favorite text editor.

Add below fields in the input file.

  • EDB_Yum_Repo_Username
  • EDB_Yum_Repo_Password
  • ssh_user
  • ssh_passsord
  • db_user
  • db_password
  • pem_web_ui_password.

EDB_Yum_Repo_Username & EDB_Yum_Repo_Password

This is EDB yum repository credentials you need to pass if you are using the community version of postgresql that is pg10, pg11, pg12

ssh_user

Provide ssh username who is going to perform this activity.

ssh_password

This is a password for ssh_user.

db_user

This is a DB username. Provide DB username if you have changed from default username.

db_password

This is the DB password of a remote server.

pem_web_ui_password.

This is a pem monitoring server DB password. Same we are using for login to UI of pem server.

Once you are done with editing the file save it and exit from it.

Deploy

Run below command to start process of registering pem agent with pem server

terraform init

terraform apply

This will prompt you to enter yes. Type yes and hit enter. This will start the process of registering a pem agent with the pem server and in last you will see a resource added message on the display.

Ansible Deployment for PEM Agent.

If you have the infrastructure ready and want to configure PEM agent, you can run Ansible playbooks and configure it.

Below are the steps you can follow to configure it.

Go to module directory EDB_PEM_AGENT_VMWARE/utilities/scripts.

Create hosts file with following content.

master_ip ansible_user= ansible_ssh_pass=

slave1_ip ansible_user= ansible_ssh_pass=

slave2_ip ansible_user= ansible_ssh_pass=

Use below command to run ansible-playbook. Make sure you are providing extra arguments.

ansible-playbook -i hosts installpemagent.yml --extra-vars='DB_ENGINE= USER= PASS= PEM_IP= DBPASSWORD= PEM_WEB_PASSWORD= EPASDBUSER= PGDBUSER='

Where

  • DB_ENGINE provide options like pg10 or pg11 or epas10 or epas12

  • USER is yum repo user name if DB_ENGINE is pg10,pg11,pg12.

  • PASS is yum repo user password if DB_ENGINE is pg10,pg11,pg12.

  • EPASDBUSER is DB username for EDB Postgres(leave blank if using community Postgres)

  • PGDBUSER is DB username for community Postgres(leave blank if using EDB Postgres)

  • DBPASSWORD is DB password

  • PEM_WEB_PASSWORD PEM server DB password.

  • PEM_IP is IP of PEM server.

Scale up the DB Cluster

Introduction

We are providing this option to expand your existing DB cluster. This option will not only expand DB cluster but also register newly created instances with pem server and add it to EFM cluster. In addition we are providing an option to create mixed mode replication type here. Which means now you can add a new server in the existing cluster with synchronous mode. Please note select option synchronous only if your existing cluster is in asynchronous mode.

Prerequisite

  • DB Cluster set up using EDB deployment scripts.
  • PEM server created using EDB deployment scripts.
  • EFM set up using EDB deployment scripts.
  • Vmware vsphere access rights
  • Centos-7 Template created with GNOME configured
  • Subscription for EDB yum repository(If using EDB Postgres)

Installation & Configuration

Download deployment scripts from git repository. A folder will download having a terraform input file. Go inside Expand_DB_Cluster_VMWARE directory and open file with .tf extension in your favorite text editor.

Add below fields in the input file.

  • EDB_yumrepo_username
  • EDB_yumrepo_password
  • dcname
  • ssh_user
  • ssh_password
  • replication_type
  • replication_password
  • db_user
  • notification_email_address
  • efm_role_password
  • pem_web_ui_password
  • db_password
  • cpucore
  • ramsize
  • template_name
  • user
  • password
  • vsphere_server
  • datastore
  • compute_cluster
  • network

dcname

This is vmware vsphere datacenter name.

ssh_user

Provide ssh username who is going to perform this activity.

ssh_password

This is a password for ssh_user.

replicationpassword

We are creating 3 node clusters with replication set up among those. This field will set a replication password for replication role edbrepuser, which we are creating on your behalf and assigning the password of your choice.

EDB_yumrepo_username

If you have selected Enterprise PostgreSQL as your DB engine, you need to provide this field.

EDB_yumrepo_password

This is a yum repo user password.

replicationtype

This field will ask you to select replication type, synchronous or asynchronous. Make sure if you have selected synchronous replication type in 3 node DB cluster set up leave this field blank.

dbuser

If you decide to not use default DB username(for Postgresql its postgres and for Enterprise Postgresql its enterprisedb) you can provide the name of dbuser here. We will create a user from this field and assign default password postgres(which you can change later).

notification_email_address

Provide an email address where you will receive a notification related to your EFM cluster operation.

efm_role_password

We are creating a separate DB role for EFM operation called edbefm and assigning permission to perform operations required in failover management. In this field, you need to provide a password for this role.

dbpassword

This is the DB password of a remote server.

pem_web_ui_password.

This is a pem monitoring server DB password. Same we are using for login to UI of pem sever.

template_name

Provide name of template created in vmware vsphere.This is base template with centos 7 ISO image and configured with at least one user.

user

Provide username of vmware vsphere user.

password

Provide password of vmware vsphere username

vsphere_server

Provide vmware vsphere server address or URL

datastore

Provide storage name in your datacenter

compute_cluster

Provide a compute cluster name in your datacenter.

network

Provide network name in your datacenter.

Deploy

Once you are done with editing the file save it and exit from it.

Run below command to start process of registering pem agent with pem server

terraform init

terraform apply

This will prompt you to enter yes to create the resource. Type yes and hit the enter key. This will start the process of creating and configuring the DB cluster.

Ansible Deployment to Scale existing cluster.

If you have the infrastructure ready and want to scale it, you can run Ansible playbooks and configure it.

Below are the steps you can follow to configure it.

Go to module directory EDB_ADD_REPLICA_VMWARE/utilities/scripts.

Create hosts file with following content.

master_ip ansible_user= ansible_ssh_pass=

slave1_ip ansible_user= ansible_ssh_pass=

slave2_ip ansible_user= ansible_ssh_pass=

slave3_ip ansible_user= ansible_ssh_pass=

Replace username and password with your values

Use below command to run ansible-playbook. Make sure you are providing extra arguments.

ansible-playbook -i hosts expandcluster.yml --extra-vars='DB_ENGINE= USER= PASS= PGDBUSER= EPASDBUSER= NEWSLAVE= REPLICATION_USER_PASSWORD= REPLICATION_TYPE= ip1= ip2= ip3= selfip= NOTIFICATION_EMAIL= SLAVE1= SLAVE2= DBPASSWORD= PEM_IP= PEM_WEB_PASSWORD='

Where

  • DB_ENGINE provide options like pg10 or pg11 or epas10 or epas12

  • USER is yum repo user name

  • PASS is yum repo user password.

  • EPASDBUSER is DB username for EDB postgres(leave blank if using community postgres)

  • PGDBUSER is DB username for community postgres(leave blank if using EDB postgres)

  • ip1 is internal IP of master server

  • ip2 is internal IP of slave1

  • ip3 is internal IP of slave2

  • REPLICATION_USER_PASSWORD is replication user/role password.

  • DBPASSWORD is DB password.

  • REPLICATION_TYPE synchronous or asynchronous

  • DB_ENGINE provide options like pg10 or pg11 or epas10 or epas12

  • MASTER is master server public IP

  • SLAVE1 is slave1 server public IP

  • SLAVE2 is slave2 server public IP

  • EFM_USER_PASSWORD is password for EFM role.

  • NOTIFICATION_EMAIL is email address for EFM notification.

  • NEWSLAVE is public IP of new server

  • selfip is internal IP of new server.

  • NOTIFICATION_EMAIL is email address for EFM notification.

  • DBPASSWORD is DB password

  • PEM_WEB_PASSWORD PEM server DB password.

  • PEM_IP is IP of PEM server.

BART_VMWARE

Introduction:

EDB backup and recovery tool(BART) helps users to have separate backup servers for their DB servers. This can serve as DR for your DB backup. In this document, we will walk you through steps of creating a BART server using a deployment script for Vmware Vsphere providers.

Note: As Bart needed passwordless authentication between bart and DB server we have handled it in terraform. SSH user on remote server is ‘enterprisedb’ if DB engine is enterprised postgres and ‘postgres’.

Prerequisites:

  • DB server created using deployment script DB_Cluster_VMWARE
  • Vmware vsphere access rights
  • Centos-7 Template created with GNOME configured
  • Subscription for EDB yum repository(If using EDB Postgres)

Installation & Configuration

Download deployment scripts from git repository. A folder will download having a terraform input file. Go inside Expand_DB_Cluster_VMWARE directory and open file with .tf extension in your favorite text editor.

Add below fields in the input file.

  • EDB_yumrepo_username
  • EDB_yumrepo_password
  • dcname
  • ssh_user
  • ssh_password
  • cpucore
  • ramsize
  • template_name
  • datastore
  • compute_cluster
  • network
  • db_user
  • db_password
  • retention_period
  • size

Description of all the above input parameters given in the input file. Here are the detailed description.

EDB_yumrepo_username

If you have selected Enterprise PostgreSQL as your DB engine, you need to provide this field.

EDB_yumrepo_password

This is a yum repo user password.

dcname

This is vmware vsphere datacenter name.

ssh_user

Provide ssh username who is going to perform this activity.

ssh_password

This is a password for ssh_user.

cpucore

Provide cpucore for your vm. This is default to 2 core if you leave blank

ramsize

Provide ram size for your vm. This is default to 1024 MB.

template_name

This is the name of the base centos 7 image you configured and created.

datastore

Provide name of datastore of your vmware vsphere account

compute_cluster

Provide name of compute cluster of your vmware vsphere account

network

Provide name of network of your vmware vsphere account.

db_user

Provide DB user name of remote DB server whoes back up we are going to store in bart server.

db_password

Provide DB password of remote DB server whoes back up we are going to store in bart server.

retention_period

Provide retention period of back up we are going to store on BART server. Backup older than this period will delete from backup server.

size

Provide name of additional disk attached to Bart server. On this volume back up will be stored. This volume should be large enough to store DB backup.

Deploy

Once you are done with editing the file save it and exit from it.

Run below command to start process of registering pem agent with pem server

terraform init

terraform apply

This will prompt you to enter yes to create the resource. Type yes and hit the enter key. This will start the process of creating and configuring the BART server.

BART servers need to take backup of clusters frequently. With this deployment we have added two schedule jobs for back up. One job will take full backup every sunday at 00 hour 05 min.

Another job will take incremental backup daily at 00 hour 45 min. You can always modify this timing by logging on to BART server.

Ansible Deployment For BART.

If you have VM created and want to configure for BART you can do it using ansible-playbook we have created. This playbook will help you to configure the BART server without any manual efforts.

Below are the steps you can follow to configure it.

Go inside BART_VMWARE-->config_bart directory.

Open a hosts file and replace values provided in the file with the actual values of BART server and Database server.

Once you filled all the values run below command to configure BART server.

ansible-playbook -i hosts bartserver.yml --extra-vars='USER= PASS= BART_IP= DB_IP= DB_ENGINE= DB_PASSWORD= DB_USER= RETENTION_PERIOD='

Where

USER is EDB yum repository username to download package for BART

PASS is EDB yum repository user password.

BART_IP is Bart server IP address

DB_IP is a database server IP from which Bart server going to take backup.

DB_ENGINE is a database engine installed on the Master server. Eg pg12 or epas12

DB_PASSWORD is a database server superuser password.

DB_USER is a database server super username.

RETENTION_PERIOD is days or weeks you want to keep backup on BART server. You can leave this field blank.

Sample ansible-playbook run example is

ansible-playbook -i hosts bartserver.yml --extra-vars='USER=myname PASS=admine@123 BART_IP=50.2.3.5 DB_IP=112.30.1.3 DB_ENGINE=pg12 DB_PASSWORD=postgres DB_USER=postgres RETENTION_PERIOD=1 DAYS'

EDB TOOLS

Introduction.

In this deployment script we are providing you option to use EDB tool together. This includes 3 node DB cluster, EFM setup, PEM monitoring server, Pem agent, BART server. We have used the latest version for all these tools so you can deploy it together in one go.

We have used centos7 as base template for the creation of vm.

Prerequisite:

  • Terraform installed on your machine
  • Ansible installed on your machine.
  • Vmware vsphere access information and rights
  • Centos-7 Template created with GNOME configured
  • Subscription for EDB yum repository.
  • sshpass installed on your machine
  •        (Mac - sshpass -  brew install https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb)
    

Install Terraform:

You can install terraform by following instructions here. We have have tested with terraform version 0.12.18

Install Ansible:

You can install Ansible by following instruction here

Subscription for EDB yum repository:

You need EDB yum repository credentials to download software. This you have to provide in a terraform input file.

Installation and configuration:

Download deployment scripts from the git repository. The file will download in the folder. Go inside EDB_Tools_VMWARE folder and edit the file having .tf extension using your favorite editor.

Each field has its description commented out. Please fill the input parameter.

  • EDB_yumrepo_username
  • EDB_yumrepo_password
  • dcname
  • ssh_user
  • ssh_password
  • replication_type
  • replication_password
  • db_user
  • db_password
  • cpucore
  • ramsize
  • template_name
  • user
  • password
  • vsphere_server
  • datastore
  • compute_cluster
  • network
  • cluster_name
  • cpucore_pem
  • ramsize_pem
  • db_password_pem
  • cpucore_bart
  • ramsize_bart
  • retention_period
  • size
  • efm_role_password
  • notification_email_address

Though you can find field descriptions in the input file, here are detailed explanations for each of the fields.

EDB_Yum_Repo_Username and EDB_Yum_Repo_Password

This is a mandatory field if you have selected enterprise Postgres(epas10,epas11,epas12) as your DB engine. Optional field if you have selected Postgres (pg10,pg11,pg12) as your DB engine.

dcname

This is the name of the datacenter in VMWare vsphere.

ssh_password

This is a mandatory field. Provide password for the ssh_user.

ssh_user

This is the ssh user name you can provide who will login and configure the DB cluster with replication. By default username is root however you can provide user name of your choice. Make sure this user has all the privileges.

replication_password

We are creating 3 node clusters with replication set up among those. This field will set a replication password for replication role edbrepuser, which we are creating on your behalf and assigning the password of your choice.

db_password

This is a custom DB password for your dbuser. If you leave this field blank default password will be postgres.

cpucore

Provide number of cpu core for your new vm.

ramsize

Provide ramsize for your new vm.

template_name

Provide name of template created in vmware vsphere.This is base template with centos 7 ISO image and configured with at least one user.

user

Provide username of vmware vsphere user.

password

Provide password of vmware vsphere username

vsphere_server

Provide vmware vsphere server address or URL

datastore

Provide storage name in your datacenter

compute_cluster

Provide a compute cluster name in your datacenter.

network

Provide network name in your datacenter.

Once you edit a file and supplied mandatory fields save this file and exit from it.

cluster_name

This is an optional field for tagging your resources. You can leave this field blank and we will use default epas12 as a tag name.

efm_role_password

We are creating DB roles edbefm for EFM operations. Here you need to provide password for that user.

notification_email_address

Provide EFM notification email address to receive cluster health notification or any change in status.

cpucore_pem

We are creating new VM for PEM monitoring server provide configuration for your PEM monitoring server here.

Provide CPU core for your VM. By default this is 2 core. Increase this as per your need.

ramsize_pem

Provide RAM size in MB for your VM. By default it is 1024. Increase this size as per your need.

db_password_pem

This is DB password for your PEM monitoring server.

cpucore_bart

We are creating new BART VM provide CPU core for your BART server. By default it is 2 core.

ramsize_bart

Provide RAM size in MB for your VM. By default it is 1024. Increase this size as per your need.

retention_period

This determines when an active backup should be marked as obsolete. You can specify the retention policy either in terms of number of backup or in terms of duration (days, weeks, or months). eg 3 MONTHS or 7 DAYS or 1 WEEK Leave it blank if you don't want to put any retention policy.

size

We are creating and attaching new disk on your VM for back up store. Please provide size of that disk here. This size should be double than of your DB size.

Deploy

Once you are done with editing the file save it and exit from it.

Run below command to start process of registering pem agent with pem server

terraform init

terraform apply

This will prompt you to enter yes to create the resource. Type yes and hit the enter key. This will start the process of creating and configuring the BART server.

Once this terraform apply completes, you will see IP of all the server created.

PEM monitoring server can be access on your browser using below URL

https://PEM_SERVER_IP:8443/pem

Username: enterprisedb

Password: The one you entered in input file.

Clone this wiki locally