19
pivotal.io 875 Howard Street, Fifth Floor, San Francisco, CA 94103 Pivotal HD 3 INSTALLATION GUIDE(1) Prepared By Pivotal Korea

Pivotal HD 3.0 설치가이드

Embed Size (px)

Citation preview

Page 1: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

����������� ������������������  

����������� ������������������  

Pivotal HD 3 INSTALLATION����������� ������������������  GUIDE(1)����������� ������������������  ����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

����������� ������������������  

Prepared By

Pivotal Korea

����������� ������������������  

����������� ������������������  

Page 2: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

DOCUMENT  CONTROL  

 For any questions regarding this document contact:

Name: Seungdon Choi E-mail: [email protected]

Document Revision History

Date Version Description Author Reviewer 02/03/2015 0.1 Draft for internal

review

09/02/2015 0.9 For Distribution

Page 3: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

Table of Contents DOCUMENT����������� ������������������  OVERVIEW ...................................................................................... 4

SYSTEM����������� ������������������  CONFIGURATION .................................................................................. 4

PHD����������� ������������������  PRE-INSTALLATION����������� ������������������  TASKS .......................................................................... 5

DNS LOOKUP ................................................................................................... 5

JAVA JDK ......................................................................................................... 5

TURN OFF IP TABLES ..................................................................................... 6

PackageKit Disable ......................................................................................... 6

DISABLE SELINUX ........................................................................................... 6

SSH KEY EXCHANGE ....................................................................................... 6

NTP 설정 ........................................................................................................... 7

UMASk 설정 ...................................................................................................... 7

INSTALL����������� ������������������  AMBARI����������� ������������������  SERVER .................................................................................... 7

YUM Repository server 설정 .......................................................................... 7

YUM Repository server 설치 및 설정 ............................................................. 9

INSTALL����������� ������������������  Pivotal����������� ������������������  HD����������� ������������������  CLUSTER ............................................................................. 11

INSTALL����������� ������������������  HAWQ����������� ������������������  ON����������� ������������������  Pivotal����������� ������������������  HD ........................... Error! Bookmark not defined.

Page 4: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

DOCUMENT����������� ������������������  OVERVIEW����������� ������������������  

본 문서는 Pivotal Hadoop 3.0(이하 PHD)와 HAWQ를 Virtual Machine 환경에 설치하는

방법에 대해서 다룬다. PHD3.0 은 ODP(Open Data Platform) core 상에서 개발된 Pivotal

최초의 하둡 배포판으로, 기존의 ICM/Pivotal Command Center 를 사용하지 않고

Ambari 가 도입되는 등 기존 PHD2 대비 많은 기술 변화가 있었다.

PHD를 설치하는 방법은 크게 1) Ambari 1.7.0 을 이용하여 설치 2)메뉴얼 설치 가 있으며, 이

문서에서는 Ambari 를 사용한 설치 방법을 다룬다.

i. 문서에서 다루는 가이드들은 Pivotal 의 공식적인 답변이 아니며, 공식적인 설치 문서는

http://docs.pivotal.io 를 참고하도록 한다.

ii. 문서에서 다룬 PHD의 설정값들은 운영환경을 위한 값이 아니며, 사용자의 PC 상에서

테스트를 위한 최소 설정값이다. 실 운영환경을 위한 설정값은 공식적인 문서와 Pivotal 의

컨설팅을 요한다.

참고 문서 & URL

Pivotal HD Installation Guide

http://pivotalhd.docs.pivotal.io/docs/install-ambari.html HAWQ Guide http://hawq.docs.pivotal.io/docs-hawq/topics/about.html

SYSTEM����������� ������������������  CONFIGURATION����������� ������������������  본 문서에서 사용된 VM 정보와 설치 정보는 다음과 같다. Machine: MacBook Pro – CPU 2.6GHz Intel i7, 16GB Mem

Page 5: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

VMWare Fusion 6

VM Name IP 용도 HD1 10 .10 .10 .1 HD2 10 .10 .10 .2 HD3 10 .10 .10 .3 HD4 10 .10 .10 .4 각 VM노드들은 2 vcpu, 3G Mem으로 구성. OS: CentOS 6.5

실제 구성은 정식 문서

(http://pivotalhd.docs.pivotal.io/doc/2100/webhelp/index.html#topics/PHDInstallationPrerequ

isites.html) 를 따른다.

PHD����������� ������������������  PRE-INSTALLATION����������� ������������������  TASKS����������� ������������������  

DNS LOOKUP

기본적으로 IP 주소를 통한 설치를 지원하지 않으므로, 클러스터의 모든 호스트들은

FQDN으로 접근 가능하여야 한다.

/etc/hosts

10.10.10.1 hd1.vm hd1 10.10.10.2 hd2.vm hd2 10.10.10.3 hd3.vm hd3 10.10.10.4 hd4.vm hd4

openSSL

