blob: 65aba516218de5f4f7dc31d6974579794b281550 [file] [log] [blame]
////
/**
* @@@ START COPYRIGHT @@@
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* @@@ END COPYRIGHT @@@
*/
////
[[install]]
= Install
This chapter describes how to use the {project-name} Installer to install {project-name}. You use the {project-name} Provisioning ID
to run the {project-name} Installer.
[[install-unpack-installer]]
== Unpack Installer
You should already have downloaded the {project-name} Binaries per the instructions in the
<<prepare-download-trafodion-binaries,Download {project-name} Binaries>> in the <<prepare,Prepare>>
chapter. If not, please do so now.
The first step in the installation process is to unpack the {project-name} Installer tar file.
*Example*
```
$ mkdir $HOME/trafodion-installer
$ cd $HOME/trafodion-downloads
$ tar -zxf apache-trafodion-pyinstaller-2.1.0-incubating.tar.gz -C $HOME/trafodion-installer
$
```
<<<
[[install-guided-install]]
== Guided Install
The {project-name} Installer prompts you for the information you collected in the
<<prepare-gather-configuration-information, Gather Configuration Information>> step in the <<prepare,Prepare>> chapter.
The following example shows a guided install of {project-name} on a two-node Cloudera Hadoop cluster that does not have Kerberos nor LDAP installed.
*Example*
1. Run the {project-name} Installer in guided mode.
+
```
$ cd $HOME/trafodion-installer/python-installer
$ ./db_install.py
**********************************
Trafodion Installation ToolKit
**********************************
Enter HDP/CDH web manager URL:port, (full URL, if no http/https prefix, default prefix is http://): 192.168.0.31:7180
Enter HDP/CDH web manager user name [admin]:
Enter HDP/CDH web manager user password:
Confirm Enter HDP/CDH web manager user password:
TASK: Environment Discover ***************************************************************
Time Cost: 0 hour(s) 0 minute(s) 4 second(s)
Enter full path to Trafodion tar file [/data/python-installer/apache-trafodion_server-2.1.0-RH-x86_64-incubating.tar.gz]:
Enter directory name to install trafodion to [apache-trafodion-2.1.0]:
Enter trafodion user password:
Confirm Enter trafodion user password:
Enter number of DCS client connections per node [4]:
Enter trafodion scratch file folder location(should be a large disk),
if more than one folder, use comma seperated [$TRAF_VAR]:
Start instance after installation (Y/N) [Y]:
Enable LDAP security (Y/N) [N]:
Enable DCS High Avalability (Y/N) [N]:
*****************
Final Configs
*****************
+------------------+-----------------------------------------------------------------------------------+
| config type | value |
+------------------+-----------------------------------------------------------------------------------+
| dcs_cnt_per_node | 4 |
| dcs_ha | N |
| first_rsnode | node-1 |
| hbase_user | hbase |
| hdfs_user | hdfs |
| home_dir | /home |
| java_home | /usr/lib/jvm/java-1.7.0-openjdk.x86_64 |
| ldap_security | N |
| mgr_url | http://192.168.0.31:7180 |
| mgr_user | admin |
| node_list | node-1,node-2 |
| scratch_locs | $TRAF_VAR |
| traf_dirname | apache-trafodion-2.1.0 |
| traf_package | /data/python-installer/apache-trafodion_server-2.1.0-RH-x86_64-incubating.tar.gz |
| traf_start | Y |
| traf_user | trafodion |
+------------------+-----------------------------------------------------------------------------------+
Confirm result (Y/N) [N]: y
** Generating config file to save configs ...
**********************
Installation Start
**********************
TASK: Environment Check ******************************************************************
Host [node-2]: Script [traf_check.py] .......................................... [ OK ]
Host [node-1]: Script [traf_check.py] .......................................... [ OK ]
TASK: Copy Trafodion package file ********************************************************
Script [copy_files.py] ......................................................... [ OK ]
TASK: Trafodion user Setup ***************************************************************
Host [node-2]: Script [traf_user.py] ........................................... [ OK ]
Host [node-1]: Script [traf_user.py] ........................................... [ OK ]
TASK: Install Trafodion dependencies *****************************************************
Host [node-2]: Script [traf_dep.py] ............................................ [ OK ]
Host [node-1]: Script [traf_dep.py] ............................................ [ OK ]
TASK: Install Trafodion package **********************************************************
Host [node-2]: Script [traf_package.py] ........................................ [ OK ]
Host [node-1]: Script [traf_package.py] ........................................ [ OK ]
TASK: Environment Setup ******************************************************************
Host [node-1]: Script [traf_setup.py] .......................................... [ OK ]
Host [node-2]: Script [traf_setup.py] .......................................... [ OK ]
TASK: DCS/REST Setup *********************************************************************
Host [node-2]: Script [dcs_setup.py] ........................................... [ OK ]
Host [node-1]: Script [dcs_setup.py] ........................................... [ OK ]
TASK: Hadoop modification and restart ****************************************************
***[INFO]: Restarting CDH services ...
Check CDH services restart status (timeout: 600 secs) .................
***[OK]: CDH services restart successfully!
***[INFO]: Deploying CDH client configs ...
Check CDH services deploy status (timeout: 300 secs) ..
***[OK]: CDH services deploy successfully!
Script [hadoop_mods.py] ......................................................... [ OK ]
TASK: Set permission of HDFS folder for Trafodion user ***********************************
Host [node-1]: Script [hdfs_cmds.py] ............................................ [ OK ]
TASK: Sqconfig Setup *********************************************************************
Host [node-1]: Script [traf_sqconfig.py] ........................................ [ OK ]
TASK: Start Trafodion ********************************************************************
Host [node-1]: Script [traf_start.py] ........................................... [ OK ]
Time Cost: 0 hour(s) 7 minute(s) 45 second(s)
*************************
Installation Complete
*************************
```
2. Switch to the {project-name} Runtime User and check the status of {project-name}.
+
```
$ sudo su - trafodion
$ sqcheck
*** Checking Trafodion Environment ***
Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.
The SQ environment is up!
Process Configured Actual Down
------- ---------- ------ ----
DTM 2 2
RMS 4 4
DcsMaster 1 1
DcsServer 2 2
mxosrvr 8 8
RestServer 1 1
$
```
{project-name} is now running on your Hadoop cluster. Please refer to the <<activate,Activate>> chapter for
basic instructions on how to verify the {project-name} management and how to perform basic management
operations.
<<<
[[install-automated-install]]
== Automated Install
The `--config-file` option runs the {project-name} in Automated Setup mode. Refer to <<introduction-trafodion-installer,{project-name} Installer>>
in the <<introduction,Introduction>> chapter for instructions of how you edit your configuration file.
Edit your config file using the information you collected in the <<prepare-gather-configuration-information,Gather Configuration Information>>
step in the <<prepare,Prepare>> chapter.
The following example shows an automated install of {project-name} on a two-node Hortonworks Hadoop cluster that does not have Kerberos nor LDAP enabled.
*Example*
1. Run the {project-name} Installer in Automated Setup mode.
+
```
$ cd $HOME/trafodion-installer/python-installer
$ ./db_install.py --config-file my_config --silent
**********************************
Trafodion Installation ToolKit
**********************************
** Loading configs from config file ...
TASK: Environment Discover ***************************************************************
Time Cost: 0 hour(s) 0 minute(s) 4 second(s)
**********************
Installation Start
**********************
TASK: Environment Check ******************************************************************
Host [node-2]: Script [traf_check.py] .......................................... [ OK ]
Host [node-1]: Script [traf_check.py] .......................................... [ OK ]
TASK: Copy Trafodion package file ********************************************************
Script [copy_files.py] ......................................................... [ OK ]
TASK: Trafodion user Setup ***************************************************************
Host [node-2]: Script [traf_user.py] ........................................... [ OK ]
Host [node-1]: Script [traf_user.py] ........................................... [ OK ]
TASK: Install Trafodion dependencies *****************************************************
Host [node-2]: Script [traf_dep.py] ............................................ [ OK ]
Host [node-1]: Script [traf_dep.py] ............................................ [ OK ]
TASK: Install Trafodion package **********************************************************
Host [node-2]: Script [traf_package.py] ........................................ [ OK ]
Host [node-1]: Script [traf_package.py] ........................................ [ OK ]
TASK: Environment Setup ******************************************************************
Host [node-1]: Script [traf_setup.py] .......................................... [ OK ]
Host [node-2]: Script [traf_setup.py] .......................................... [ OK ]
TASK: DCS/REST Setup *********************************************************************
Host [node-2]: Script [dcs_setup.py] ........................................... [ OK ]
Host [node-1]: Script [dcs_setup.py] ........................................... [ OK ]
TASK: Hadoop modification and restart ****************************************************
***[INFO]: Restarting CDH services ...
Check CDH services restart status (timeout: 600 secs) .................
***[OK]: CDH services restart successfully!
***[INFO]: Deploying CDH client configs ...
Check CDH services deploy status (timeout: 300 secs) ..
***[OK]: CDH services deploy successfully!
Script [hadoop_mods.py] ......................................................... [ OK ]
TASK: Set permission of HDFS folder for Trafodion user ***********************************
Host [node-1]: Script [hdfs_cmds.py] ............................................ [ OK ]
TASK: Sqconfig Setup *********************************************************************
Host [node-1]: Script [traf_sqconfig.py] ........................................ [ OK ]
TASK: Start Trafodion ********************************************************************
Host [node-1]: Script [traf_start.py] ........................................... [ OK ]
Time Cost: 0 hour(s) 7 minute(s) 45 second(s)
*************************
Installation Complete
*************************
```
2. Switch to the {project-name} Runtime User and check the status of {project-name}.
+
```
$ sudo su - trafodion
$ sqcheck
*** Checking Trafodion Environment ***
Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.
The SQ environment is up!
Process Configured Actual Down
------- ---------- ------ ----
DTM 2 2
RMS 4 4
DcsMaster 1 1
DcsServer 2 2
mxosrvr 8 8
RestServer 1 1
$
```
{project-name} is now running on your Hadoop cluster. Please refer to the <<activate,Activate>> chapter for
basic instructions on how to verify the {project-name} management and how to perform basic management
operations.