Initialize

Use the following steps to initialize the databases of the .

NOTE: These steps assume that the is the host of these databases. Please modify the following steps if you are connecting to databases on other nodes.

Pre-requisites:

PostgreSQL

NOTE: The following steps are for configuring PostgreSQL 9.6.


  1. For CentOS 7.x:

    sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb


  2. For CentOS 6.x, RHEL 6.x:

    sudo service postgresql-9.6 initdb


  3. For RHEL 7.x:

    sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb


  4. For Ubuntu 14.04 / 16.04:

    pg_createcluster -d /var/lib/postgresql/9.6/main 9.6 main


Verify datastyle value

NOTE: This configuration step only applies if the are installed on a PostgreSQL instance that was not created as part of a installation.

Please verify the datestyle setting for your PostgreSQL instance.

Steps:

  1. Execute the following in PostgreSQL:

    trifacta=# show datestyle;
     DateStyle
    -----------
     ISO, MDY
    (1 row)


  2. If the first value is not ISO, please edit the following file (PostgreSQL 9.6):
    1. RHEL/CentOS:  /var/lib/pgsql/9.6/data/postgresql.conf
    2. Ubuntu:  /etc/postgresql/9.6/main/postgresql.conf
  3. Set the datestyle property to the following:

    datestyle = 'ISO,MDY';


  4. Save the file. Restart the .

MySQL

No additional steps are required to initialize the databases in MySQL.

Set custom database parameters

Use the following steps to set custom database names, usernames, and passwords in the :

  1. Edit 

  2. For each database below, you can review the database name, username, and password. 

    DatabasePropertyNotes
    Main databasewebapp.database.name 
     webapp.database.username 
     webapp.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     webapp.database.typeChange this value only if you are installing the databases in a non-PostgreSQL environment.
    Jobs databasebatch-job-runner.database.name 
     batch-job-runner.database.username 
     batch-job-runner.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     batch-job-runner.database.typeChange this value only if you are installing the databases in a non-PostgreSQL environment.
    Scheduling databasescheduling-service.database.name 
     scheduling-service.database.username 
     scheduling-service.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     scheduling-service.database.type

    Change this value only if you are installing the databases in a non-PostgreSQL environment.

    NOTE: H2 database type is used for internal testing. It is not a supported database.


    Time-Based Trigger databasetime-based-trigger-service.database.name 
     time-based-trigger-service.database.username 
     time-based-trigger-service.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     time-based-trigger-service.database.type

    Change this value only if you are installing the databases in a non-PostgreSQL environment.

    NOTE: H2 database type is used for internal testing. It is not a supported database.


    Configuration Service databaseconfiguration-service.database.name 
     configuration-service.database.username 
     configuration-service.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     configuration-service.database.type

    Change this value only if you are installing the databases in a non-PostgreSQL environment.

    NOTE: H2 database type is used for internal testing. It is not a supported database.


    Artifact Storage Service databaseartifact-storage-service.database.name 
     artifact-storage-service.database.username 
     artifact-storage-service.database.passwordYou should change the default password. This change must also be applied on the database server. See Change Database Passwords for PostgreSQL. See Change Database Passwords for MySQL.
     artifact-storage-service.database.type

    Change this value only if you are installing the databases in a non-PostgreSQL environment.

    NOTE: H2 database type is used for internal testing. It is not a supported database.




     

  3. Make changes in the file as needed and save.

Apply customizations on upgrade

If you have customized database properties, you must apply the edits from the new sample file to the existing configuration file after you have upgrade the .

If you are using all defaults, you can just overwrite the existing file with the new version's sample file. 

PostgreSQL:

  1. Locate the sample Postgres configuration file:

    /opt/trifacta/bin/setup-utils/db/pg_hba.conf.SAMPLE


  2. If you are upgrading and have customizations in your existing version, you must apply the edits in the above to the following file. Otherwise, overwrite the following file with the above one based on your operating system:
    1. CentOS/RHEL dir: /var/lib/pgsql/9.6/data/pg_hba.conf 
    2. Ubuntu dir: /etc/postgresql/9.6/main/pg_hba.conf 

  3. From the SAMPLE file, copy the following declarations and paste them into the production pg_hba.conf file above any other declarations:

    NOTE: You can substitute different database usernames and groups for the ones listed below (trifacta and trifacta). These values may be needed for other configuration.

     

    1. :

      local   trifacta         trifacta                               md5
      host    trifacta         trifacta         127.0.0.1/32          md5
      host    trifacta         trifacta         ::1/128               md5


    2. Jobs database:

      local   trifacta-activiti         trifactaactiviti                               md5
      host    trifacta-activiti         trifactaactiviti         127.0.0.1/32          md5
      host    trifacta-activiti         trifactaactiviti         ::1/128               md5



    3. Scheduling database: 

      local   trifactaschedulingservice         trifactaschedulingservice                               md5
      host    trifactaschedulingservice         trifactaschedulingservice         127.0.0.1/32          md5
      host    trifactaschedulingservice         trifactaschedulingservice         ::1/128               md5

      For more information on scheduling, see Configure Automator

    4. Time-based Trigger database:

      local   trifactatimebasedtriggerservice         trifactatimebasedtriggerservice                               md5
      host    trifactatimebasedtriggerservice         trifactatimebasedtriggerservice         127.0.0.1/32          md5
      host    trifactatimebasedtriggerservice         trifactatimebasedtriggerservice         ::1/128               md5

      For more information on scheduling, see Configure Automator.

    5. Configuration Service database:

      local   trifactaconfigurationservice         trifactaconfigurationservice                               md5
      host    trifactaconfigurationservice         trifactaconfigurationservice         127.0.0.1/32          md5
      host    trifactaconfigurationservice         trifactaconfigurationservice         ::1/128               md5


    6. Artifact Storage Service database:

      local   trifactaartifactstorageservice         trifactaartifactstorageservice                               md5
      host    trifactaartifactstorageservice         trifactaartifactstorageservice         127.0.0.1/32          md5
      host    trifactaartifactstorageservice         trifactaartifactstorageservice         ::1/128               md5


    7. Save the file.

  4. Restart the databases:

    1. If you are have also restarted the operating system, please execute the following first, followed by the O/S-specific commands:

      NOTE: This command is valid only if the Postgres DB is also hosted in the .


      chkconfig postgresql-9.6 on

       

    2. CentOS/RHEL:

      sudo service postgresql-9.6 start


    3. Ubuntu:

      sudo service postgresql start


MySQL:

Upgrading MySQL versions is not supported in this release.

Next Steps

  1. If the configuration files indicate that the databases are listening on a port other than the default, this port number must be applied within the  configuration. For more information, see Change Database Port.
  2. If you are using non-default usernames and passwords, they must must be applied within the  configuration. For more information, see Change Database Passwords for PostgreSQL.
  3. When you have completed the above configuration, you can create the databases and their roles (users) and perform additional configuration. See Create Databases and Users.