openssl-1.0.1e-16.el6.x86_64 이상이 각 노드에 설치되어야 한다.

JAVA JDK

Java 1.7u45 이상을 권고함. http://www.oracle.com/technetwork/java/javase/downloads/index.html

Page 6: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

TURN OFF IP TABLES

/sbin/chkconfig iptables off /sbin/chkconfig --list iptables

PACKAGEKIT DISABLE

/etc/yum/pluginconf.d/refresh-packagekit.conf 을 enabled=0 로 수정

DISABLE SELINUX

/etc/selinux/config SELINUX=disabled System reboot 을 수행한다.

#sestatus

SSH KEY EXCHANGE

하기의 ssh.sh 를 사용하여 클러스터 노드상의 Passwordless SSH 를 설정

#!/bin/sh

KEYS_DIR=~/hadoop-ssh-keys

HOST_LIST=`cat hosts.txt`

rm -rf "${KEYS_DIR}"

mkdir -p "${KEYS_DIR}"

cd "${KEYS_DIR}"

if [ ! -e /root/.ssh/id_dsa ]; then

ssh-keygen -t dsa -P '' -f /root/.ssh/id_dsa;

fi

for host in ${HOST_LIST}

do

ssh ${host} "if [ ! -e /root/.ssh/id_dsa ]; then ssh-keygen -t dsa -P '' -f /root/.ssh/id_dsa; fi"

scp ${host}:/root/.ssh/id_dsa.pub ${host}.pub

Page 7: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

done

cat * > authorized_keys

cat /root/.ssh/id_dsa.pub >> authorized_keys

cp authorized_keys /root/.ssh/authorized_keys

chown root:root /root/.ssh/authorized_keys

for host in ${HOST_LIST}

do

scp authorized_keys ${host}:/root/.ssh/authorized_keys

ssh ${host} "chown root:root /root/.ssh/authorized_keys"

done

NTP 설정

#service ntpd start System reboot 을 수행한다.

UMASK 설정

