This guide explains how to install and configure the Elastic Marts Builder portlet and its utilities.
Extract the zip file to /<your-install-path>/elasticMartsBuilder/.
Run the following command:
The contents of the extracted zip file should look like:
/<your-install-path>/elasticMartsBuilder/Documentation/Elastic Marts Builder - User Guide.pdf
The parameters in the database installation script need to be modified to your database system settings. Open the DB_Sandbox_Install.bteq script and modify the parameters. Note: You must configure the values that are marked required.
Specify the admin user (i.e. DBC) used to create the Elastic Marts Builder database structure and maintenance tables. Note: The admin user must have the following two permissions:
Replace DBS_Name with the name of the target DB system. This value is found in the BTEQ file (Step 1). Replace super_user and super_user_password with the correct login/password of the admin user that will be used to create the database structure. This value is found in the BTEQ file (Step 1).
Create the Elastic Marts Builder Admin account. This admin user will house the maintenance tables and Elastic Marts that are to be created. This admin user should get assigned enough PERM space to store the created elastic marts as well as any maintenance tables/objects required by the admin user.
This step creates the database that will house the elastic marts. The database resides under the Elastic Marts Builder Admin account.
This step grants permissions on any databases/tables that all elastic marts will have access to. For security reasons, this should be limited to SELECT permissions.
You must have Bteq installed on your machine to run the installation script. Change directories to where the bteq script DB_Sandbox_Install.bteq is extracted. Copy/paste this command:
bteq < DB_Sandbox_Install.bteq > output.txt
The output of the script will be stored in a text file called output.txt.
The properties file is located in this path: <your-install-path>/elasticMartsBuilder/Properties/sandbox.properties
Open the sandbox.properties file and modify it with the correct values. See the table below for field descriptions and required fields.
|dbssandbox.commons.db.netlog||Teradata database server name||Yes||Replace <db_server_name> with the correct value.|
|dbssandbox.commons.db.classforname||Teradata jdbc driver class for name||Default: com.teradata.jdbc.TeraDriver|
|dbssandbox.commons.db.jdbc.url||Teradata jdbc connection URL||Yes||Replace <db_server_name> with the correct value.|
|dbssandbox.commons.db.admin||Database user with rights to create the parent database||Yes||Replace <db_admin_user> with the correct value.|
|dbssandbox.commons.db.password||Password for the user defined above||Yes||Replace <db_admin_password> with the correct value.|
|dbssandbox.commons.db.encoding||Encoding type||Default: utf8|
|dbssandbox.commons.db.upload.dir||Temporary files system for upload functionality||Yes||Replace <server_upload_dir> with the correct value. Directories must be created in advance and terminated with a forward slash "/".|
|dbssandbox.commons.db.download.dir||Temporary files system for download functionality||Yes||Replace <server_download_dir> with the correct value. Directories must be created in advance and terminated with a forward-slash "/".|
|dbssandbox.commons.server.name||Viewpoint Portal server name or ip address of the Viewpoint Portal is deployed||Yes||Replace <viewpoint_server_name> with the correct value.|
|dbssandbox.commons.server.port||HTTP port where Viewpoint Portal is running||Default: 80|
|dbssandbox.commons.mail.server||Server mail relay||Yes||Replace <smtp_server_name> with the correct value.|
|dbssandbox.commons.mail.port||Server mail relay port||Default: 25|
|dbssandbox.commons.mail.from||Email address for from which e-mails will be sent||Yes||Replace <user_name>@<company_name> with the correct value.|
|dbssandbox.commons.mail.from.userid||E-mail user account from which e-mails will be sent||Yes||Replace <user_name> with the correct value.|
|dbssandbox.portlets.maxpermlimit||Default permanent space limit for sandbox user db in bytes||Default: 1073741824 (1GB)|
|dbssandbox.commons.mail.from.password||Password for the e-mail user account||Yes||Replace <user_name_password> with the correct value.|
|dbssandbox.commons.mailmanager.switch||Turns email on/off||Default: on|
|dbssandbox.portlets.uploadsizelimit||Default size limit for file uploads in bytes||Default: 26214400 (25MB)|
Once you are done modifying the sandbox.properties file, copy it to $CATALINA_HOME/bin using the command below:
cp sandbox.properties $CATALINA_HOME/bin
Change directory to /<your-install-path>/elasticMartsBuilder/Portlets. Copy the two portlet war files to the Viewpoint portlet deployment directory using the commands below:
cp DataUploadPortlet.war $CATALINA_HOME/viewpoint-working/liferay-autodeploy
cp DownloadServletManager.war $CATALINA_HOME/webapps
Once the war files are placed in this file system location, Viewpoint will automatically deploy them. This may take a minute or two.
The nightly maintenance script will send an e-mail to owners of expiring elastic marts asking to renew or delete their mart. The script will also delete all expired elastic marts. The script also cleans out the upload/download directories and removes temporary files.
Create a symbolic link to $CATALINA_HOME/bin in order for script to correctly identify the location of the sandbox.properties file. To do so run the follow commands:
mkdir \-p /var/opt/teradata
ln \-s $CATALINA_HOME/bin /var/opt/teradata/elastic_mart_builder
Edit the .elasticmartsbuilderprofile file located in: /<your-install-path>/elasticMartsBuilder/Properties/
Change <replace-with-your-viewpoint-server-location> with the actual location of your Viewpoint server. Typically it would be /var/opt/teradata/viewpoint.
(Optional - Set JAVA_HOME location)
If your machine has multiple Java versions installed, you will need to point the nightly maintenance script to use JDK 1.5 (if that is not already the default).
Add the following line to the top of .elasticmartsbuilderprofile:
export JAVA_HOME = <your-jdk1.5-install-location>
This will drop expired sandboxes and clean up the temporary files on the system.
00 00 * * * source /<your-install-path>/elasticMartsBuilder/Properties/.elasticmartsbuilderprofile;ls -l;java com.teradata.dbsandbox.commons.sandboxapi.admin.DBSandboxAdminDriver > /root/output.txt
You should now be ready to use the Elastic Marts Builder portlet.