summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTong Li <litong01@us.ibm.com>2016-03-31 14:22:46 -0400
committerTong Li <litong01@us.ibm.com>2016-03-31 14:22:46 -0400
commit0da86295b83ccc734778b80e0bf1a30d0b182eb5 (patch)
treedd4be851d54ec2f5e97eca5409668d8bd44948a5
parent771e4b5a28c154888c402e44314a0fe920040bfc (diff)
Move out the binary files folder out of the project.
The binary file folder was part of the project, it is not good to synch large files between deploy machine and target machine. This patch set also added procedure to install kibana. Change-Id: I8d035ef8f335aa1a715793e708b005da00d203bb
Notes
Notes (review): Code-Review+2: litong01 <email4tong@yahoo.com> Workflow+1: litong01 <email4tong@yahoo.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 31 Mar 2016 19:57:59 +0000 Reviewed-on: https://review.openstack.org/300137 Project: openstack/kiloeyes Branch: refs/heads/master
-rw-r--r--vagrant/README.md69
-rw-r--r--vagrant/onvm/conf/nodes.conf.yml7
-rw-r--r--vagrant/onvm/scripts/install-elastic.sh19
-rwxr-xr-xvagrant/rebootvm.sh8
-rwxr-xr-xvagrant/stvm.sh4
5 files changed, 69 insertions, 38 deletions
diff --git a/vagrant/README.md b/vagrant/README.md
index e601c89..a464b3c 100644
--- a/vagrant/README.md
+++ b/vagrant/README.md
@@ -1,29 +1,42 @@
1Note 1Introduction
2============
3This subproject uses vagrant to setup kiloeyes. To make the install easier,
4one should download java 8, elasticsearch, kibana and kafka binaries and place
5these files into a directory named leapbin at the same directory where the
6project kiloeyes is. Here is an example::
7
8 leapbin
9 elasticsearch-2.3.0.deb
10 jdk-8u77-linux-x64.tar.gz
11 kafka_2.11-0.9.0.0.tgz
12 kibana-4.5.0-linux-x64.tar.gz
13 kiloeyes
14 etc
15 kiloeyes
16 vagrant
17 ....
18
19Having the structure like this will make the install goes faster. And when you
20need to run the scripts repeatly, you won't need to keep downloading these
21large files. The example directory leapbin above also lists the current
22required software to run kiloeyes.
23
24
25Usage:
2====== 26======
3 27You can install everything onto one machine or you can choose install different
4Only tested on Vagrant 1.7.x + VirtualBox 4.3 28components onto different servers. There can be a lot of ways to split up
5 29servers for different services. Here is an example:
6It will install JDK8, ElasticSeach, Kafka, Virtualenv, and VirtualenvWrapper for you. 30
7 31 controller:
8Usage 32 java
9====== 33 elasticsearch
10 34 kibana
11Create your own Vagrant config. file 35 kiloeyes
12 36 devstack:
13``` 37 OpenStack environment
14 cp ubuntu-virtualbox.yml.sample ubuntu-virtualbox.yml 38 agent01:
15``` 39 agent
16 40
17You can change VM memory, Kafka, or ElasticSearch package URL. 41To indicate how the servers will be used, please edit configuration file in
18 42vagrant/onvm/conf/nodes.conf.yml and ids.conf.yml file. \ No newline at end of file
19```
20 vagrant up
21```
22
23Under /vagrant folder you can find kiloeyes project and Kafka uncompress folders.
24
25Use below command to start ElasticSearch:
26
27```
28 sudo /etc/init.d/elasticsearch start
29```
diff --git a/vagrant/onvm/conf/nodes.conf.yml b/vagrant/onvm/conf/nodes.conf.yml
index c17e55d..1e235da 100644
--- a/vagrant/onvm/conf/nodes.conf.yml
+++ b/vagrant/onvm/conf/nodes.conf.yml
@@ -20,7 +20,7 @@ logical2physical:
20 kiloeyes: controller 20 kiloeyes: controller
21 elastic: controller 21 elastic: controller
22 kafka: controller 22 kafka: controller
23 devstack: devstack 23 devstack: controller
24 24
25 25
26# Define how many logical nodes and the sequence of the installation 26# Define how many logical nodes and the sequence of the installation
@@ -31,7 +31,8 @@ ctlnodes:
31 - kiloeyes 31 - kiloeyes
32 32
33agentes: 33agentes:
34 - agent01 34# - agent01
35# - agent02
35 36
36uselocalrepo: yes 37uselocalrepo: yes
37 38
@@ -42,7 +43,7 @@ aptopt: --force-yes
42# The folder should be a local directory start from the project root 43# The folder should be a local directory start from the project root
43synchfolders: 44synchfolders:
44 elastic: 45 elastic:
45 source: leapbin 46 source: ./../../leapbin
46 target: /leapbin 47 target: /leapbin
47 kiloeyes: 48 kiloeyes:
48 source: ./../../kiloeyes 49 source: ./../../kiloeyes
diff --git a/vagrant/onvm/scripts/install-elastic.sh b/vagrant/onvm/scripts/install-elastic.sh
index 3c79bb5..0d2a7ec 100644
--- a/vagrant/onvm/scripts/install-elastic.sh
+++ b/vagrant/onvm/scripts/install-elastic.sh
@@ -16,5 +16,22 @@ if [ -f /leapbin/elasticsearch-2.*.deb ];then
16 echo 'Elastic install is now complete!' 16 echo 'Elastic install is now complete!'
17else 17else
18 echo 'Elasticsearch binary was not found!' 18 echo 'Elasticsearch binary was not found!'
19 echo 'Download elasticsearch 2.2.x.deb and place it in tools/vagrant/ubuntu/leapbin directory.' 19 echo 'Download elasticsearch and configure the location in nodes.conf.yml file.'
20fi
21
22if [ -f /leapbin/kibana-4.*-linux-x64.tar.gz ];then
23 mkdir -p /opt/kibana
24 tar -zxf /leapbin/kibana-4.*-linux-x64.tar.gz -C /opt/kibana
25 mv /opt/kibana/* /opt/kibana/kibana
26 echo -e 'elasticsearch.url: "http://'$2':9200"' >> /opt/kibana/kibana/config/kibana.yml
27
28 # Start the kibana services
29 start-stop-daemon --start --quiet --chuid root \
30 --exec /opt/kibana/kibana/bin/kibana \
31 --pidfile /opt/kibana/kibana.pid --make-pidfile --background >> /dev/null 2>&1
32
33 echo 'Kibana install is now complete!'
34else
35 echo 'Kibana binary was not found!'
36 echo 'Download kibana and and configure the location in nodes.conf.yml file.'
20fi 37fi
diff --git a/vagrant/rebootvm.sh b/vagrant/rebootvm.sh
index 20966c1..c837bf2 100755
--- a/vagrant/rebootvm.sh
+++ b/vagrant/rebootvm.sh
@@ -1,7 +1,7 @@
1VBoxManage snapshot h2-compute01 restore "Snapshot 3" 1#VBoxManage snapshot h2-compute01 restore "Snapshot 3"
2VBoxManage snapshot h2-nova restore "Snapshot 3" 2#VBoxManage snapshot h2-nova restore "Snapshot 3"
3VBoxManage snapshot h2-controller restore "Snapshot 3" 3VBoxManage snapshot h2-controller restore "Snapshot 3"
4 4
5vboxmanage startvm h2-compute01 --type headless 5#vboxmanage startvm h2-compute01 --type headless
6vboxmanage startvm h2-nova --type headless 6#vboxmanage startvm h2-nova --type headless
7vboxmanage startvm h2-controller --type headless 7vboxmanage startvm h2-controller --type headless
diff --git a/vagrant/stvm.sh b/vagrant/stvm.sh
index 8c4892a..37d74ed 100755
--- a/vagrant/stvm.sh
+++ b/vagrant/stvm.sh
@@ -1,3 +1,3 @@
1vboxmanage controlvm h2-compute01 acpipowerbutton 1#vboxmanage controlvm h2-compute01 acpipowerbutton
2vboxmanage controlvm h2-nova acpipowerbutton 2#vboxmanage controlvm h2-nova acpipowerbutton
3vboxmanage controlvm h2-controller acpipowerbutton 3vboxmanage controlvm h2-controller acpipowerbutton