본문 바로가기

Big Data/Storm

Apache Storm #1 (Cluster 환경 구축)

Storm Cluster 환경 구축



1. Zookeeper 설치

https://zookeeper.apache.org/ 에서 Zookeeper를 다운로드 하고 압축을 푼다. 설정은 ~/conf/zoo_sample.cfg 파일을 그대로 ~/conf/zoo.cfg 로 복사한다. 따로 변경할건 없지만 dataDir만 변경하여 저장했다. 



1.1 Zookeeper 실행 

sudo sh zkServer.sh start 명령어를 통해 Zookeeper 를 실행시킨다.


ZooKeeper JMX enabled by default

Using config: /Users/jiminsub/Apps/Dev/zookeeper-3.4.9/bin/../conf/zoo.cfg

-n Starting zookeeper ... 

STARTED



2. Storm 설치


http://storm.apache.org/ 에서 Storm을 다운받는다.이번샘플에선 1.0.2를 다운 받았다. 마찬가지로 압축을 푼다.

~/conf/storm.yaml이 기본설정 파일이다. 여기서 필수조건들을 설정해야한다. Local에서 테스트할 것이기 때문에 설정들이 default와 유사하긴 하지만 일단 필수 설정 property 들을 명시해보겠다.



위 4개 옵션이 필수 옵션이다. storm.local.dir 외에는 기본 설정과 동일하다. 기본설정은 https://github.com/apache/storm/blob/v1.0.2/conf/defaults.yaml 여기를 참조하면 된다.


2.1 Storm 실행

Nimbus, Supervisor를 각각 실행해야 한다. (Local에 모든 Cluster환경을 구성함. Storm의 기본 개념은 생략..)


~/bin/Storm 으로 모든 명령어를 실행할 것이다.


sh storm nimbus

sh storm supervisor

sh storm ui


위 3개 명령어로 각각 Nimbus, Supervisor, UI를 실행한다. 


실행 후 web ui 를 통해 동작여부를 확인 할 수 있다. URL은 storm.yaml에 설정된 ip와 port로 접속하면 된다. 기본은 localhost:8080이다.