Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions installing_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# SKIP_KVROCKS=1
# SKIP_GEN_CERT=1
# SKIP_DB_SETUP=1
#. SKIP_LNX_PKG_INSTALL=1
#
# Example: SKIP_REDIS=1 SKIP_YARA=1 ./install.sh
#
Expand All @@ -18,6 +19,7 @@ set -e
## bash debug mode toggle below
#set -x

if [ -z "$SKIP_LNX_PKG_INSTALL" ]; then
sudo apt-get update

sudo apt-get install python3-pip virtualenv python3-dev python3-tk libfreetype6-dev \
Expand Down Expand Up @@ -54,8 +56,16 @@ sudo apt-get install build-essential libffi-dev autoconf -qq
# sflock, gz requirement
sudo apt-get install p7zip-full -qq # TODO REMOVE ME

else
echo "--- Skipping Linux packages installation ---"
fi

# SUBMODULES #
if [ -z "$SKIP_GIT_SUBMODULE" ]; then
git submodule update --init --recursive
else
echo "--- Skipping Linux packages installation ---"
fi

# REDIS #
if [ -z "$SKIP_REDIS" ]; then
Expand Down
40 changes: 40 additions & 0 deletions other_installers/docker-legacy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM ubuntu:22.04
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
RUN apt-get clean && apt-get update -y && apt-get upgrade -y \
&& apt-get dist-upgrade -y && apt-get autoremove -y

# Install needed packages
RUN apt-get install git python3-dev build-essential \
libffi-dev libssl-dev libfuzzy-dev wget sudo -y

# Adding sudo command
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
RUN echo "root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Installing AIL dependencies
RUN mkdir /opt/AIL
ADD . /opt/AIL
WORKDIR /opt/AIL
RUN ./installing_deps.sh
WORKDIR /opt/AIL

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8
ENV AIL_HOME /opt/AIL
ENV AIL_BIN ${AIL_HOME}/bin
ENV AIL_FLASK ${AIL_HOME}/var/www
ENV AIL_REDIS ${AIL_HOME}/redis/src
ENV AIL_ARDB ${AIL_HOME}/ardb/src
ENV AIL_VENV ${AIL_HOME}/AILENV

ENV PATH ${AIL_VENV}/bin:${AIL_HOME}:${AIL_REDIS}:${AIL_ARDB}:${AIL_BIN}:${AIL_FLASK}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

RUN ./pystemon/install.sh
RUN pip install -r /opt/pystemon/requirements.txt

COPY docker_start.sh /docker_start.sh
ENTRYPOINT ["/bin/bash", "docker_start.sh"]
45 changes: 45 additions & 0 deletions other_installers/docker-legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Docker Quick Start (Ubuntu 18.04 LTS)
------------

:warning:
This Docker is not maintained at the moment.
If you are interested to contribute, please submit a Pull Request


1. Install Docker
```bash
sudo su
apt-get install -y curl
curl https://get.docker.com | /bin/bash
```

2. Type these commands to build the Docker image:
```bash
git clone https://github.com/ail-project/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:
```
docker run -p 7000:7000 ail-framework
```

4. To debug the running container, type the following command and note the container name or identifier:
```bash
docker ps
```

After getting the name or identifier type the following commands:
```bash
docker exec -it CONTAINER_NAME_OR_IDENTIFIER bash
cd /opt/ail
```

Install using Ansible
---------------------

Please check the [Ansible readme](ansible/README.md).

Loading
Loading