From 85f2573023ad1fb90a0992589beeaf65f46eb920 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:00:34 +0200 Subject: [PATCH 01/11] LAUNCH update function fail because the folder isn't a git repo, comment it --- bin/LAUNCH.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/LAUNCH.sh b/bin/LAUNCH.sh index 9c855668..6f7786e6 100755 --- a/bin/LAUNCH.sh +++ b/bin/LAUNCH.sh @@ -497,7 +497,7 @@ function reset_password() { function launch_all { checking_configuration; - update; + #update; launch_redis; launch_ardb; launch_logs; From d4745e835beb72a1ba133d4dd868606e357e96dc Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:01:53 +0200 Subject: [PATCH 02/11] Comment git repo tag in installing_deps, git repo not recognised --- installing_deps.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installing_deps.sh b/installing_deps.sh index 5ed4665b..4d0cddf4 100755 --- a/installing_deps.sh +++ b/installing_deps.sh @@ -111,13 +111,13 @@ $AIL_HOME/doc/generate_modules_data_flow_graph.sh #### DB SETUP #### # init update version -pushd ${AIL_HOME} +#pushd ${AIL_HOME} # shallow clone -git fetch --depth=500 --tags --prune -git describe --abbrev=0 --tags | tr -d '\n' > ${AIL_HOME}/update/current_version -echo "AIL current version:" -git describe --abbrev=0 --tags -popd +#git fetch --depth=500 --tags --prune +#git describe --abbrev=0 --tags | tr -d '\n' > ${AIL_HOME}/update/current_version +#echo "AIL current version:" +#git describe --abbrev=0 --tags +#popd # LAUNCH ARDB bash ${AIL_BIN}/LAUNCH.sh -lav & From a52ae937df2615dc81fd06a2ae5d9b94f22a77c8 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:04:16 +0200 Subject: [PATCH 03/11] Update Dockerfile: use ubuntu 18, remove redundant update_thirdparty, remove old crawler requirements pip install --- other_installers/docker/Dockerfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/other_installers/docker/Dockerfile b/other_installers/docker/Dockerfile index 533c44c4..b95159c6 100644 --- a/other_installers/docker/Dockerfile +++ b/other_installers/docker/Dockerfile @@ -1,4 +1,6 @@ -FROM ubuntu:16.04 +FROM ubuntu:18.04 +ENV TZ=Europe/Rome +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Make sure that all updates are in place RUN apt-get clean && apt-get update -y && apt-get upgrade -y \ @@ -19,12 +21,6 @@ WORKDIR /opt/AIL RUN ./installing_deps.sh WORKDIR /opt/AIL -# Installing Web dependencies, -# remove all the parts below if you dont need the Web UI -WORKDIR /opt/AIL/var/www -RUN ./update_thirdparty.sh -WORKDIR /opt/AIL - # Default to UTF-8 file.encoding ENV LANG C.UTF-8 ENV AIL_HOME /opt/AIL @@ -38,7 +34,6 @@ ENV PATH ${AIL_VENV}/bin:${AIL_HOME}:${AIL_REDIS}:${AIL_ARDB}:${AIL_BIN}:${AIL_F RUN ./pystemon/install.sh RUN pip install -r /opt/pystemon/requirements.txt -RUN pip install -r /opt/AIL/crawler_requirements.txt COPY docker_start.sh /docker_start.sh ENTRYPOINT ["/bin/bash", "docker_start.sh"] From 44e4d6802ec9605357a5892ae6bffb2c73de76dc Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:05:10 +0200 Subject: [PATCH 04/11] Add to docker start crawlers launch --- other_installers/docker/docker_start.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/other_installers/docker/docker_start.sh b/other_installers/docker/docker_start.sh index c8f06010..5b0e1b06 100755 --- a/other_installers/docker/docker_start.sh +++ b/other_installers/docker/docker_start.sh @@ -13,6 +13,7 @@ signalListener() { source ./AILENV/bin/activate cd bin ./LAUNCH.sh -l +./LAUNCH.sh -c ./LAUNCH.sh -f signalListener tail -f /dev/null $@ From bc8064f9bb52dea65b50cda9b6c0068c24d89b97 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:05:40 +0200 Subject: [PATCH 05/11] Fix canvas folder name --- var/www/update_thirdparty.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/var/www/update_thirdparty.sh b/var/www/update_thirdparty.sh index c33454ca..cda4cc55 100755 --- a/var/www/update_thirdparty.sh +++ b/var/www/update_thirdparty.sh @@ -90,6 +90,7 @@ wget -q https://raw.githubusercontent.com/flot/flot/958e5fd43c6dff4bab3e1fd5cb61 wget -q http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.min.js -O ./static/js/jquery.sparkline.min.js wget -q http://canvasjs.com/fdm/chart/ -O temp/canvasjs.zip unzip -qq temp/canvasjs.zip -d temp/ +cp -r temp/canvasjs-2.3.2/Chart\ 2.3.2\ GA\ -\ Stable/* temp/ mv temp/canvasjs-2.3.2/Chart\ 2.3.2\ GA\ -\ Stable/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js wget -q https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip -O temp/jquery-ui.zip From 61b5bbaf9d3f73f9417c45514376dcdf25d7f046 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:06:49 +0200 Subject: [PATCH 06/11] Update docker readme --- other_installers/docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other_installers/docker/README.md b/other_installers/docker/README.md index 265defab..6faf7123 100644 --- a/other_installers/docker/README.md +++ b/other_installers/docker/README.md @@ -1,4 +1,4 @@ -Docker Quick Start (Ubuntu 16.04 LTS) +Docker Quick Start (Ubuntu 18.04 LTS) ------------ :warning: From 738e96e9d6420631e9b6ddad509b8bc26710b97b Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 11:08:45 +0200 Subject: [PATCH 07/11] Update docker readme (cp) --- other_installers/docker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/other_installers/docker/README.md b/other_installers/docker/README.md index 6faf7123..6d09123b 100644 --- a/other_installers/docker/README.md +++ b/other_installers/docker/README.md @@ -19,6 +19,7 @@ curl https://get.docker.com | /bin/bash ```bash git clone https://github.com/CIRCL/AIL-framework.git cd AIL-framework +cp -r ./other_installers/docker/Dockerfile ./other_installers/docker/docker_start.sh ./other_installers/docker/pystemon ./ docker build -t ail-framework . ``` 3. To start AIL on port 7000, type the following command below: From 7ee8f4ad286028c7abfa9e141c498e57c8db9215 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Sat, 25 Jul 2020 14:48:17 +0200 Subject: [PATCH 08/11] Add tz as argument --- other_installers/docker/Dockerfile | 3 ++- other_installers/docker/README.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/other_installers/docker/Dockerfile b/other_installers/docker/Dockerfile index b95159c6..782571ab 100644 --- a/other_installers/docker/Dockerfile +++ b/other_installers/docker/Dockerfile @@ -1,5 +1,6 @@ FROM ubuntu:18.04 -ENV TZ=Europe/Rome +ARG tz_buildtime=Europe/Rome +ENV TZ=$tz_buildtime RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Make sure that all updates are in place diff --git a/other_installers/docker/README.md b/other_installers/docker/README.md index 6d09123b..6e601b39 100644 --- a/other_installers/docker/README.md +++ b/other_installers/docker/README.md @@ -20,7 +20,7 @@ curl https://get.docker.com | /bin/bash git clone https://github.com/CIRCL/AIL-framework.git cd AIL-framework cp -r ./other_installers/docker/Dockerfile ./other_installers/docker/docker_start.sh ./other_installers/docker/pystemon ./ -docker build -t ail-framework . +docker build --build-arg tz_buildtime=YOUR_GEO_AREA/YOUR_CITY -t ail-framework . ``` 3. To start AIL on port 7000, type the following command below: ``` From 97949396b4b4ac6da1c3f0ab74740e246b02ad31 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Mon, 3 Aug 2020 10:53:32 +0200 Subject: [PATCH 09/11] Uncomment update and explain in docker readme --- bin/LAUNCH.sh | 2 +- other_installers/docker/README.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/LAUNCH.sh b/bin/LAUNCH.sh index 6f7786e6..9c855668 100755 --- a/bin/LAUNCH.sh +++ b/bin/LAUNCH.sh @@ -497,7 +497,7 @@ function reset_password() { function launch_all { checking_configuration; - #update; + update; launch_redis; launch_ardb; launch_logs; diff --git a/other_installers/docker/README.md b/other_installers/docker/README.md index 6e601b39..c7e6d4ff 100644 --- a/other_installers/docker/README.md +++ b/other_installers/docker/README.md @@ -20,6 +20,8 @@ curl https://get.docker.com | /bin/bash git clone https://github.com/CIRCL/AIL-framework.git cd AIL-framework cp -r ./other_installers/docker/Dockerfile ./other_installers/docker/docker_start.sh ./other_installers/docker/pystemon ./ +cp ./configs/update.cfg.sample ./configs/update.cfg +vim/nano ./configs/update.cfg (set auto_update to False) docker build --build-arg tz_buildtime=YOUR_GEO_AREA/YOUR_CITY -t ail-framework . ``` 3. To start AIL on port 7000, type the following command below: From 57973455484a19e0d06c879f4a7cac35627914a1 Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Mon, 3 Aug 2020 12:07:09 +0200 Subject: [PATCH 10/11] Remove useless copy --- var/www/update_thirdparty.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/var/www/update_thirdparty.sh b/var/www/update_thirdparty.sh index cda4cc55..c33454ca 100755 --- a/var/www/update_thirdparty.sh +++ b/var/www/update_thirdparty.sh @@ -90,7 +90,6 @@ wget -q https://raw.githubusercontent.com/flot/flot/958e5fd43c6dff4bab3e1fd5cb61 wget -q http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.min.js -O ./static/js/jquery.sparkline.min.js wget -q http://canvasjs.com/fdm/chart/ -O temp/canvasjs.zip unzip -qq temp/canvasjs.zip -d temp/ -cp -r temp/canvasjs-2.3.2/Chart\ 2.3.2\ GA\ -\ Stable/* temp/ mv temp/canvasjs-2.3.2/Chart\ 2.3.2\ GA\ -\ Stable/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js wget -q https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip -O temp/jquery-ui.zip From 7f9df2d08367c9a97d2cfcdec597e1e4ced28e0e Mon Sep 17 00:00:00 2001 From: Pietro Mazzini Date: Mon, 10 Aug 2020 20:22:12 +0200 Subject: [PATCH 11/11] Update update_thirdparty.sh --- var/www/update_thirdparty.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/www/update_thirdparty.sh b/var/www/update_thirdparty.sh index c33454ca..3b18c740 100755 --- a/var/www/update_thirdparty.sh +++ b/var/www/update_thirdparty.sh @@ -90,7 +90,7 @@ wget -q https://raw.githubusercontent.com/flot/flot/958e5fd43c6dff4bab3e1fd5cb61 wget -q http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.min.js -O ./static/js/jquery.sparkline.min.js wget -q http://canvasjs.com/fdm/chart/ -O temp/canvasjs.zip unzip -qq temp/canvasjs.zip -d temp/ -mv temp/canvasjs-2.3.2/Chart\ 2.3.2\ GA\ -\ Stable/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js +mv temp/Chart\ 2.3.2\ GA\ -\ Stable/jquery.canvasjs.min.js ./static/js/jquery.canvasjs.min.js wget -q https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip -O temp/jquery-ui.zip unzip -qq temp/jquery-ui.zip -d temp/