Browse Source

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
changes/37/300137/1
Tong Li 3 years ago
parent
commit
0da86295b8

+ 41
- 28
vagrant/README.md View File

@@ -1,29 +1,42 @@
1
-Note
1
+Introduction
2
+============
3
+This subproject uses vagrant to setup kiloeyes. To make the install easier,
4
+one should download java 8, elasticsearch, kibana and kafka binaries and place
5
+these files into a directory named leapbin at the same directory where the
6
+project 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
+
19
+Having the structure like this will make the install goes faster. And when you
20
+need to run the scripts repeatly, you won't need to keep downloading these
21
+large files. The example directory leapbin above also lists the current
22
+required software to run kiloeyes.
23
+
24
+
25
+Usage:
2 26
 ======
3
-
4
-Only tested on Vagrant 1.7.x + VirtualBox 4.3
5
-
6
-It will install JDK8, ElasticSeach, Kafka, Virtualenv, and VirtualenvWrapper for you.
7
-
8
-Usage
9
-======
10
-
11
-Create your own Vagrant config. file
12
-
13
-```
14
-  cp ubuntu-virtualbox.yml.sample ubuntu-virtualbox.yml
15
-```
16
-
17
-You can change VM memory, Kafka, or ElasticSearch package URL.
18
-
19
-```
20
-  vagrant up
21
-```
22
-
23
-Under /vagrant folder you can find kiloeyes project and Kafka uncompress folders.
24
-
25
-Use below command to start ElasticSearch:
26
-
27
-```
28
-  sudo /etc/init.d/elasticsearch start
29
-```
27
+You can install everything onto one machine or you can choose install different
28
+components onto different servers. There can be a lot of ways to split up
29
+servers for different services. Here is an example:
30
+
31
+        controller:
32
+            java
33
+            elasticsearch
34
+            kibana
35
+            kiloeyes
36
+        devstack:
37
+            OpenStack environment
38
+        agent01:
39
+            agent
40
+
41
+To indicate how the servers will be used, please edit configuration file in
42
+vagrant/onvm/conf/nodes.conf.yml and ids.conf.yml file.

+ 4
- 3
vagrant/onvm/conf/nodes.conf.yml View File

@@ -20,7 +20,7 @@ logical2physical:
20 20
   kiloeyes: controller
21 21
   elastic: controller
22 22
   kafka: controller
23
-  devstack: devstack
23
+  devstack: controller
24 24
 
25 25
 
26 26
 # Define how many logical nodes and the sequence of the installation
@@ -31,7 +31,8 @@ ctlnodes:
31 31
   - kiloeyes
32 32
 
33 33
 agentes:
34
-  - agent01
34
+#  - agent01
35
+#  - agent02
35 36
 
36 37
 uselocalrepo: yes
37 38
 
@@ -42,7 +43,7 @@ aptopt: --force-yes
42 43
 # The folder should be a local directory start from the project root
43 44
 synchfolders:
44 45
   elastic:
45
-    source: leapbin
46
+    source: ./../../leapbin
46 47
     target: /leapbin
47 48
   kiloeyes:
48 49
     source: ./../../kiloeyes

+ 18
- 1
vagrant/onvm/scripts/install-elastic.sh View File

@@ -16,5 +16,22 @@ if [ -f /leapbin/elasticsearch-2.*.deb ];then
16 16
   echo 'Elastic install is now complete!'
17 17
 else
18 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.'
20
+fi
21
+
22
+if [ -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!'
34
+else
35
+  echo 'Kibana binary was not found!'
36
+  echo 'Download kibana and  and configure the location in nodes.conf.yml file.'
20 37
 fi

+ 4
- 4
vagrant/rebootvm.sh View File

@@ -1,7 +1,7 @@
1
-VBoxManage snapshot h2-compute01 restore "Snapshot 3"
2
-VBoxManage snapshot h2-nova restore "Snapshot 3"
1
+#VBoxManage snapshot h2-compute01 restore "Snapshot 3"
2
+#VBoxManage snapshot h2-nova restore "Snapshot 3"
3 3
 VBoxManage snapshot h2-controller restore "Snapshot 3"
4 4
 
5
-vboxmanage startvm h2-compute01 --type headless
6
-vboxmanage startvm h2-nova --type headless
5
+#vboxmanage startvm h2-compute01 --type headless
6
+#vboxmanage startvm h2-nova --type headless
7 7
 vboxmanage startvm h2-controller --type headless

+ 2
- 2
vagrant/stvm.sh View File

@@ -1,3 +1,3 @@
1
-vboxmanage controlvm h2-compute01 acpipowerbutton
2
-vboxmanage controlvm h2-nova acpipowerbutton
1
+#vboxmanage controlvm h2-compute01 acpipowerbutton
2
+#vboxmanage controlvm h2-nova acpipowerbutton
3 3
 vboxmanage controlvm h2-controller acpipowerbutton

Loading…
Cancel
Save