Installing the Viewpoint Development Portal 13.0.1

Viewpoint
Teradata Viewpoint is Teradata's strategic and innovative SOV (single operational view) for Teradata DB, Aster, and HDP Hadoop systems management and monitoring that enables Teradata's Unified Data Architecture (UDA).
Teradata Employee

Installing the Viewpoint Development Portal 13.0.1

This tutorial steps through 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.5 SDK

Download and install "Java 2 Platform, Standard Edition 5.0". You'll want the JDK 5.0 without the NetBeans IDE or the Java EE. After installing the Java SDK, add a JAVA_HOME environment variable that points to the installation location of the JDK. Don't forget to add the Java JDK bin directory to the Windows PATH environment variable, as described in the Java installation instructions.

Ant 1.7.x

Download and install Ant. After installation, add Ant's bin directory to your Windows PATH environment variable.

PostgreSQL 8.1 or greater

Download PostgreSQL and run the installer.

  1. On the "Service configuration" screen, either 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.
    • Use the default superuser name of postgres and enter a password. Be sure to remember the password for this superuser!
    • If you want to connect to the database from another system, check the box "Accept connections on all addresses, not just localhost".
    • If there are separate Encoding fields for Server and Client they should both be SQL_ASCII.
    • If you change the PostgreSQL port number, you will need to remember the new port as well.
  2. 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 8.1 (localhost)" to connect, and enter the superuser password. Replace "8.1" with the version that is installed.
  5. Right-click on Login Roles, and select New Login Role...

  6. Create a role named viewpoint that can create database objects.



    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.  
  8. Create a database named lportal with owner viewpoint

  9. Repeat the previous two steps to create databases named dcsdb, td_portal, and td_portlets (all with owner viewpoint).

Step 3: Unzip the Teradata Viewpoint PDK

  1. Download the Teradata Viewpoint PDK 13.0.1. The download consists of two zip files, one containing the main download, and the other containing certain open-source components.
  2. Unzip the first 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.
  3. Then unzip the second zip (containing the open-source components), and copy the contents into C:\tdpdk-xx.xx.xx.xx.

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 "localhost" with the name of the database system. If you are using a custom PostgreSQL port number, replace "5432" with the custom port number.

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://localhost:5432/dcsdb"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"/>

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

jdbcUrl="jdbc:postgresql://localhost:5432/td_portlets"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"/>
  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://localhost:5432/lportal"
    user="viewpoint"
    password="TDv1i2e3w4"

    maxPoolSize="100"
    minPoolSize="1"
    acquireIncrement="1"
    maxIdleTime="120"
    factory="org.apache.naming.factory.BeanFactory"
    type="com.mchange.v2.c3p0.ComboPooledDataSource"/>

  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.

As in server.xml, you need to specify the PostgreSQL system name and port, as well as the username and password.

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

jdbcUrl="jdbc:postgresql://localhost:5432/td_portal"
user="viewpoint"
password="TDv1i2e3w4"

maxPoolSize="100"
minPoolSize="1"
acquireIncrement="1"
maxIdleTime="120"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource" />

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) several 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.

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

C:
cd \tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\bin
setup.bat
  1. Create an environment variable CATALINA_HOME that points to the path for the Teradata Viewpoint Portal (C:\tdpdk-xx.xx.xx.xx\viewpoint-portal).
  2. Open a command prompt and execute the following commands:

Step 6: Start Viewpoint

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

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.
Tags (2)
9 REPLIES

Re: Installing the Viewpoint Development Portal 13.0.1

What is the purpose of postgre installation? I'm thinking it might have something to do with the skewedsessions tutorial which says it needs a working Data Collection Service(DCS) to display meaningful data. How exactly does this work?
N/A

Re: Installing the Viewpoint Development Portal 13.0.1

Hi Neil,

First of all, thanks for a great post.

I am trying to install Viewpoint PDK on a local machine by following this tutorial, but I'm experiencing some small problems.
Everything went smooth until the step 6. Tomcat doesn't want to start :(

I'm installing Viewpoint on Windows XP.
Java - JDK 1.6.0_11
Ant - 1.7.1
Postgres - 8.4 - installed on the local machine on default port

I have done all the changes mentioned in C:\tdpdk-xx.xx.xx.xx\viewpoint-portal\conf\context.xml and C:\tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\config\viewpoint.properties, so they correspond to my environment.

Viewpoint setup finished successfully and when I tried to run Viewpoint, Tomcat started complaining. Here is the log:

WARN 18 Aug 2009 17:27:35,669 [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2] [com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(1804)] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@10df4e2 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "viewpoint"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:275)

I doublechecked the password for "viewpoint" user in context.xml and viewpoint.properties and I can confirm that the wrong password is not an issue here.

Do you have any idea what can be the problem?

Thanks,
Igor
Teradata Employee

Re: Installing the Viewpoint Development Portal 13.0.1

Igor, nine times out of ten this is a bad password issue. Are you 101% certain that the password matches exactly the pgsql "viewpoint" role's password? (not a Viewpoint portal user you may have created). If yes, get back to me...
Teradata Employee

Re: Installing the Viewpoint Development Portal 13.0.1

@MSkiLLz: i believe this was already answered in the forums, but for the record, Viewpoint uses postgres for its own runtime needs (that is, Viewpoint does not store its own internal data in a Teradata instance, as this would prevent it from monitoring that instance, e.g. if the instance is down), and the DCS stores its data collection in postgres also, not in Teradata (for the reason just mentioned, amongst others).
N/A

Re: Installing the Viewpoint Development Portal 13.0.1

Hi Neil, you were right... I was playing with couple of versions of configuration files and I left old password in one entry in server.xml (old password was similar to the new one). It works now!

Can you please recommend me a development environment for Viewpoint portlet development (IDE, Plugins etc)?

Thanks again,
Igor
Teradata Employee

Re: Installing the Viewpoint Development Portal 13.0.1

Igor, Eclipse and IntellJ are the main IDEs used by our own developers. We'll look into adding a guide for how to develop/debug with one or more of those IDEs.

Re: Installing the Viewpoint Development Portal 13.0.1

I was doing step 5:
C:
cd \tdpdk-xx.xx.xx.xx\viewpoint-portal\setup\bin
setup.bat

and I am getting this message, does anyone knows what it means? thanks...

c:\tdpdk-13.03.00.05\viewpoint-portal\setup\bin> setup.bat
Setting up Viewpoint databases.
Updating lportal schema.
Applying lportal schema update 1.
Lportal schema updated.
Creating tdportal schema.
Tdportal schema created.
Updating DCS config schema.
DCS config schema updated.
Updating DCS data schema.
DCS data schema updated.
Creating tasm schema.
Update of DCS schema failed: StatementCallback; uncategorized SQLException for
SQL [SET search_path = tasm]; SQL state [3F000]; error code [0]; ERROR: schema "
tasm" does not exist; nested exception is org.postgresql.util.PSQLException: ERR
OR: schema "tasm" does not exist
DCS schema updates have been rolled back.
Setup of Viewpoint database failed. Reverting changes.
dfu
Teradata Employee

Re: Installing the Viewpoint Development Portal 13.0.1

This is the reference article for 13.01 which has been superseded. I presume you are using PDK 13.03? In the PDK install article for 13.03 it states:

Step2:
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.

Re: Installing the Viewpoint Development Portal 13.0.1

This is great, everything is working now. Thanks for the help.

Does anyone have a sample application to connect viewpoint into Teradata DB?