Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some of the test frameworks use python. For example, see incubator-trafodionsee trafodion/dcs/src/test/pytests/README.rst

...

If you already have an existing set of ssh keys

Simply copy both the id_rsa.pub and id_rsa to your ~/.ssh directory.c. Then, do the following to modify your ssh environment.

 

Code Block
languagebash
titleExample: Add ssh keys
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa
echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config
chmod go-w ~/.ssh/config
chmod 755 ~/.ssh; chmod 640 ~/.ssh/authorized_keys;

 

...

Do the following:

Code Block
languagebash
titleExample: Generate ssh Keys
rm -rf ~/.ssh
ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/id_rsa.pub
echo "NoHostAuthenticationForLocalhost=yes" >>~/.ssh/config
chmod go-w ~/.ssh/config
chmod 755 ~/.ssh; chmod 640 ~/.ssh/authorized_keys;

 

Start a ssh agent

An ssh agent remembers the passphrase. Do the following:

...

System Limits

Please check that the system limits in your environment are appropriate for Apache Trafodion. If they are not, then you will need to increase the limits or Trafodion cannot start.

Use the following command to check your system limits:

 

Code Block
languagebash
ulimit -a

The recommended settings are as follows:

 

Code Block
languagebash
titleRecommended Limit Settings
core file size             (blocks, -c) 1000000
data seg size              (kbytes, -d) unlimited
scheduling priority        (-e) 0
file size                  (blocks, -f) unlimited
pending signals            (-i) 515196
max locked memory          (kbytes, -l) 49595556
max memory size            (kbytes, -m) unlimited
open files                 (-n) 32000
pipe size                  (512 bytes, -p) 8
POSIX message queues       (bytes, -q) 819200
real-time priority         (-r) 0
stack size                 (kbytes, -s) 10240
cpu time                   (seconds, -t) unlimited
max user processes         (-u) 267263
virtual memory             (kbytes, -v) unlimited
file locks                 (-x) unlimited
To change your limits settings, you typically edit /etc/security/limits.conf and reboot the server.
Code Block
languagebash
titleExample: /etc/security/limits.conf settings
# Changes added for the Trafodion Test Environment
*                -       core            1000000
*                -       nproc           267263
*                -       nofile          32000
*                -       sigpending      267263515196
*                -       memlock         26726349595556
*                -       stack           10240

Tip
titleTIP

Some CentOS/RedHat versions define nproc limits in  /etc/security/limits.d/90-nproc.conf, too. If so, you can simply delete this file before rebooting the server.

Verify Network Setup

Hadoop services typically require a functional resolution fully-qualified network domain name (FQDN) to function properly. The FQDN network configuration is located in /etc/hosts while name resolution is configured using /etc/resolv.conf.

 

Find FQDN

The hostname utility allows you to find the short name as well as the FQDN for your server.

 

Code Block
languagebash
titleFind FQDN
$ # Get current hostname
$ hostname
box01

$ # Get fully-qualified domain name for server
$ hostname --fqdn
box01.trafodion.org
$

Test FQDN

The ssh utility allows you to test whether the configured correctly.

 

Code Block
languagebash
titleExample: Failed FQDN Resolution
$ ssh box01.trafodion.org
# Command hangs, ctrl-c to break
$

 

Modify FQDN Resolution

 

Info
titleNOTE

Some of the steps in this subsection requires root access to change configurations and run utilities.

 

Name resolution is performed per the configuration in /etc/resolv.conf while /etc/hosts configures the FQDN.

Code Block
languagebash
titleExample: Incompatible /etc/resolve.conf <-> /etc/hosts settings
$ # Check FQDN resolution (fail example)
$ host -T
Host box01.trafodion.org not found: 5(REFUSED)
# Examine issue
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.2.15   box01.trafodion.org box01

In this example, the name server is in a different domain than box01.trafodion.org.

Code Block
languagebash
titleExample: Check Network Interface Configuration
$ # Check interface configuration
$ sudo ifconfig
eth3      Link encap:Ethernet  HWaddr 08:00:27:D0:B7:40
          inet6 addr: fe80::a00:27ff:fed0:b740/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1703 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3778 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:195684 (191.0 KiB)  TX bytes:1290492 (1.2 MiB)

