From fb50faa11e9b899278f122886af1b92011dcd543 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 14:43:43 -0300 Subject: [PATCH 01/34] Update Storm-setup.sh cript should update STORM_PATH --- scripts/setup-storm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/setup-storm.sh b/scripts/setup-storm.sh index fd319d4..4be7b9a 100644 --- a/scripts/setup-storm.sh +++ b/scripts/setup-storm.sh @@ -2,6 +2,7 @@ source "/vagrant/scripts/common.sh" +STORM_FOL=/opt/storm while getopts t:r: option; do case $option in @@ -15,7 +16,7 @@ function installStorm { downloadApacheFile storm ${STORM_VERSION} "${STORM_VERSION}.tar.gz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${STORM_VERSION}" /opt/storm + safeSymLink "/opt/${STORM_VERSION}" $STORM_FOL mkdir -p /var/log/storm } @@ -31,6 +32,7 @@ function configureStorm { echo "nimbus.host: node1" >> /opt/storm/conf/storm.yaml echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> /opt/storm/conf/storm.yaml echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> /opt/storm/conf/storm_env.ini + echo "export PATH=/opt/storm/bin:$PATH">>~/.bashrc } From 67846644ffaec799c750b270d257e732be108930 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 14:48:25 -0300 Subject: [PATCH 02/34] Update setup-storm.sh typo correction --- scripts/setup-storm.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/setup-storm.sh b/scripts/setup-storm.sh index 4be7b9a..3dda01e 100644 --- a/scripts/setup-storm.sh +++ b/scripts/setup-storm.sh @@ -2,7 +2,7 @@ source "/vagrant/scripts/common.sh" -STORM_FOL=/opt/storm +STORM_PATH=/opt/storm while getopts t:r: option; do case $option in @@ -16,7 +16,7 @@ function installStorm { downloadApacheFile storm ${STORM_VERSION} "${STORM_VERSION}.tar.gz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${STORM_VERSION}" $STORM_FOL + safeSymLink "/opt/${STORM_VERSION}" $STORM_PATH mkdir -p /var/log/storm } @@ -24,15 +24,15 @@ function installStorm { function configureStorm { echo "Configuring Storm" - echo "storm.zookeeper.servers:" >> /opt/storm/conf/storm.yaml + echo "storm.zookeeper.servers:" >> $STORM_PATH/conf/storm.yaml for i in $(seq 2 $TOTAL_NODES); do - echo " - node${i}" >> /opt/storm/conf/storm.yaml + echo " - node${i}" >> $STORM_PATH/conf/storm.yaml done - echo "nimbus.host: node1" >> /opt/storm/conf/storm.yaml - echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> /opt/storm/conf/storm.yaml - echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> /opt/storm/conf/storm_env.ini - echo "export PATH=/opt/storm/bin:$PATH">>~/.bashrc + echo "nimbus.host: node1" >> $STORM_PATH/conf/storm.yaml + echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm.yaml + echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm_env.ini + echo "export PATH=$STORM_PATH/storm/bin:$PATH">>~/.bashrc } From ce67900f53bbd21cc000c7df926e55fef5a47dbf Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:21:23 -0300 Subject: [PATCH 03/34] Update setup-elasticsearch.sh Added ELASTIC_PATH to PATH env --- scripts/setup-elasticsearch.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/setup-elasticsearch.sh b/scripts/setup-elasticsearch.sh index 9de0df3..5e76d53 100644 --- a/scripts/setup-elasticsearch.sh +++ b/scripts/setup-elasticsearch.sh @@ -2,6 +2,9 @@ source "/vagrant/scripts/common.sh" +ELASTIC_PATH=/opt/elasticsearch + + while getopts ci: option; do case $option in c) ES_CLIENT=yes;; @@ -14,11 +17,11 @@ function installElasticsearch { downloadFile "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz" "elasticsearch-${ES_VERSION}.tar.gz" tar -oxf $TARBALL -C /opt - safeSymLink "/opt/elasticsearch-${ES_VERSION}" /opt/elasticsearch + safeSymLink "/opt/elasticsearch-${ES_VERSION}" $ELASTIC_PATH mkdir -p /var/lib/elasticsearch mkdir -p /var/log/elasticsearch - mkdir -p /opt/elasticsearch/plugins + mkdir -p $ELASTIC_PATH/plugins } function configureElasticsearch { @@ -26,20 +29,23 @@ function configureElasticsearch { hostname=`hostname -f` if [ -z "${ES_CLIENT}" ]; then echo "Configuring elasticsearch as a normal node" - sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > /opt/elasticsearch/config/elasticsearch.yml + sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > $ELASTIC_PATH/config/elasticsearch.yml else echo "Configuring elasticsearch as a client" - sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch-client.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > /opt/elasticsearch/config/elasticsearch.yml + sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch-client.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > $ELASTIC_PATH/config/elasticsearch.yml fi if [ ! -e /opt/elasticsearch/plugins/kopf ]; then echo "Installing kopf plugin" - /opt/elasticsearch/bin/plugin --install lmenezes/elasticsearch-kopf/1.5.3 + /opt/elasticsearch/bin/plugin --install lmenezes/elasticsearch-kopf/1.5.6 fi cp /vagrant/resources/elasticsearch/supervisor-elasticsearch.conf /etc/supervisor.d/elasticsearch.conf + echo "export PATH=$ELASTIC_PATH/bin:$PATH">>/home/vagrant/.bashrc } echo "Setting up Elasticsearch" installElasticsearch -configureElasticsearch \ No newline at end of file +configureElasticsearch + + From e912b51507fdd71ab6524a60e91c1c24a3b2a1d3 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:22:01 -0300 Subject: [PATCH 04/34] Update Storm-setup.sh to set PATH ENV --- scripts/setup-storm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup-storm.sh b/scripts/setup-storm.sh index 3dda01e..85622e1 100644 --- a/scripts/setup-storm.sh +++ b/scripts/setup-storm.sh @@ -32,7 +32,7 @@ function configureStorm { echo "nimbus.host: node1" >> $STORM_PATH/conf/storm.yaml echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm.yaml echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm_env.ini - echo "export PATH=$STORM_PATH/storm/bin:$PATH">>~/.bashrc + echo "export PATH=$STORM_PATH/storm/bin:$PATH">>/home/vagrant/.bashrc } From 933a13e1d2bcaed6483f74c11d714e2f7c2ba90e Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:28:16 -0300 Subject: [PATCH 05/34] Update Setup-ElasticSearch.sh to set PATH ENV --- scripts/setup-elasticsearch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/setup-elasticsearch.sh b/scripts/setup-elasticsearch.sh index 5e76d53..83a0d32 100644 --- a/scripts/setup-elasticsearch.sh +++ b/scripts/setup-elasticsearch.sh @@ -35,9 +35,9 @@ function configureElasticsearch { sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch-client.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > $ELASTIC_PATH/config/elasticsearch.yml fi - if [ ! -e /opt/elasticsearch/plugins/kopf ]; then + if [ ! -e $ELASTIC_PATH/plugins/kopf ]; then echo "Installing kopf plugin" - /opt/elasticsearch/bin/plugin --install lmenezes/elasticsearch-kopf/1.5.6 + $ELASTIC_PATH/bin/plugin --install lmenezes/elasticsearch-kopf/1.5.6 fi cp /vagrant/resources/elasticsearch/supervisor-elasticsearch.conf /etc/supervisor.d/elasticsearch.conf From 98ef86884ab4edf2f9a379f399b351fac24a861f Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:38:57 -0300 Subject: [PATCH 06/34] update hadoop-setup.sh to set PATH ENV --- scripts/setup-hadoop.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/setup-hadoop.sh b/scripts/setup-hadoop.sh index 8d54e35..436725d 100644 --- a/scripts/setup-hadoop.sh +++ b/scripts/setup-hadoop.sh @@ -2,6 +2,8 @@ source "/vagrant/scripts/common.sh" +HADOOP_PATH=/opt/hadoop + while getopts r:t: option; do case $option in t) TOTAL_NODES=$OPTARG;; @@ -14,12 +16,12 @@ function installHadoop { downloadApacheFile hadoop/common $HADOOP_VERSION "${HADOOP_VERSION}.tar.gz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${HADOOP_VERSION}/" /opt/hadoop + safeSymLink "/opt/${HADOOP_VERSION}/" $HADOOP_PATH mkdir -p /var/lib/hadoop/hdfs/namenode mkdir -p /var/lib/hadoop/hdfs/datanode mkdir -p /var/log/hadoop - mkdir -p /opt/hadoop/logs + mkdir -p $HADOOP_PATH/logs # neeed for writing to HDFS yum install -y snappy snappy-devel @@ -30,15 +32,15 @@ function configureHadoop { HADOOP_RESOURCE_DIR=/vagrant/resources/hadoop for file in `ls ${HADOOP_RESOURCE_DIR}/*.xml`; do echo "Copying ${file}" - cp $file /opt/hadoop/etc/hadoop + cp $file $HADOOP_PATH/etc/hadoop done echo "Setting slaves file" for i in $(seq 2 $TOTAL_NODES); do - echo "node${i}" >> /opt/hadoop/etc/hadoop/slaves + echo "node${i}" >> $HADOOP_PATH/etc/hadoop/slaves done - echo "export JAVA_LIBRARY_PATH=\${JAVA_LIBRARY_PATH}:/usr/lib/hadoop/lib/native:/usr/lib64" >> /opt/hadoop/etc/hadoop/hadoop-env.sh + echo "export JAVA_LIBRARY_PATH=\${JAVA_LIBRARY_PATH}:/usr/lib/hadoop/lib/native:/usr/lib64" >> $HADOOP_PATH/etc/hadoop/hadoop-env.sh } function configureNameNode { @@ -60,4 +62,4 @@ if [ "${ROLE}" == "namenode" ]; then configureNameNode elif [ "${ROLE}" == "datanode" ]; then configureDataNode -fi \ No newline at end of file +fi From 47a145ace9f4328f766d0bcf332880a5d59b18ac Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:43:09 -0300 Subject: [PATCH 07/34] update hadoop-setup.sh to set PATH ENV --- scripts/setup-hadoop.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/setup-hadoop.sh b/scripts/setup-hadoop.sh index 436725d..4cd28c4 100644 --- a/scripts/setup-hadoop.sh +++ b/scripts/setup-hadoop.sh @@ -41,6 +41,8 @@ function configureHadoop { done echo "export JAVA_LIBRARY_PATH=\${JAVA_LIBRARY_PATH}:/usr/lib/hadoop/lib/native:/usr/lib64" >> $HADOOP_PATH/etc/hadoop/hadoop-env.sh + echo "export PATH=$HADOOPC_PATH/bin:$PATH">>/home/vagrant/.bashrc + } function configureNameNode { From b60a6633ba049a4064663c61c00a610f73e410a7 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:51:23 -0300 Subject: [PATCH 08/34] Update Setup-Hbase.sh to set PATH ENV --- scripts/setup-hbase.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/setup-hbase.sh b/scripts/setup-hbase.sh index e125634..7ed2fc1 100644 --- a/scripts/setup-hbase.sh +++ b/scripts/setup-hbase.sh @@ -2,6 +2,8 @@ source "/vagrant/scripts/common.sh" +HBASE_PATH=/opt/hbase + while getopts t:r: option; do case $option in t) TOTAL_NODES=$OPTARG;; @@ -13,7 +15,7 @@ function installHbase { downloadApacheFile hbase $HBASE_VERSION_NUM "${HBASE_VERSION}-bin.tar.gz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${HBASE_VERSION}" /opt/hbase + safeSymLink "/opt/${HBASE_VERSION}" $HBASE_PATH mkdir -p /var/log/hbase } @@ -21,8 +23,10 @@ function installHbase { function configureHbase { generateZkStringNoPorts $TOTAL_NODES - sed "s/__ZK_QUORUM__/${ZK_STRING_NOPORTS}/" /vagrant/resources/hbase/hbase-site.xml > /opt/hbase/conf/hbase-site.xml + sed "s/__ZK_QUORUM__/${ZK_STRING_NOPORTS}/" /vagrant/resources/hbase/hbase-site.xml > $HBASE_PATH/conf/hbase-site.xml cp "/vagrant/resources/hbase/supervisor-${HBASE_ROLE}.conf" /etc/supervisor.d/hbase.conf + echo "export PATH=$HBASE_PATH/bin:$PATH">>/home/vagrant/.bashrc + } echo "Setting up HBase" From 28a7bb65d3e4df88fb4a48370c048de9a82f92e9 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:54:44 -0300 Subject: [PATCH 09/34] added nano and python-meld3 --- scripts/setup-os.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/setup-os.sh b/scripts/setup-os.sh index c365862..19c123a 100644 --- a/scripts/setup-os.sh +++ b/scripts/setup-os.sh @@ -29,7 +29,11 @@ function installDependencies { echo "Installing Supervisor" yum install -y epel-release yum install -y python-pip unzip - + + yum install -y nano + + yum install -y python-meld3 #requested for supervisord + pip install supervisor pip install argparse From fd9634ab5e0d1155be08d58306669d1931f2ed10 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:55:52 -0300 Subject: [PATCH 10/34] Update common.sh line 30 changed -O-->-P --- scripts/common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/common.sh b/scripts/common.sh index c89d849..d22d307 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -27,7 +27,7 @@ function downloadFile { if [ ! -e $cached_file ]; then echo "Downloading ${filename} from ${url} to ${cached_file}" echo "This will take some time. Please be patient..." - wget -nv -O $cached_file $url + wget -nv -P $cached_file $url fi TARBALL=$cached_file @@ -75,4 +75,4 @@ function commentLine { echo "Commenting out '${line}' from ${file}" sed -i "s/^${line}/# ${line}/" $file -} \ No newline at end of file +} From b478805a47ff2f5b7a229416a7931e741d29352b Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 15:58:21 -0300 Subject: [PATCH 11/34] update kafka-setup.sh to set PATH ENV --- scripts/setup-kafka.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/setup-kafka.sh b/scripts/setup-kafka.sh index 3ebd66b..959babf 100644 --- a/scripts/setup-kafka.sh +++ b/scripts/setup-kafka.sh @@ -2,6 +2,8 @@ source "/vagrant/scripts/common.sh" +KAFKA_PATH=/opt/kafka + while getopts t: option; do case $option in t) TOTAL_NODES=$OPTARG;; @@ -12,7 +14,7 @@ function installKafka { downloadApacheFile kafka ${KAFKA_VERSION_NUM} "${KAFKA_VERSION}.tgz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${KAFKA_VERSION}/" /opt/kafka + safeSymLink "/opt/${KAFKA_VERSION}/" $KAFKA_PATH mkdir -p /var/lib/kafka-logs mkdir -p /var/log/kafka @@ -21,19 +23,22 @@ function installKafka { function configureKafka { echo "Configuring Kafka" # copy over config with static properties - cp /vagrant/resources/kafka/server.properties /opt/kafka/config/ + cp /vagrant/resources/kafka/server.properties $KAFKA_PATH/config/ # echo in dynamic ones - echo "broker.id=${NODE_NUMBER}" >> /opt/kafka/config/server.properties + echo "broker.id=${NODE_NUMBER}" >> $KAFKA_PATH/config/server.properties generateZkString $TOTAL_NODES - echo "zookeeper.connect=${ZK_STRING}" >> /opt/kafka/config/server.properties + echo "zookeeper.connect=${ZK_STRING}" >> $KAFKA_PATH/config/server.properties cp /vagrant/resources/kafka/supervisor-kafka.conf /etc/supervisor.d/kakfa.conf + + echo "export PATH=$KAFKA_PATH/bin:$PATH">>/home/vagrant/.bashrc + } echo "Setting up Kafka" installKafka -configureKafka \ No newline at end of file +configureKafka From a278c55eea4b381045dfd26eda50bdf6d98a6022 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:00:52 -0300 Subject: [PATCH 12/34] update zookeeper-setup.sh to set PATH ENV --- scripts/setup-zookeeper.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/scripts/setup-zookeeper.sh b/scripts/setup-zookeeper.sh index bab71f5..ef4c577 100644 --- a/scripts/setup-zookeeper.sh +++ b/scripts/setup-zookeeper.sh @@ -2,6 +2,8 @@ source "/vagrant/scripts/common.sh" +ZOOKEEPER_PATH=/opt/zookeeper + while getopts t: option; do case $option in t) TOTAL_NODES=$OPTARG;; @@ -12,14 +14,14 @@ function installZookeeper { downloadApacheFile zookeeper ${ZOOKEEPER_VERSION} "${ZOOKEEPER_VERSION}.tar.gz" tar -oxzf $TARBALL -C /opt - safeSymLink "/opt/${ZOOKEEPER_VERSION}/" /opt/zookeeper + safeSymLink "/opt/${ZOOKEEPER_VERSION}/" $ZOOKEEPER_PATH mkdir -p /var/lib/zookeeper mkdir -p /var/log/zookeeper echo "0 0 * * * /usr/local/bin/zookeeper_cleanup" >> /etc/crontab - echo "cd /opt/zookeeper" > /usr/local/bin/zookeeper_cleanup + echo "cd $ZOOKEEPER_PATH" > /usr/local/bin/zookeeper_cleanup echo "echo `date` > /root/last_zk_cleanup" >> /usr/local/bin/zookeeper_cleanup echo "bin/zkCleanup.sh /var/lib/zookeeper -n 5 >> /root/last_zk_cleanup" >> /usr/local/bin/zookeeper_cleanup @@ -31,18 +33,22 @@ function installZookeeper { function configureZookeeper { echo "Configuring Zookeeper..." - echo "tickTime=2000" > /opt/zookeeper/conf/zoo.cfg - echo "initLimit=10" >> /opt/zookeeper/conf/zoo.cfg - echo "syncLimit=5" >> /opt/zookeeper/conf/zoo.cfg - echo "dataDir=/var/lib/zookeeper" >> /opt/zookeeper/conf/zoo.cfg - echo "clientPort=2181" >> /opt/zookeeper/conf/zoo.cfg - echo "maxClientCnxns=0" >> /opt/zookeeper/conf/zoo.cfg + echo "tickTime=2000" > $ZOOKEEPER_PATH/conf/zoo.cfg + echo "initLimit=10" >> $ZOOKEEPER_PATH/conf/zoo.cfg + echo "syncLimit=5" >> $ZOOKEEPER_PATH/conf/zoo.cfg + echo "dataDir=/var/lib/zookeeper" >> $ZOOKEEPER_PATH/conf/zoo.cfg + echo "clientPort=2181" >> $ZOOKEEPER_PATH/conf/zoo.cfg + echo "maxClientCnxns=0" >> $ZOOKEEPER_PATH/conf/zoo.cfg for i in $(seq 1 $TOTAL_NODES); do - echo "server.${i}=node${i}:2888:3888" >> /opt/zookeeper/conf/zoo.cfg + echo "server.${i}=node${i}:2888:3888" >> $ZOOKEEPER_PATH/conf/zoo.cfg done cp /vagrant/resources/zookeeper/supervisor-zookeeper.conf /etc/supervisor.d/zookeeper.conf + + echo "export PATH=$ZOOKEEPER_PATH/bin:$PATH">>/home/vagrant/.bashrc + + } echo "Setting up Zookeeper" From eb3697a25d6bd005cf874289a5dc30702074c068 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:21:05 -0300 Subject: [PATCH 13/34] Update setup-snort.sh I have found a bug trying to compile snort. according to http://sourceforge.net/p/snort/mailman/message/34130268/ there is a problem with debugedit.c during rmpbuild. I have solved adding -D 'debug_package %{nil}' in line 22 of setup-snort.sh full command [rpmbuild --rebuild $TARBALL -D 'debug_package %{nil}'] --- scripts/data/setup-snort.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/data/setup-snort.sh b/scripts/data/setup-snort.sh index 17dc968..50a7202 100644 --- a/scripts/data/setup-snort.sh +++ b/scripts/data/setup-snort.sh @@ -2,9 +2,9 @@ source "/vagrant/scripts/common.sh" -DAQ_VER=2.0.5-1 -SNORT_VER=2.9.7.3-1 -RULES_TARBALL=snortrules-snapshot-2973.tar.gz +DAQ_VER=2.0.6-1 +SNORT_VER=2.9.7.5-1 +RULES_TARBALL=snortrules-snapshot-2975.tar.gz function installDeps { echo "installing dependencies" @@ -19,7 +19,7 @@ function installSnort { yum localinstall -y "/root/rpmbuild/RPMS/x86_64/daq-${DAQ_VER}.x86_64.rpm" downloadFile "https://www.snort.org/downloads/snort/snort-${SNORT_VER}.src.rpm" "snort-${SNORT_VER}.src.rpm" - rpmbuild --rebuild $TARBALL + rpmbuild -D 'debug_package %{nil}' --rebuild $TARBALL yum localinstall -y "/root/rpmbuild/RPMS/x86_64/snort-${SNORT_VER}.x86_64.rpm" mkdir -p /usr/local/lib/snort_dynamicrules @@ -27,7 +27,6 @@ function installSnort { } function configureSnort { - echo "installing local rules" tar -xzf "/vagrant/resources/data/${RULES_TARBALL}" -C /etc/snort From b13c26f5dce738c1a6b2dc707297700930d6ff2c Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:40:53 -0300 Subject: [PATCH 14/34] Update common.sh --- scripts/common.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/common.sh b/scripts/common.sh index d22d307..653e238 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -3,14 +3,14 @@ JRE_RPM=jre-7u79-linux-x64.rpm HADOOP_VERSION=hadoop-2.6.0 ZOOKEEPER_VERSION=zookeeper-3.4.6 -KAFKA_SCALA_VERSION=2.9.2 -KAFKA_VERSION_NUM=0.8.1.1 +KAFKA_SCALA_VERSION=2.10 +KAFKA_VERSION_NUM=0.8.2.1 KAFKA_VERSION="kafka_${KAFKA_SCALA_VERSION}-${KAFKA_VERSION_NUM}" STORM_VERSION=apache-storm-0.9.4 -HBASE_VERSION_NUM=0.98.12.1 +HBASE_VERSION_NUM=0.98.13 HBASE_VERSION=hbase-"${HBASE_VERSION_NUM}-hadoop2" -HIVE_VERSION=hive-1.2.0 -ES_VERSION=1.5.2 +HIVE_VERSION=hive-1.2.1 +ES_VERSION=1.7.1 FLUME_VERSION=1.6.0 # So we dont need to pass in i to the scripts @@ -27,7 +27,7 @@ function downloadFile { if [ ! -e $cached_file ]; then echo "Downloading ${filename} from ${url} to ${cached_file}" echo "This will take some time. Please be patient..." - wget -nv -P $cached_file $url + wget -nv -O $cached_file $url fi TARBALL=$cached_file @@ -62,7 +62,7 @@ function safeSymLink { symlink=$2 if [ -e $symlink ]; then - echo "${symlink} exists. Deleteing." + echo "${symlink} exists. Deleting." rm $symlink fi From 7ab63d61dfb41b44bc27e9782c2e331bacfb0a82 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:49:44 -0300 Subject: [PATCH 15/34] Update supervisor-zookeeper.conf --- resources/zookeeper/supervisor-zookeeper.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/zookeeper/supervisor-zookeeper.conf b/resources/zookeeper/supervisor-zookeeper.conf index cce7384..c010f49 100644 --- a/resources/zookeeper/supervisor-zookeeper.conf +++ b/resources/zookeeper/supervisor-zookeeper.conf @@ -1,6 +1,7 @@ [program:zookeeper] command=/opt/zookeeper/bin/zkServer.sh start-foreground directory=/opt/zookeeper +autostart=false stdout_logfile=/var/log/zookeeper/stdout.log stderr_logfile=/var/log/zookeeper/stderr.log redirect_stderr=true From 7f279f5f47afa360c265680cf11d271c19609ec7 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:50:02 -0300 Subject: [PATCH 16/34] Update fabfile.py --- fabfile.py | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/fabfile.py b/fabfile.py index 738d1ee..3ced56c 100644 --- a/fabfile.py +++ b/fabfile.py @@ -10,7 +10,7 @@ temp_ssh_config = '.ssh_config' def vagrant(): - '''sets up fabric environment to work with vagrant VMs''' + '''Sets up fabric environment to work with vagrant VMs''' with open(temp_ssh_config, 'w') as f: f.write(local('vagrant ssh-config', capture=True)) @@ -36,17 +36,31 @@ def supervisorctl_stop(process): '''Stop a process managed by supervisor''' sudo('supervisorctl stop {0}'.format(process)) +def supervisorctl_startall(): + sudo('pgrep supervisord || start supervisor', warn_only=True) + sudo('supervisorctl start all') + +def startall(): + '''Ensure that all services are up and running''' + for x in range(total_nodes,0,-1): + execute(supervisorctl_startall, host='node{0}'.format(x)) + +def supervisorctl_stopall(): + sudo('supervisorctl stop all') + +def restartall(): + '''Restart all services''' + for x in range(total_nodes,0,-1): + execute(supervisorctl_stopall, host='node{0}'.format(x)) + for x in range(total_nodes,0,-1): + execute(supervisorctl_startall, host='node{0}'.format(x)) + def postsetup(): '''Perform post vagrant up tasks on cluster''' + execute(format_namenode) - execute(supervisorctl_start, 'namenode', host='node1') - execute(supervisorctl_start, 'resourcemanager', host='node1') - execute(supervisorctl_start, 'master', host='node1') - for x in range(2,total_nodes+1): - execute(supervisorctl_start, 'datanode', host='node{0}'.format(x)) - execute(supervisorctl_start, 'nodemanager', host='node{0}'.format(x)) - execute(supervisorctl_start, 'regionserver', host='node{0}'.format(x)) + execute(startall) execute(init_ip_whitelist,host='node1') @@ -61,8 +75,10 @@ def supervisorctl_status(): sudo('supervisorctl status') def status(): + '''Check the status of all services''' execute(supervisorctl_status, hosts=['node{0}'.format(x) for x in range(1,total_nodes+1)]) +@hosts('node1') def init_ip_whitelist(): run('/opt/hbase/bin/hbase shell /vagrant/resources/opensoc/hbase_ip_whitelist.rb') @@ -137,7 +153,7 @@ def start_topology(topology, repo=None, local_mode=False, config_path='/vagrant/ )) def restart_storm(): - ''' restarts storm workers and nimbus''' + '''Restarts storm workers and nimbus''' execute(supervisorctl_stop, 'storm-nimbus', host='node1') execute(supervisorctl_stop, 'storm-supervisor', hosts=[ 'node{0}'.format(x) for x in range(2, total_nodes+1)]) From e48f32b8d858f8e71896bb718d17bc7ec1611443 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:51:31 -0300 Subject: [PATCH 17/34] Update Vagrantfile --- Vagrantfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 2948092..15b0ac0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -90,7 +90,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| s.path = "scripts/setup-elasticsearch.sh" s.args = "-i 10.0.0.10#{i}" end - # reload supervisord end #After everything is provisioned, start Supervisor From 4a99784b4afd14b6c0680e11c37404e4b5e5188e Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:53:53 -0300 Subject: [PATCH 18/34] Update setup-pycapa.sh --- scripts/data/setup-pycapa.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data/setup-pycapa.sh b/scripts/data/setup-pycapa.sh index 70191c6..12bd166 100644 --- a/scripts/data/setup-pycapa.sh +++ b/scripts/data/setup-pycapa.sh @@ -3,7 +3,7 @@ source "/vagrant/scripts/common.sh" function installPycapa { - + yum install -y git git clone https://github.com/OpenSOC/pycapa /opt/pycapa cd /opt/pycapa pip install -r requirements.txt From be10f3c0d273be53575bf531a3332a85e6d30cf8 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:56:22 -0300 Subject: [PATCH 19/34] Update setup-hadoop.sh --- scripts/setup-hadoop.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/setup-hadoop.sh b/scripts/setup-hadoop.sh index 4cd28c4..46825a3 100644 --- a/scripts/setup-hadoop.sh +++ b/scripts/setup-hadoop.sh @@ -36,6 +36,7 @@ function configureHadoop { done echo "Setting slaves file" + echo "#localhost" > $HADOOP_PATH/etc/hadoop/slaves for i in $(seq 2 $TOTAL_NODES); do echo "node${i}" >> $HADOOP_PATH/etc/hadoop/slaves done From cc32204ecb5b63cfb65bcd9bc1a88ed91324e56e Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:57:25 -0300 Subject: [PATCH 20/34] Update setup-java.sh --- scripts/setup-java.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/setup-java.sh b/scripts/setup-java.sh index d84949c..3d8dfca 100644 --- a/scripts/setup-java.sh +++ b/scripts/setup-java.sh @@ -1,8 +1,8 @@ source "/vagrant/scripts/common.sh" function installJava { - - rpm -q jre + #can be either jdk or jre + rpm -q ${JRE_RPM:0:3} if [ $? -eq 0 ]; then echo "Java is already installed" else @@ -13,7 +13,7 @@ function installJava { function setupEnvVars { echo "creating java environment variables" - echo export JAVA_HOME=/usr/java/default >> /etc/profile.d/java.sh + echo export JAVA_HOME=/usr/java/default > /etc/profile.d/java.sh echo export PATH=\${JAVA_HOME}/bin:\${PATH} >> /etc/profile.d/java.sh } From 45716293995ca91d48baba00cff29085ebbe25d9 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:59:18 -0300 Subject: [PATCH 21/34] Update setup-os.sh --- scripts/setup-os.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/setup-os.sh b/scripts/setup-os.sh index 19c123a..20a3e1e 100644 --- a/scripts/setup-os.sh +++ b/scripts/setup-os.sh @@ -20,7 +20,7 @@ function writeHostFile { echo "::1 localhost localhost.localdomain localhost6 localhost6.localdomain6" >> /etc/hosts for i in $(seq 1 $TOTAL_NODES); do - z = $i - 1 + #z = $i - 1 echo "10.0.0.10${i} node${i} zkpr${i-1}" >> /etc/hosts done } @@ -30,6 +30,10 @@ function installDependencies { yum install -y epel-release yum install -y python-pip unzip + #yum installs an old version of setuptools and iniparse + pip install -U setuptools + pip install -U iniparse + yum install -y nano yum install -y python-meld3 #requested for supervisord @@ -54,7 +58,7 @@ function installNtpd { } function configureUlimit { - echo "root hard nofile 10240" > /etc/security/limit.d/50-root.conf + echo "root hard nofile 10240" > /etc/security/limits.d/50-root.conf } configureUlimit From 9d39589c3dc1f806c08cd5d5219c5f1b0ec5b788 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 16:59:45 -0300 Subject: [PATCH 22/34] Update setup-zookeeper.sh --- scripts/setup-zookeeper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup-zookeeper.sh b/scripts/setup-zookeeper.sh index ef4c577..3b76229 100644 --- a/scripts/setup-zookeeper.sh +++ b/scripts/setup-zookeeper.sh @@ -40,7 +40,7 @@ function configureZookeeper { echo "clientPort=2181" >> $ZOOKEEPER_PATH/conf/zoo.cfg echo "maxClientCnxns=0" >> $ZOOKEEPER_PATH/conf/zoo.cfg - for i in $(seq 1 $TOTAL_NODES); do + for i in $(seq 2 $TOTAL_NODES); do echo "server.${i}=node${i}:2888:3888" >> $ZOOKEEPER_PATH/conf/zoo.cfg done From b98eae2767cff191ef16a848da6d673e2a3f6c97 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 11 Aug 2015 17:08:29 -0300 Subject: [PATCH 23/34] Update common.sh --- scripts/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/common.sh b/scripts/common.sh index 653e238..53b5b85 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -27,7 +27,7 @@ function downloadFile { if [ ! -e $cached_file ]; then echo "Downloading ${filename} from ${url} to ${cached_file}" echo "This will take some time. Please be patient..." - wget -nv -O $cached_file $url + wget -nv -P $cached_file $url fi TARBALL=$cached_file From dac453e6838b9b6b065192e8dd9f70830ed757ea Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:12:07 -0300 Subject: [PATCH 24/34] update elastic-setup.sh to set PATH ENV --- scripts/setup-elasticsearch.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/setup-elasticsearch.sh b/scripts/setup-elasticsearch.sh index 83a0d32..0bc7a18 100644 --- a/scripts/setup-elasticsearch.sh +++ b/scripts/setup-elasticsearch.sh @@ -2,7 +2,7 @@ source "/vagrant/scripts/common.sh" -ELASTIC_PATH=/opt/elasticsearch +ELASTIC_PATH="/opt/elasticsearch" while getopts ci: option; do @@ -14,7 +14,7 @@ done function installElasticsearch { - downloadFile "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz" "elasticsearch-${ES_VERSION}.tar.gz" + downloadFile "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz" "elastics$ tar -oxf $TARBALL -C /opt safeSymLink "/opt/elasticsearch-${ES_VERSION}" $ELASTIC_PATH @@ -29,10 +29,10 @@ function configureElasticsearch { hostname=`hostname -f` if [ -z "${ES_CLIENT}" ]; then echo "Configuring elasticsearch as a normal node" - sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > $ELASTIC_PATH/config/elasticsearch.yml + sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch.yml | sed "s/__IP_ADDR__/${IP_$ else echo "Configuring elasticsearch as a client" - sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch-client.yml | sed "s/__IP_ADDR__/${IP_ADDR}/" > $ELASTIC_PATH/config/elasticsearch.yml + sed "s/__HOSTNAME__/${hostname}/" /vagrant/resources/elasticsearch/elasticsearch-client.yml | sed "s/__IP_ADDR_$ fi if [ ! -e $ELASTIC_PATH/plugins/kopf ]; then @@ -41,7 +41,10 @@ function configureElasticsearch { fi cp /vagrant/resources/elasticsearch/supervisor-elasticsearch.conf /etc/supervisor.d/elasticsearch.conf - echo "export PATH=$ELASTIC_PATH/bin:$PATH">>/home/vagrant/.bashrc + + echo "export PATH=\$PATH:$ELASTIC_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile } echo "Setting up Elasticsearch" From 67b21d483948f5ce30b38dd95f2d08de6e991051 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:13:22 -0300 Subject: [PATCH 25/34] update hadoop-kafka.sh to set PATH ENV --- scripts/setup-kafka.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/setup-kafka.sh b/scripts/setup-kafka.sh index 959babf..d38f9a7 100644 --- a/scripts/setup-kafka.sh +++ b/scripts/setup-kafka.sh @@ -34,7 +34,11 @@ function configureKafka { cp /vagrant/resources/kafka/supervisor-kafka.conf /etc/supervisor.d/kakfa.conf - echo "export PATH=$KAFKA_PATH/bin:$PATH">>/home/vagrant/.bashrc + echo "export PATH=\$PATH:$KAFKA_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile + + } @@ -42,3 +46,5 @@ function configureKafka { echo "Setting up Kafka" installKafka configureKafka + + From 7d4e83a87141fb980a6b941ae210241626705231 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:15:51 -0300 Subject: [PATCH 26/34] update hadoop-setup.sh to set PATH ENV --- scripts/setup-hadoop.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/setup-hadoop.sh b/scripts/setup-hadoop.sh index 46825a3..3b42ee0 100644 --- a/scripts/setup-hadoop.sh +++ b/scripts/setup-hadoop.sh @@ -42,7 +42,10 @@ function configureHadoop { done echo "export JAVA_LIBRARY_PATH=\${JAVA_LIBRARY_PATH}:/usr/lib/hadoop/lib/native:/usr/lib64" >> $HADOOP_PATH/etc/hadoop/hadoop-env.sh - echo "export PATH=$HADOOPC_PATH/bin:$PATH">>/home/vagrant/.bashrc + + echo "export PATH=\$PATH:$HADOOP_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile } From a61489af15d2cea38e2fcad948197c42f31d6163 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:16:55 -0300 Subject: [PATCH 27/34] Update Setup-Hbase.sh to set PATH ENV --- scripts/setup-hbase.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/setup-hbase.sh b/scripts/setup-hbase.sh index 7ed2fc1..bde9fb2 100644 --- a/scripts/setup-hbase.sh +++ b/scripts/setup-hbase.sh @@ -23,9 +23,12 @@ function installHbase { function configureHbase { generateZkStringNoPorts $TOTAL_NODES - sed "s/__ZK_QUORUM__/${ZK_STRING_NOPORTS}/" /vagrant/resources/hbase/hbase-site.xml > $HBASE_PATH/conf/hbase-site.xml + sed "s/__ZK_QUORUM__/${ZK_STRING_NOPORTS}/" /vagrant/resources/hbase/hbase-site.xml > $HBASE_PATH/conf/hbase-site.x$ cp "/vagrant/resources/hbase/supervisor-${HBASE_ROLE}.conf" /etc/supervisor.d/hbase.conf - echo "export PATH=$HBASE_PATH/bin:$PATH">>/home/vagrant/.bashrc + + echo "export PATH=\$PATH:$HBASE_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile } @@ -33,3 +36,5 @@ echo "Setting up HBase" installHbase configureHbase + + From 2939202b432e3bef0d7c65a9d00b5b6b3a4c4368 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:18:05 -0300 Subject: [PATCH 28/34] update hadoop-kafka.sh to set PATH ENV --- scripts/setup-kafka.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/setup-kafka.sh b/scripts/setup-kafka.sh index d38f9a7..8ead3b0 100644 --- a/scripts/setup-kafka.sh +++ b/scripts/setup-kafka.sh @@ -37,14 +37,13 @@ function configureKafka { echo "export PATH=\$PATH:$KAFKA_PATH/bin/" >> /home/vagrant/.bash_profile source /home/vagrant/.bash_profile - - } - echo "Setting up Kafka" installKafka configureKafka + + From 3adf3ea3c88e0025977f9cb63aaf48ef19f6f955 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:20:20 -0300 Subject: [PATCH 29/34] Update Storm-setup.sh to set PATH ENV --- scripts/setup-storm.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/setup-storm.sh b/scripts/setup-storm.sh index 85622e1..376d7ae 100644 --- a/scripts/setup-storm.sh +++ b/scripts/setup-storm.sh @@ -30,9 +30,12 @@ function configureStorm { done echo "nimbus.host: node1" >> $STORM_PATH/conf/storm.yaml - echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm.yaml - echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf/storm_env.ini - echo "export PATH=$STORM_PATH/storm/bin:$PATH">>/home/vagrant/.bashrc + echo "java.library.path: /usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/c$ + echo "LD_LIBRARY_PATH:/usr/local/lib:/opt/local/lib:/usr/lib:/opt/hadoop/lib/native:/usr/lib64" >> $STORM_PATH/conf$ + + echo "export PATH=\$PATH:$STORM_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile } From 30d8e6673ddb9e4fbb2065ff4ad8611c50ea3033 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:21:34 -0300 Subject: [PATCH 30/34] update elastic-setup.sh to set PATH ENV --- scripts/setup-zookeeper.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/setup-zookeeper.sh b/scripts/setup-zookeeper.sh index 3b76229..a85ee7d 100644 --- a/scripts/setup-zookeeper.sh +++ b/scripts/setup-zookeeper.sh @@ -46,12 +46,14 @@ function configureZookeeper { cp /vagrant/resources/zookeeper/supervisor-zookeeper.conf /etc/supervisor.d/zookeeper.conf - echo "export PATH=$ZOOKEEPER_PATH/bin:$PATH">>/home/vagrant/.bashrc + echo "export PATH=\$PATH:$ZOOKEEPER_PATH/bin/" >> /home/vagrant/.bash_profile + + source /home/vagrant/.bash_profile - } echo "Setting up Zookeeper" installZookeeper configureZookeeper + From 34410ce3f160fcd8b83883107b3bc9f8a1cd0fa0 Mon Sep 17 00:00:00 2001 From: Tincho Date: Thu, 13 Aug 2015 11:34:11 -0300 Subject: [PATCH 31/34] Update common.sh tmp folder creation --- scripts/common.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/common.sh b/scripts/common.sh index 53b5b85..82c5cb3 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -16,6 +16,10 @@ FLUME_VERSION=1.6.0 # So we dont need to pass in i to the scripts NODE_NUMBER=`hostname | tr -d node` +if [ ! -d "/vagrant/resources/tmp" ]; then + echo "Creating Temporal Folder" + mkdir "/vagrant/resources/tmp" +fi function downloadFile { @@ -27,7 +31,7 @@ function downloadFile { if [ ! -e $cached_file ]; then echo "Downloading ${filename} from ${url} to ${cached_file}" echo "This will take some time. Please be patient..." - wget -nv -P $cached_file $url + wget -nv -O $cached_file $url fi TARBALL=$cached_file From 2fff59b601c3ad3bfe6a3459810a67fc52fedac5 Mon Sep 17 00:00:00 2001 From: Tincho Date: Fri, 28 Aug 2015 18:23:16 -0300 Subject: [PATCH 32/34] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48b1d17..8b8f33e 100644 --- a/README.md +++ b/README.md @@ -127,5 +127,5 @@ Here is a list of what will be provisioned via vagrant and its current status: * OpenSOC UI * OpenSOC Storm Topologies - DONE * Snort - DONE -* Pycaoa - DONE +* Pycapa - DONE * Bro - DONE From 4547a64347193227d04de2c74d848ca4f4cb1940 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 1 Sep 2015 13:02:29 -0300 Subject: [PATCH 33/34] updated common.sh hbase version 0.98.13->0.98.14 --- scripts/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/common.sh b/scripts/common.sh index 82c5cb3..d7223e7 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -7,7 +7,7 @@ KAFKA_SCALA_VERSION=2.10 KAFKA_VERSION_NUM=0.8.2.1 KAFKA_VERSION="kafka_${KAFKA_SCALA_VERSION}-${KAFKA_VERSION_NUM}" STORM_VERSION=apache-storm-0.9.4 -HBASE_VERSION_NUM=0.98.13 +HBASE_VERSION_NUM=0.98.14 HBASE_VERSION=hbase-"${HBASE_VERSION_NUM}-hadoop2" HIVE_VERSION=hive-1.2.1 ES_VERSION=1.7.1 From e4e157b9cae19c181f08a2a5e50c07fe5b37ebe6 Mon Sep 17 00:00:00 2001 From: Tincho Date: Tue, 1 Sep 2015 13:03:51 -0300 Subject: [PATCH 34/34] update closest-mirror.py path_info is empty added format project to download file --- scripts/closest-mirror.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/closest-mirror.py b/scripts/closest-mirror.py index 8b6b7cf..610d648 100644 --- a/scripts/closest-mirror.py +++ b/scripts/closest-mirror.py @@ -14,9 +14,12 @@ response = json.loads(urllib2.urlopen(closer_url).read()) - path = response['path_info'] +#added this 01/09/15 +path = format(args.project) + + if args.version: path = os.path.join(path, args.version)