Process - Setup or Reconfigure Database Account 1.0

1 Process

DescriptionThe process setup_omsdb sets up or reconfigures a DB account suitable for use by IOM on an existing PostgreSQL-server.
Example: setup OMS DB account
ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ \
ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ \
ansible-playbook -i <path to inventory file>/inventory <path to Ansible4IOM>/processes/setup_omsdb.yml

1.1 Steps

The process consists of the following steps:

  1. pgrepo_install
    1. Install PostgreSQL repository.
  2. pgclient_install
    1. Install PG client yum package.
  3. omsdb_initialization
    1. Create/update DB user.
    2. Create/update database.

1.2 Background Information

This process is separated from Process - Setup Postgres Server 1.0, in order to support usage of "DB-server as service". Nevertheless, access to the DB is required by a DB-user, who has sufficient permissions to create and configure a new DB account. The separation from Process - Setup Postgres Server 1.0 makes it necessary that the current process has to use its own configuration and cannot simply take over the configuration from the PostgreSQL-server installation. For the same reason, this process runs on application server machines, instead of a database server host.

All variables defining connection to the DB have to be set in the inventory. All information about the account to be prepared are taken from the OMS configuration. Please see roles/omsdb_config/defaults for details.

2 Examples

2.1 Initialize/ Reconfigure Database Account After Installing PostgreSQL-server.

In this case, the inventory has to contain information about the DB-server and the DB-account. Most information can be taken over directly from the PostgreSQL-server configuration, except the hostname, which is only implicitly available by assignment to group pg_server.

inventory file
...
[all:vars]

# control setup of PostgreSQL-server
PGSERVER_PORT=5432
PGSERVER_SUPERUSER="postgres"
PGSERVER_SUPERUSER_PASSWD="s3cr3t"
 
# control setup of IOM DB account
OMSDB_HOST=db.your-private.net
OMSDB_PORT={{PGSERVER_PORT}}
OMSDB_SUPERUSER="{{PGSERVER_SUPERUSER}}"
OMSDB_SUPERUSER_PASSWD="{{PGSERVER_SUPERUSER_PASSWD}}"

Using this configuration, the DB-account can be created by executing the following command.

Example: setup DB account
ANSIBLE_LIBRARY=<path to Ansible4IOM>/modules/ ANSIBLE_ROLES_PATH=<path to Ansible4IOM>/roles/ ansible-playbook -i <path to inventory file> <path to Ansible4IOM>/processes/setup_omsdb.yml


Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets