Skip to content

Commit cac2221

Browse files
committed
Introduce devcontainer
1 parent 85e86cc commit cac2221

4 files changed

Lines changed: 55 additions & 44 deletions

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// For format details, see https://aka.ms/devcontainer.json.
2+
{
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu24.04",
4+
// Features to add to the dev container. More info: https://containers.dev/features.
5+
// "features": {},
6+
7+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
8+
// "forwardPorts": [],
9+
"onCreateCommand": "git submodule update --init --recursive",
10+
11+
// Use 'postCreateCommand' to run commands after the container is created.
12+
"postCreateCommand": "./installing_deps.sh",
13+
14+
// Configure tool-specific properties.
15+
// "customizations": {},
16+
}

‎.github/workflows/ail_framework_test.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
# This workflow contains a single job called "build"
1616
ail_test:
1717
# The type of runner that the job will run on
18+
# Specifying -latest as a feature: when the version bumps, if it breaks the CI,
19+
# it'll be a nudge to fix what broke & add the new Ubuntu version supported
1820
runs-on: ubuntu-latest
1921

2022
# TODO: Matrix strategy for Python versions is defined but never used.

‎README.md‎

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -209,50 +209,45 @@ Instead of treating those sources separately, AIL helps turn them into searchabl
209209

210210
![ui_submit](./doc/screenshots/ui_submit.png?raw=true "UI importer")
211211

212-
## Installation
212+
## Using AIL
213213

214-
To install the AIL framework:
214+
### Requirements
215+
216+
- Python 3.8+
217+
- Ubuntu 24.04
218+
219+
[How to size the hardware requirements for AIL?](https://ail-project.org/faq.html)
220+
221+
### Installation
222+
223+
Two options:
224+
1. For a local testing, you can use the [provided devcontainer](./.devcontainer/devcontainer.json). It'll execute the steps below within a container, they take few minutes to complete.
225+
2. Install locally
226+
227+
To install AIL locally
215228

216229
```bash
217230
# Clone the repository
218231
git clone https://github.com/ail-project/ail-framework.git
219232
cd ail-framework
220233
git submodule update --init --recursive
221234

222-
# Install dependencies on Debian/Ubuntu-based distributions
235+
# Install dependencies for Ubuntu
223236
./installing_deps.sh
224-
225-
# Start AIL
226-
cd bin
227-
./LAUNCH.sh -l
228237
```
229238

230-
The default [installing_deps.sh](./installing_deps.sh) script targets Debian and Ubuntu based distributions.
231-
232-
### Requirements
233-
234-
- Python 3.8+
235-
236-
[How to size the hardware requirements for AIL?](https://ail-project.org/faq.html)
237-
238-
### Installation notes
239+
To start AIL:
239240

240-
241-
Some optional components require additional configuration, including the **Lacus crawler**, the **Meilisearch search indexer**, and the **translation**. See the [HOWTO](https://github.com/ail-project/ail-framework/blob/master/HOWTO.md#crawler) for detailed setup instructions.
242-
## Starting AIL
243-
244-
```bash
241+
```
245242
cd bin
246243
./LAUNCH.sh -l
247244
```
248245

249-
The web interface is available at:
246+
The web interface is available by default at [https://localhost:7000/](https://localhost:7000/).
250247

251-
```text
252-
https://localhost:7000/
253-
```
248+
The default credentials can be found in `./DEFAULT_PASSWORD`. That file is removed once the password for the user `admin@admin.test` is changed.
254249

255-
The default credentials are stored in the `DEFAULT_PASSWORD` file and the file is removed once the password is changed.
250+
Optional components require additional configuration: the **Lacus crawler**, the **Meilisearch search indexer**, and the **translation**. See the [HOWTO](https://github.com/ail-project/ail-framework/blob/master/HOWTO.md) for detailed setup instructions.
256251

257252
## Documentation
258253

‎installing_deps.sh‎

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,37 @@ set -e
88

99
sudo apt-get update
1010

11-
sudo apt-get install python3-pip virtualenv python3-dev python3-tk libfreetype6-dev \
12-
screen g++ unzip libsnappy-dev cmake -qq
13-
14-
sudo apt-get install automake libtool make gcc pkg-config -qq
11+
packages="python3-pip virtualenv python3-dev python3-tk libfreetype6-dev screen g++ unzip libsnappy-dev cmake automake libtool make gcc pkg-config"
1512

1613
#Needed for downloading jemalloc
17-
sudo apt-get install wget -qq
14+
packages="${packages} wget"
1815

1916
#Needed for bloom filters
20-
sudo apt-get install libssl-dev libfreetype6-dev python3-numpy -qq
17+
packages="${packages} libssl-dev libfreetype6-dev python3-numpy"
2118

2219
# pycld3
23-
sudo apt-get install protobuf-compiler libprotobuf-dev -qq
20+
packages="${packages} protobuf-compiler libprotobuf-dev"
2421

2522
# qrcode
26-
sudo apt-get install python3-opencv -y
27-
sudo apt-get install libzbar0 -y
23+
packages="${packages} python3-opencv libzbar0"
2824

2925
# DNS deps
30-
sudo apt-get install libadns1 libadns1-dev -qq
26+
packages="${packages} libadns1 libadns1-dev"
3127

3228
#Needed for redis-lvlDB
33-
sudo apt-get install libev-dev libgmp-dev -qq # TODO NEED REVIEW
29+
packages="${packages} libev-dev libgmp-dev" # TODO NEED REVIEW
3430

3531
#Need for generate-data-flow graph
36-
sudo apt-get install graphviz -qq
32+
packages="${packages} graphviz"
3733

3834
# ssdeep
39-
sudo apt-get install libfuzzy-dev -qq
40-
sudo apt-get install build-essential libffi-dev autoconf -qq
35+
packages="${packages} libfuzzy-dev build-essential libffi-dev autoconf"
4136

4237
# sflock, gz requirement
43-
sudo apt-get install p7zip-full -qq # TODO REMOVE ME
38+
packages="${packages} p7zip-full" # TODO REMOVE ME
39+
40+
# resolve needed packages & install all at once while keeping history of why some packages are needed.
41+
sudo apt-get install --assume-yes ${packages}
4442

4543
# SUBMODULES #
4644
git submodule update --init --recursive
@@ -49,7 +47,7 @@ git submodule update --init --recursive
4947
test ! -d redis/ && git clone https://github.com/redis/redis.git
5048
pushd redis/
5149
git checkout 5.0
52-
make
50+
make -j
5351
popd
5452

5553
# tlsh
@@ -67,7 +65,7 @@ test ! -d pgpdump && git clone https://github.com/kazu-yamamoto/pgpdump.git
6765
pushd pgpdump/
6866
autoreconf -fiW all
6967
./configure
70-
make
68+
make -j
7169
sudo make install
7270
popd
7371

@@ -79,7 +77,7 @@ unzip yara_temp/yara.zip -d yara_temp/
7977
pushd yara_temp/yara-${YARA_VERSION}
8078
./bootstrap.sh
8179
./configure
82-
make
80+
make -j
8381
sudo make install
8482
make check
8583
popd

0 commit comments

Comments
 (0)