This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

These instructions will help you connect Bamboo to a PostgreSQL 8.2 database. PostgreSQL 8.0 and PostgreSQL 8.1 are no longer supported for use with Bamboo.

(info) Please note, the JDBC driver for PostgreSQL 8.2 (PostgreSQL Driver 8.4.x) is bundled with Bamboo. You do not have to download and install the driver.

1. Configuring PostgreSQL to accept remote TCP connections (remote PostgreSQL server only)

 

If you are connecting Bamboo to a remote PostgreSQL server (i.e. if your PostgreSQL server is not installed locally on your Bamboo server host system), you will need to configure your data/postgresql.conf and data/pg_hba.conf files to accept remote TCP connections from your Bamboo server's IP address.

The following PostgreSQL documentation contains information on the appropriate listen_addresses value in the postgresql.conf file as well as the pg_hba.conf file:

Once you have modified your data/postgresql.conf and data/pg_hba.conf files, you will need to restart PostgreSQL for your changes to take effect.

2. Connecting Bamboo to PostgreSQL

 

Bamboo provides two ways to connect to a PostgreSQL database — via JDBC or via a datasource. JDBC is generally simpler and is the recommended method.

Connecting via JBDC

To connect Bamboo to a Postgres database, via JDBC,

Run the Setup Wizard and choose the 'Custom Installation' method.

  1. At the 'Choose a Database Configuration' step, choose 'External Database' and select 'PostgreSQL 8.2 and above' from the list.
  2. The 'Select Database Connection' screen will appear. Select 'Direct JDBC connection'.
  3. The 'Setup JDBC Connection' screen will appear as shown in the screenshot below.
    • 'Driver Class Name' — Type the following: org.postgresql.Driver
    • 'Database URL' — Type the URL where Bamboo will access your database. For syntax, please see the Postgres JDBC driver documentation.
    • 'User Name' — Type the username that Bamboo will use to access your database.
    • 'Password' — Type the password (if required) that Bamboo will use to access your database.
  4. Select the 'Overwrite existing data' checkbox if you wish Bamboo to overwrite any tables that already exist in the database.
  5. Click 'Continue' to finish specifying your connection settings.

Screenshot 1: 'Setup JDBC Connection (Postgres)'


Connecting via a datasource

To connect Bamboo to a Postgres database, via a datasource,

  1. Configure a datasource in your application server (consult your application server documentation for details). For the syntax of the JDBC URL to use, please see the Postgres JDBC driver documentation.
  2. At the 'Choose a Database Configuration' step, choose 'External Database' and select 'PostgreSQL 8.2 and above' from the list.
  3. The 'Select Database Connection' screen will appear. Select 'Connect via a datasource (configured in the application server)'.
  4. The 'Setup Datasource Connection' screen will appear as shown in the screenshot below. In the 'JNDI name' field, type the JNDI name of your datasource, as configured in your application server.
    (warning) If java:comp/env/jdbc/DataSourceName doesn't work, try jdbc/DataSourceName (and vice versa).
  5. Select the 'Overwrite existing data' checkbox if you wish Bamboo to overwrite any tables that already exist in the database.
  6. Click 'Continue' to finish specifying your connection settings.

Screenshot 2: 'Setup Datasource Connection'