eth4      Link encap:Ethernet  HWaddr 08:00:27:A5:29:28
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fea5:2928/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:282605 errors:0 dropped:0 overruns:0 frame:0
          TX packets:148931 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:290384816 (276.9 MiB)  TX bytes:18066069 (17.2 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:263 errors:0 dropped:0 overruns:0 frame:0
          TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:41810 (40.8 KiB)  TX bytes:41810 (40.8 KiB)

 

The server is running on an 192.168.1.x network. Therefore, this example shows an issue with the /etc/hosts configuration. Correct the setting as root editing the /etc/hosts. In this example, the eth4 address is 192.168.1.12 yielding the following result.
Code Block
languagebash
titleExample: Verify FQDN Resolution Changes
$ cat /etc/hosts
127.0.0.1    localhost localhost.localdomain localhost4 localhost4.localdomain4
::1          localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.12 box01.trafodion.org box01
$ ssh box01.trafodion.org
The authenticity of host 'box01.trafodion.org (192.168.1.12)' can't be established.
RSA key fingerprint is 88:f7:90:fe:35:76:10:92:cf:6d:c4:60:ca:b9:43:9f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'box01.trafodion.org,192.168.1.12' (RSA) to the list of known hosts.
Last login: Tue Jan 26 13:41:58 2016 from localhost
$ exit
$ ssh box01
The authenticity of host 'box01 (192.168.1.12)' can't be established.
RSA key fingerprint is 88:f7:90:fe:35:76:10:92:cf:6d:c4:60:ca:b9:43:9f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'box01' (RSA) to the list of known hosts.
Last login: Tue Jan 26 14:07:09 2016 from box01.trafodion.org
$ exit
$

Repeat for each server in your environment to ensure proper FQDN resolution before installing Hadoop.

...

 

Your installation approach depends on whether you already have installed Hadoop.

Anchor
create-test-pre-installed-hadoop
create-test-pre-installed-hadoop

Pre-Installed Hadoop

Info
titleNOTE

Currently, Trafodion requires:

  • Operating System:
    • 64-bit Red Hat Enterprise Linux (RHEL) 6.5, 6.6, and 6.7
    • SUSE SLES 11.3
  • Hadoop:
    • Cloudera CDH 5.2+
    • Hortonworks HDP 2.2+
    • Apache HBase 1.0+


Build Binary tar Files

Build the Trafodion binary tar files.

 

Code Block
languagebash
titleExample: Build Trafodion Binary tar Files
cd <Trafodion source directory>
make package-all

 

For more information, refer to Build Trafodion Components in the Build Source chapter.

 

Install Trafodion

The binary artifacts built above include the following tars and RPMs.   Note that the ambari server RPM is under the RH* directory. It varies depending ont he Redhat version hence we will have one version for each RH version that we support. These are binaries that will be need to do the install using Ambari install or the Python Installer. The details of how to use these installers are detailed in the Provisioning Guide : Apache Trafodion Provisioning Guide

Code Block
languagebash
titleExample: Build Trafodion Binary tar Files
 
<Trafodion home directory>/distribution> ls
apache-trafodion_clients-2.1.0-RH6-x86_64-debug.tar.gz
apache-trafodion_installer-2.1.0-incubating.tar.gz
apache-trafodion_pyinstaller-2.1.0-incubating.tar.gz
apache-trafodion-regress.tgz
apache-trafodion_server-2.1.0-RH6-x86_64-debug.tar.gz
dcs-tests.tgz
phoenix-tests.tgz
RH6
traf_ambari-2.1.0-1.noarch.rpm
<Trafodion home directory>/distribution/RH6 > ls
apache-trafodion_server-2.1.0-devel.x86_64.rpm


Anchor
create-test-local-hadoop
create-test-local-hadoop

Local Hadoop

Use the following

To be written.

Anchorcreate-test-local-hadoopcreate-test-local-hadoop

Local Hadoop

Use the following instructions to install a local Hadoop environment based on Cloudera archives.

 

Run install_local_hadoop

The install_local_hadoop script downloads compatible versions of Hadoop, HBase, Hive, and MySQL based on the Cloudera archives. Then, it starts Trafodion.

Info
titleTIP

install_local_hadoop downloads Hadoop, HBase, Hive, and MySQL jar files from the Internet. To avoid this overhead, you can download the required files into a separate directory and set the environment variableMY_LOCAL_SW_DIST to point to this directory.

TODO: NEED EXAMPLE HERE

CommandUsage
install_local_hadoopUses default ports for all services.
install_local_hadoop -p fromDisplayStart Hadoop with a port number range determined from the DISPLAY environment variable.
install_local_hadoop -p randStart with any random port number range between 9000 and 49000.
install_local_hadoop -p <port>Start with the specified port number.
For a list of ports that get configured and their default values, please refer to Port Assignments on the Trafodion web site.

Sample Procedure

  1. Start a new ssh session and ensure that the Trafodion environmental variables are loaded.

    Code Block
    languagebash
    cd <Trafodion source directory>
    source ./env.sh
    Code Block
    languagebash
    titleExample: Load Environment Variables
    cd mysource/incubator-trafodion
    source ./env.sh
  2. Install the Hadoop software.

    Code Block
    languagebash
    cd $MY$TRAF_SQROOTHOME/sql/scripts
    install_local_hadoop
    ./install_traf_components
    Code Block
    languagebash
    titleExample: Install Hadoop Software
    $ cd $MY$TRAF_SQROOTHOME/sql/scripts
    $ install_local_hadoop
    Checking for existing Hadoop processes...
    The testware tpcds_kit.zip does not exist and will not be installed
    This testware is needed to run developer HIVE regression tests
    .
    .
    .
    Installed directory size and name = 2.7G        /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/sql/local_hadoop
    
    Setup is complete. You can use the convenience scripts starting with sw... located in /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/sql/scripts.
    $ ./install_traf_components
    
    Installing and configuring DCS, REST, TRAFCI & Phoenix tests for Trafodion...
    
    Environment used for core, DCS, REST and Phonenix ...
    .
    .
    .
    Configuration scripts for DCS, REST, TRAFCI and Phoenix test are set up
    
       Open a new session and start Trafodion by executing sqgen and sqstart scripts
    $
  3. Verify installation.

    Code Block
    languagebash
    $ swstatus
    6 java servers and 2 mysqld processes are running
    713   NameNode
    19513 HMaster
    1003  SecondaryNameNode
    838   DataNode
    1173  ResourceManager
    1298  NodeManager

    The following Java servers should be running:

    • NodeManager (Yarn)

    • ResourceManager (Yarn)

    • NameNode (HDFS)

    • SecondaryNameNode (HDFS)

    • DataNode (HDFS)

    • HMaster (HBase)

      In addition, 2 mysqld processes should be running.

      Info

      The Hadoop enviroment is install in: $MY_SQROOT/sql/local_hadoop. The log files are located in$MY_SQROOT/sql/local_hadoop/log and in the Hadoop components' log directories. If a service is not started, then look in the associated log files for the issue and search for the error string for possible solutions to the issue; these are Hadoop issues and are therefore outside the scope of this guide.

  4. Run sqgen — sqgen creates the Trafodion configuration files. Do the following:
    1. Start a new terminal window for this step.

    2. Do the following:

      Code Block
      languagebash
      cd <Trafodion source directory>
      source ./env.sh
      cd $MY_SQROOT/etc
      # delete ms.env, if it exists
      rm ms.env
      cd $MY_SQROOT/sql/scripts
      sqgen
      Code Block
      languagebash
      titleExample: Run sqgen
      $ cd mysource/incubator-trafodion
      $ source ./env.sh
      $ cd $MY_SQROOT/etc
      # delete ms.env, if it exists
      $ rm ms.env
      $ cd $MY_SQROOT/sql/scripts
      $ sqgen
      Workstation environment - Not a clustered environment
      
      Generating SQ environment variable file: /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/etc/ms.env
      
      Note: Using cluster.conf format type 2.
      .
      .
      .
      ***********************************************************
       Updating Authentication Configuration
      ***********************************************************
      Creating folders for storing certificates
      
      $
  5. Start Trafodion.

    Code Block
    languagebash
    titleExample: sqstart
    $ sqstart
    Checking orphan processes.
    Removing old mpijob* files from /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/tmp
    
    Removing old monitor.port* files from /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/tmp
    
    Executing sqipcrm (output to sqipcrm.out)
    Starting the SQ Environment (Executing /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/sql/scripts/gomon.cold)
    Background SQ Startup job (pid: 15755)
    .
    .
    .
    You can monitor the SQ shell log file : /home/trafdeveloper/mysource/incubator-trafodion/core/sqf/logs/sqmon.log
    
    Startup time  0 hour(s) 0 minute(s) 59 second(s)
    $
  6. Initialize Trafodion

The final step is to initialize the Trafodion database.

Code Block
languagebash
titleExample: Initialize Trafodion
$ sqlci
Apache Trafodion Conversational Interface 1.3.0
Copyright (c) 2015 Apache Software Foundation
>>initialize trafodion;

--- SQL operation complete.
>> exit;

End of MXCI Session

$

 

Next Steps

 

...