/etc/profile if [ $UID -…. then umask 002 else umask 022 fi umask 022

INSTALL����������� ������������������  AMBARI����������� ������������������  SERVER����������� ������������������  

YUM REPOSITORY SERVER 설정

1. httpd install/start

#yum install httpd

#service httpd start

Page 8: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

2. staging directory 생성

#mkdir /stage

#chmod a+rx /stage

3. Ambari 설치 tarball 다운로드 및 압축 해제

#tar -zxvf /stage/AMBARI-1.7.1-87-centos6.tar.gz

#chmod a+rx /stage

4. local YUM repository 설정

[root@hd1 AMBARI-1.7.1]# ls -lrt

total 292

-rwxr-xr-x 1 106 501 3921 Mar 31 10:44 setup_repo.sh

drwxr-xr-x 3 106 501 4096 Mar 31 10:44 centos6

-rwxr-xr-x 1 106 501 286998 Mar 31 10:44 OSL.txt

[root@hd1 AMBARI-1.7.1]# ./setup_repo.sh

AMBARI-1.7.1 Repo file successfully created at /etc/yum.repos.d/ambari.repo.

Use http://hd1.vm/AMBARI-1.7.1 to access the repository.

차후 설치를 위해 Ambari 외의 설치할 PHD, HAWQ등의 component 들도 마찬가지로

stage 디렉토리에 압축을 푼 후 각 폴더의 setup_repo.sh 를 수행해 준다. 설치 파일들은

https://network.pivotal.io 에서 다운받도록 한다.

total 60 drwxr-xr-x. 2 root root 4096 Apr 1 20:01 . drwxr-xr-x. 122 root root 12288 Apr 1 21:25 .. -rw-r--r--. 1 root root 1926 Nov 27 2013 CentOS-Base.repo -rw-r--r--. 1 root root 638 Nov 27 2013 CentOS-Debuginfo.repo -rw-r--r--. 1 root root 630 Nov 27 2013 CentOS-Media.repo -rw-r--r--. 1 root root 3664 Nov 27 2013 CentOS-Vault.repo -rw-r--r-- 1 root root 79 Apr 1 19:32 PADS-1.3.0.0.repo -rw-r--r-- 1 root root 76 Apr 1 19:32 PHD-3.0.0.0.repo -rw-r--r-- 1 root root 97 Apr 1 19:33 PHD-UTILS-1.1.0.20.repo -rw-r--r-- 1 root root 112 Apr 1 20:01 PHD-UTILS.repo -rw-r--r-- 1 root root 88 Apr 1 20:01 PHD.repo -rw-r--r-- 1 root root 79 Apr 1 19:45 ambari.repo -rw-r--r-- 1 root root 109 Apr 1 19:33 hawq-plugin-phd-1.0-57.repo [root@hd1 yum.repos.d]# pwd /etc/yum.repos.d [root@hd1 yum.repos.d]# cat ambari.repo

Page 9: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

[AMBARI-1.7.1] name=AMBARI-1.7.1 baseurl=http://hd1.vm/AMBARI-1.7.1 gpgcheck=0

[root@hd1 yum.repos.d]# yum repolist

Failed to set locale, defaulting to C

Loaded plugins: fastestmirror, security

Repository PHD-UTILS-1.1.0.20 is listed more than once in the configuration

Loading mirror speeds from cached hostfile

* base: centos.tt.co.kr

* extras: centos.tt.co.kr

* updates: centos.tt.co.kr

repo id repo name status

AMBARI-1.7.1 AMBARI-1.7.1 5

PADS-1.3.0.0 PADS-1.3.0.0 6

PHD-3.0 PHD 141

PHD-3.0.0.0 PHD-3.0.0.0 141

PHD-UTILS-1.1.0.20 PHD-UTILS-1.1.0.20 41

base CentOS-6 - Base 6518

extras CentOS-6 - Extras 37

hawq-plugin-phd-1.0-57 hawq-plugin-phd-1.0-57

1

updates CentOS-6 - Updates 946

repolist: 7836

YUM REPOSITORY SERVER 설치 및 설정

1. Ambari Server 설치

HD1 서버에 yum-server 설치한다.

#yum ambari-server install

* Ambari 서버는 내부적으로 postgreSQL 을 설치하게 되는데, 만일 Ambari 서버와 HAWQ

master 서버가 동일한 물리 서버에 설치되어야 하는 경우 동일한 5432 port 를 사용하게

되어 설치가 불가능하게 되므로, 하기의 명령어로 해당 port 를 변경하도록 한다.

#ambari-server setup -s -j /usr --database=postgres --databasehost=localhost --databaseport=10432

Page 10: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

2. Ambari Server 셋업

[root@hd1 jdk1.7.0_75]# ambari-server setup

Using python /usr/bin/python2.6

Setup ambari-server

Checking SELinux...

SELinux status is 'disabled'

Ambari-server daemon is configured to run under user 'root'. Change this setting [y/n] (n)? n

Adjusting ambari-server permissions and ownership...

Checking firewall...

Checking JDK...

[1] - Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7

[2] - Custom JDK

==============================================================================

Enter choice (1):2

WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.

WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use

Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.

Path to JAVA_HOME: /usr/java/jdk1.7.0_75

Validating JDK on Ambari Server...done.

Completing setup...

Configuring database...

Enter advanced database configuration [y/n] (n)?

Default properties detected. Using built-in database.

Checking PostgreSQL...

Running initdb: This may take upto a minute.

Initializing database: [ OK ]

About to start PostgreSQL

Configuring local database...

Connecting to local database...done.

Configuring PostgreSQL...

Restarting PostgreSQL

Extracting system views...

ambari-admin-1.7.1.87.jar

..

Adjusting ambari-server permissions and ownership...

Page 11: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

Ambari Server 'setup' completed successfully.

3. Ambari Server 시작

[root@hd1 jdk1.7.0_75]# ambari-server start

Using python /usr/bin/python2.6

Starting ambari-server

Ambari Server running with 'root' privileges.

Organizing resource files at /var/lib/ambari-server/resources...

Server PID at: /var/run/ambari-server/ambari-server.pid

Server out at: /var/log/ambari-server/ambari-server.out

Server log at: /var/log/ambari-server/ambari-server.log

Waiting for server start....................

Ambari Server 'start' completed successfully.

INSTALL����������� ������������������  PIVOTAL����������� ������������������  HD����������� ������������������  CLUSTER����������� ������������������  설치된 Ambari 서버에 http://<ambari-server>:8080 으로 접속한다. ID/PWD =

admin/admin

Page 12: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

Launch Installation Wizard 를 클릭

Hadoop Cluster 의 이름을 결정한다.

staging 에 올렸던 PHD stack 들의 repo 위치를 지정해 준다. /etc/yum.repos.d/아래 생성된

파일들을 참조한다.

Page 13: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

설치에 사용될 host 들의 FQDN 을 넣어준다. /root/.ssh/id_rsa 파일을 다운받아 SSH

private key 에 넣어준다.

Page 14: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

각 host 에 대한 check 후 confirm 함

Page 15: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

설치될 서비스들을 선택함.

각 노드에 배포될 마스터 서비스 항목을을 선택

Page 16: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

노드당 설치될 slave/client 들을 선택

Custom Service 당 필요한 패스워드나 설정 변경정보를 기입

Page 17: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

설치될 항목들 Review

Page 18: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

설치 시작!

설치 성공! 장비가 허접하면 timeout 나기도 한다. 그냥 다시 retry..

설치 요약

Page 19: Pivotal HD 3.0 설치가이드

pivotal.io

875 Howard Street, Fifth Floor, San Francisco, CA 94103

설치가 끝나고 나면 Dashboard 상에서 서비스들의 운영현황을 모니터링 할 수 있다.