mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-25 23:37:16 +00:00
chg: [update v3.6 + installer] fix faup install + add v3.6 update
This commit is contained in:
parent
925356f356
commit
90b6f43468
5 changed files with 89 additions and 2 deletions
|
@ -18,8 +18,22 @@ if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# activate virtual environment
|
if [ ! -z "$TRAVIS" ]; then
|
||||||
. ./AILENV/bin/activate
|
echo "Travis detected"
|
||||||
|
ENV_PY="~/virtualenv/python3.6/bin/python"
|
||||||
|
export AIL_VENV="~/virtualenv/python3.6/"
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd |sed 's/bin//' )"
|
||||||
|
export AIL_HOME="${DIR}"
|
||||||
|
|
||||||
|
export AIL_BIN=${AIL_HOME}/bin/
|
||||||
|
export AIL_FLASK=${AIL_HOME}/var/www/
|
||||||
|
export AIL_REDIS=${AIL_HOME}/redis/src/
|
||||||
|
export AIL_ARDB=${AIL_HOME}/ardb/src/
|
||||||
|
else
|
||||||
|
# activate virtual environment
|
||||||
|
. ./AILENV/bin/activate
|
||||||
|
fi
|
||||||
|
|
||||||
pip3 install -U pip
|
pip3 install -U pip
|
||||||
pip3 install 'git+https://github.com/D4-project/BGP-Ranking.git/@7e698f87366e6f99b4d0d11852737db28e3ddc62#egg=pybgpranking&subdirectory=client'
|
pip3 install 'git+https://github.com/D4-project/BGP-Ranking.git/@7e698f87366e6f99b4d0d11852737db28e3ddc62#egg=pybgpranking&subdirectory=client'
|
||||||
|
|
|
@ -63,6 +63,10 @@ sudo make install
|
||||||
echo '/usr/local/lib' | sudo tee -a /etc/ld.so.conf.d/faup.conf
|
echo '/usr/local/lib' | sudo tee -a /etc/ld.so.conf.d/faup.conf
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
popd
|
popd
|
||||||
|
# Pyfaup
|
||||||
|
pushd faup/src/lib/bindings/python/
|
||||||
|
python3 setup.py install
|
||||||
|
popd
|
||||||
|
|
||||||
# tlsh
|
# tlsh
|
||||||
test ! -d tlsh && git clone https://github.com/trendmicro/tlsh.git
|
test ! -d tlsh && git clone https://github.com/trendmicro/tlsh.git
|
||||||
|
|
|
@ -88,3 +88,7 @@ pylibinjection
|
||||||
|
|
||||||
# Graph
|
# Graph
|
||||||
matplotlib
|
matplotlib
|
||||||
|
|
||||||
|
# Test
|
||||||
|
nose
|
||||||
|
coverage
|
||||||
|
|
26
update/v3.6/Update.py
Executable file
26
update/v3.6/Update.py
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*-coding:UTF-8 -*
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import redis
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
|
||||||
|
import ConfigLoader
|
||||||
|
|
||||||
|
sys.path.append(os.path.join(os.environ['AIL_HOME'], 'update', 'bin'))
|
||||||
|
from ail_updater import AIL_Updater
|
||||||
|
|
||||||
|
class Updater(AIL_Updater):
|
||||||
|
"""default Updater."""
|
||||||
|
|
||||||
|
def __init__(self, version):
|
||||||
|
super(Updater, self).__init__(version)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
updater = Updater('v3.6')
|
||||||
|
updater.run_update()
|
39
update/v3.6/Update.sh
Executable file
39
update/v3.6/Update.sh
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
[ -z "$AIL_HOME" ] && echo "Needs the env var AIL_HOME. Run the script from the virtual environment." && exit 1;
|
||||||
|
[ -z "$AIL_REDIS" ] && echo "Needs the env var AIL_REDIS. Run the script from the virtual environment." && exit 1;
|
||||||
|
[ -z "$AIL_ARDB" ] && echo "Needs the env var AIL_ARDB. Run the script from the virtual environment." && exit 1;
|
||||||
|
[ -z "$AIL_BIN" ] && echo "Needs the env var AIL_ARDB. Run the script from the virtual environment." && exit 1;
|
||||||
|
[ -z "$AIL_FLASK" ] && echo "Needs the env var AIL_FLASK. Run the script from the virtual environment." && exit 1;
|
||||||
|
|
||||||
|
export PATH=$AIL_HOME:$PATH
|
||||||
|
export PATH=$AIL_REDIS:$PATH
|
||||||
|
export PATH=$AIL_ARDB:$PATH
|
||||||
|
export PATH=$AIL_BIN:$PATH
|
||||||
|
export PATH=$AIL_FLASK:$PATH
|
||||||
|
|
||||||
|
GREEN="\\033[1;32m"
|
||||||
|
DEFAULT="\\033[0;39m"
|
||||||
|
|
||||||
|
echo -e $GREEN"Shutting down AIL ..."$DEFAULT
|
||||||
|
bash ${AIL_BIN}/LAUNCH.sh -ks
|
||||||
|
wait
|
||||||
|
|
||||||
|
# SUBMODULES #
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
echo -e $GREEN"Updating D4 CLIENT ..."$DEFAULT
|
||||||
|
pip3 install -U d4-pyclient
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e $GREEN"Installing nose ..."$DEFAULT
|
||||||
|
pip3 install -U nose
|
||||||
|
|
||||||
|
echo -e $GREEN"Installing coverage ..."$DEFAULT
|
||||||
|
pip3 install -U coverage
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e $GREEN"Updating DomainClassifier ..."$DEFAULT
|
||||||
|
pip3 install -U DomainClassifier
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in a new issue