Installing the Viewpoint Development Portal 14.01

Extensibility
Extensibility covers the mechanisms by which you, as the user or developer, can extend the functionality of the Teradata Database, for example with the use of User Defined Functions, or UDFs.
Teradata Employee

Installing the Viewpoint Development Portal 14.01

This tutorial steps through the process to install the Teradata Viewpoint Development Portal, a cut-down version of Viewpoint, on your local desktop machine. These instructions are specifically for Windows, though the PDK has been validated to work on Mac OS X, Linux, and Solaris.

Step 1: Install Prerequisite Software

Java 1.6 SDK

Download and install the latest patch for "Java Platform Standard Edition Development Kit 6 (Java SE JDK 6)". After installing the Java SDK, add a JAVA_HOME environment variable that points to the installation location of the JDK. Add the Java JDK bin directory to the Windows PATH environment variable.

Ant 1.8.x

Download and install the latest patch for Ant 1.8. After installation, add Ant's bin directory to your Windows PATH environment variable.

PostgreSQL 9.1.x

Download the latest patch for PostgreSQL 9.1 and run the installer.

  1. On the "Password" screen, choose a secure password or accept the offer to allow the system to replace your weak password with a secure auto-generated one. If you use a weak password, the install will fail later with the inability to create the user. Be sure to remember the password for this superuser!
  2. Accept the default superuser (postgres and default port (5432).
  3. Uncheck "Launch Stack Builder at exit" on the last install screen.

Step 2: Setting Up the PostgreSQL Database

  1. Under the folder PostgreSQL is installed in, edit data\postgresql.conf:
    • Under QUERY TUNING, set constraint_exclusion = on and remove the "#" from the beginning of the line.
  2. Open a command prompt and navigate to the directory PostgreSQL is installed in, then enter these commands:
    cd bin
    createlang --username=postgres --password=<SERVICE_ACCOUNT_PASSWORD> plpgSQL template1

    Enter the PostgreSQL superuser password when prompted. If you receive a warning that the language plpgSQL already exists, you can ignore it and proceed.
  3. Run "pgAdmin III" from the Start menu under PostgreSQL.
  4. Double-click "PostgreSQL Database Server 9.1 (localhost:5432)" to connect, and enter the superuser password.
  5. Right-click on Login Roles, and select New Login Role...

  6. Create a role named viewpoint with its own password, that can create database objects. Note: Be sure to remember this password! This is the password that will be used for setting up the Teradata Viewpoint Portal in the following steps.

        
  7. Repeat Steps 5 and 6 to create another role name cam.  Be sure to remember the password also.
  8. Create a database named lportal with owner viewpoint 

  9. Repeat Step 8 to create databases named dcsdb, td_portal, and td_portlets (all with owner viewpoint).
  10. Repeat Step 8 to create a database named cam, with owner cam.
  11. Create a schema under dcsdb called tasm with owner viewpoint.  You can do this by expanding the tree for dcsdb created in Step 9.  Right click on Schemas and select New Schema.  Enter tasm as the Name and select viewpoint as the Owner.  Click OK to save.
  12. Repeat Step 11 and create another schema under dcsdb called tasmwd.
  13. Repeat Step 11 and create another schema under dcsdb called config.
  14. Repeat Step 11 and create another schema under dcsdb called aster.
  15. Repeat Step 11 and create another schema uder cam called config with owner cam.

The final results should look as follows:

Step 3: Unzip the Teradata Viewpoint PDK

  1. Download the Teradata Viewpoint PDK.
  2. Unzip the file, creating a folder called tdpdk-xx.xx.xx.xx, where the xx's indicate the version number. The rest of this tutorial assumes that this folder is located at C:\tdpdk-xx.xx.xx.xx, but it can be located elsewhere if desired.

Step 4: Configuring the Teradata Viewpoint Portal 

While configuring the Teradata Viewpoint Portal, you might need to modify JDBC URLs for the PostgreSQL database. If the PostgreSQL database is running on your local machine with the default port(5432), you do not need to make any changes to these URLs.

If the database is running on a separate system, you need to replace "%{activeDatabaseHost}" with the name of the database system. If you are using a custom PostgreSQL port number, replace "5432" with the custom port number. 

Note: If you are running PostgreSQL on your local system, you do not need to make any changes. "%{activeDatabaseHost}" will resolve to "localhost" by default.

Important: Do not make any other changes to these URLs.

Edit C:\tdpdk-xx.xx.xx.xx\viewpoint-portal\conf\server.xml

<!-- DCS datasource -->
<Resource name="jdbc/dcs"
auth="Container"
driverClass="org.postgresql.Driver"

jdbcUrl="jdbc:postgresql://%{activeDatabaseHost}:5432/dcsdb"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.teradata.viewpoint.cluster.datasource.c3p0.C3p0PromotionAwareDataSource"
connectionCustomizerClassName="com.teradata.viewpoint.cluster.datasource.c3p0.SetSearchPathCustomizer"
numHelperThreads="10"/>

<!-- TD Portlets datasource -->
<Resource name="jdbc/td_portlets"
auth="Container"
driverClass="org.postgresql.Driver"

jdbcUrl="jdbc:postgresql://%{activeDatabaseHost}:5432/td_portlets"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.teradata.viewpoint.cluster.datasource.c3p0.C3p0PromotionAwareDataSource"/>

<!-- TD Portal datasource -->
<Resource name="jdbc/td_portal"
auth="Container"
driverClass="org.postgresql.Driver"

jdbcUrl="jdbc:postgresql://%{activeDatabaseHost}:5432/td_portal"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.teradata.viewpoint.cluster.datasource.c3p0.C3p0PromotionAwareDataSource"/>

<!-- CAM datasource -->
<Resource name="jdbc/cam"
auth="Container"
driverClass="org.postgresql.Driver"
jdbcUrl="jdbc:postgresql://%{activeDatabaseHost}:5432/cam"
user="cam"
password="TDc1a2m3"
maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.teradata.viewpoint.cluster.datasource.c3p0.C3p0PromotionAwareDataSource"
connectionCustomizerClassName="com.teradata.viewpoint.cluster.datasource.c3p0.SetSearchPathCustomizer"
numHelperThreads="10"/>
  1. You need to provide the portal with the database address and port number, and the PostgreSQL username and password you set up earlier.
    <!-- Datasource used by the Liferay portal itself -->
    <Resource name="jdbc/LiferayPool"
    auth="Container"
    driverClass="org.postgresql.Driver"

    jdbcUrl="jdbc:postgresql://%{activeDatabaseHost}:5432/lportal"
    user="viewpoint"
    password="TDv1i2e3w4"

    maxPoolSize="100"
    minPoolSize="1"
    acquireIncrement="1"
    maxIdleTime="120"
    factory="org.apache.naming.factory.BeanFactory"
    type="com.teradata.viewpoint.cluster.datasource.c3p0.C3p0PromotionAwareDataSource"/>

  2. Next, configure the datasource for the Data Collection Service. If you want to connect to an existing DCS database, enter the DCS database login details here. Otherwise, make the same changes as above.

  3. You also need to modify the TD Portlets datasource. As before, provide the PostgreSQL system name and port, along with the username and password.
  4. Repeat Step 3 for the TD Portal datasource.
  5. You also need to modify the cam datasource. Make sure the PostgreSQL system name and port, along with the username and password is correct.

Edit the file C:\tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\config\viewpoint.properties

You need to uncomment (remove the # at the beginning of) some lines in viewpoint.properties. viewpoint.db.host and viewpoint.db.port only need to be uncommented if the database is not on your local system or if you're using a custom port for the database. viewpoint.db.username and viewpoint.db.password should be uncommented and modified to contain your PostgreSQL username and password.

pdk=true
#viewpoint.db.host=localhost
#viewpoint.db.port=5432
#lportal.db.name=lportal
#tdportal.db.name=td_portal
#tdportlets.db.name=td_portlets
#dcs.db.name=dcsdb

viewpoint.db.username=viewpoint
viewpoint.db.password=TDv1i2e3w4

Step 5: Running the Viewpoint setup script

  • Create an environment variable CATALINA_HOME that points to the path for the Teradata Viewpoint Portal (C:\tdpdk-xx.xx.xx.xx\viewpoint-portal).
  • Open a command prompt and execute the following commands:
C:
cd \tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\bin
setup.bat
  • If you do not have an existing DCS database to connect to, you will need to run the following script:
C:
cd \tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\bin
setup-dcs.bat

Step 6: Start Viewpoint

  • To start Viewpoint, open a command prompt and execute the following commands:
  • Allow the Viewpoint to start up fully (log output completes) before continuing on to the next step.
C:
cd \tdpdk-xx.xx.xx.xx\viewpoint-portal\bin
startup.bat

Step 7: Login to Viewpoint

  1. Start a web browser and connect to the portal using a URL as follows:
    • If you're accessing the portal from the system it's installed on with the default settings, the portal URL is http://localhost:8080.
    • If the Teradata Viewpoint Portal server is not running on your local machine, or if you've modified the port number, the URL is always in the form http://machinename:portnumber (replace machinename with the machine name and portnumber with the port number).
  2. Log in to the portal using username "admin" with the default password "teradata"(without the quotation marks).
  3. It is recommended that you change this password after logging in by clicking on Profile in the top right of the screen.

Troubleshooting

  • If your Viewpoint Portal does not start up, please go back through each of the steps to ensure you haven't missed anything.
  • Make sure you have the correct versions of Java, Ant, and Postgres installed.
  • Check the viewpoint.log or the output from the command window to see if there are any errors.  Search the Teradata Developer Exchange Viewpoint forums for any resolutions to the problems.
  • If you have any additional questions or comments, please post them on the Teradata Developer Exchange Viewpoint forums.
Tags (2)