forked from arkime/arkime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vagrant for testing, idea from @jpvlsmv
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
|
||
config.vm.provider "virtualbox" do |vb| | ||
vb.customize ["modifyvm", :id, "--memory", "1500"] | ||
end | ||
|
||
config.vm.define "ubuntu-12.04" do |ubuntu120464| | ||
ubuntu120464.vm.box = "ubuntu/precise64" | ||
end | ||
|
||
config.vm.define "ubuntu-14.04" do |ubuntu140464| | ||
ubuntu140464.vm.box = "ubuntu/trusty64" | ||
end | ||
|
||
config.vm.define "centos-5" do |centos645| | ||
centos645.vm.box = "chef/centos-5.11" | ||
end | ||
|
||
config.vm.define "centos-6" do |centos646| | ||
centos646.vm.box = "chef/centos-6.6" | ||
end | ||
|
||
config.vm.define "centos-7" do |centos647| | ||
centos647.vm.box = "chef/centos-7.0" | ||
end | ||
|
||
|
||
config.vm.provision "shell", path:"node.test.sh" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
export PATH=/usr/local/bin:$PATH | ||
|
||
# Update and install any packages required for easybutton to run | ||
if [ -f "/etc/redhat-release" ]; then | ||
yum -y update | ||
if grep -q "release 5." /etc/redhat-release; then | ||
# Centos 5 - Need EPEL for git and python26 | ||
if [ ! -f /etc/yum.repos.d/epel.repo ]; then | ||
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | ||
fi | ||
yum -y install python26 | ||
mkdir -p /usr/local/bin | ||
ln -s /usr/bin/python26 /usr/local/bin/python | ||
fi | ||
yum -y install git java-1.7.0-openjdk curl psmisc perl-Test-Differences perl-TAP-Harness perl-Test-Simple | ||
fi | ||
|
||
if [ -f "/etc/debian_version" ]; then | ||
apt-get -y upgrade | ||
apt-get -y install git openjdk-7-jre-headless curl libtest-differences-perl libhttp-message-perl | ||
fi | ||
|
||
|
||
# Cleanup anything left around if just running script agian | ||
curl -s -XPOST http://127.0.0.1:9200/_shutdown | ||
/bin/rm -rf /data/moloch | ||
killall -q node moloch-capture | ||
|
||
if [ -d moloch.github ]; then | ||
(cd moloch.github ; git pull) | ||
else | ||
git clone https://github.com/aol/moloch moloch.github | ||
fi | ||
|
||
# Build using easy button | ||
cd moloch.github | ||
echo -e 'no\n128M\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n' | ./easybutton-singlehost.sh | ||
sleep 1 | ||
|
||
# Easy button starts stuff, kill it :) | ||
killall -q node moloch-capture | ||
sleep 1 | ||
|
||
|
||
# Run the tests out of the moloch.github dir | ||
cd tests | ||
(cd ../capture/plugins/wiseService; npm install) | ||
(cd ../viewer; npm install) | ||
./tests.pl | ||
./tests.pl --viewer |