5.6 Installing and Configuring the Orchestration Server for Use with a Local PostgreSQL Audit Database

When you install the Cloud Manager Orchestration Server, you can optionally point it to a relational database that you can use to audit the work done by the product. There is no relational database management system bundled with the product, but because the Orchestration Server is supported by default on SLES 10 SP3, SLES 10 SP4, or SLES 11 SP1, you can use a PostgreSQL database and configure it for use with Orchestration Server auditing. If you want to use some other database, you must configure it separately for use with Cloud Manager.

5.6.1 Installing the PostgreSQL Package and Dependencies

NOTE:We recommend that you install the PostgreSQL package on a SLES 10 SP3, SLES 10 SP4, or a SLES 11 SP1 server that is different from the server where you install the Cloud Manager Orchestration Server. This ensures an adequate amount of space for running the server as the database is used.

For more information, see Section 5.2, Configuring PostgreSQL to Accept Remote Database Connections.

If your SLES 10 SP3.,SLES 10 SP4, or SLES 11 SP1 machine does not have the PostgreSQL package installed and running, use YaST to search for postgresql-server, then install the package and its dependencies.

You can also run the following command from the bash prompt:

yast2 -i postgresql-server

When PostgreSQL is installed, you need to create the default database and start it. Use the following commands:

su - postgres

initdb

pg_ctl start

These commands create or update the PostgreSQL privilege database and install the prepared tables. For more detail about what you will see when you run these commands, see Detail.

NOTE:You cannot run the pg_ctl command as root. You must first change to the superuser for PostgreSQL (su - postgres). Failure to issue this command first results in the following messages:

# pg_ctl start
pg_ctl: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.

5.6.2 Configuring PostgreSQL to Accept Local Database Connections

To configure the PostgreSQL database to accept remote database connections, you need to change the following line in the /var/lib/pgsql/data/pg_hba.conf file:

host    all      all         0.0.0.0/0      ident sameuser

The line should be changed as follows:

host    all      all         0.0.0.0/0      trust

5.6.3 Logging in Locally to the PostgreSQL Database

When you have installed the database, the next step is to check that you can connect to the database on the database host. The default admin username is postgres. Use the following commands to set up a password for the postgres user on the database host machine:

psql

NOTE:Remember the password. You need it to log in to the database later.

Running this command results in a screen like this:

Welcome to psql 8.1.11, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=# alter user postgres password 'pass';
ALTER ROLE
postgres=#

NOTE:This is the message you would see if you are logging in to PostgreSQL on a SLES 10 SP3 or SLES 10 SP4 server. If logging in to Postgres on a SLES 11 SP1 server, you would see a message indicating a login to psql 8.3.9.

5.6.4 Installing and Configuring the Local Orchestration Server Audit Database

When you enable and configure Orchestration Server auditing, you create a small custom database and a simple schema that persists all of the Orchestration Server jobs that have been run, along with their parameters.The database also maintains the login or logout activity of the Cloud Manager users and resources.

The easiest way to configure the audit database is to do so when you configure the Orchestration Server. Use the following procedure to configure the database.

NOTE:The questions presented in the text-based config script are shown here, but the questions presented in the graphical Configuration Wizard are similar.

  1. After you have installed the Cloud Manager packages you want, run the configuration (either the config script or the graphical Configuration Wizard) until you see the following question:

    Enable Auditing (y/n) [no]:
    
  2. Enter yes to answer this question. The following question displays:

    Configure Audit DB (y/n) [no]:
    
  3. Enter yes to answer this question. The following question displays:

    Jdbc URL [jdbc:postgresql://localhost/]:
    
  4. Press Enter to accept the default (jdbc:postgresql://localhost/).

    This is a standard JDBC URL because this is a Java server that uses JDBC for the interface database. The URL must be properly formed, with a slash and without a database name at the end.

    The following prompt is displayed:

    DB Admin Username:
    
  5. Specify the PostgreSQL database administrator username, then press Enter.

    This is the same name that was specified when PostgreSQL was installed. In most instances, the username is postgres.

    The following prompt is displayed:

    DB Admin Password:
    
  6. Specify the PostgreSQL database administrator password, then press Enter.

    The following prompt is displayed:

    Retype password:
    
  7. Retype the database administrator password to verify it, then press Enter. The following prompt is displayed:

    ZOS Audit Database Name [zos_db]:
    
  8. Specify the name of the database you want to create for Orchestration Server auditing, then press Enter. The following prompt is displayed:

    Audit DB Username:
    
  9. Specify the name you want to use for the PostgreSQL database user that will be used by the Orchestration Server for auditing (that is, a user with Read and Write privileges, not the administrator), then press Enter. The following prompt is displayed:

    Audit DB Password:
    
  10. Specify the password you want to use for authentication by the designated PostgreSQL database user, then press Enter. The following prompt is displayed:

    Retype password:
    
  11. Retype the password, then press Enter.

After you retype the new audit database password, the configuration interview for the Orchestration Server continues normally.