Skip to content

Getting Started

Dustin Born edited this page Jul 21, 2020 · 8 revisions

Introduction

This page shows you how to setup AVAIN on your system. First, you need to clone the repository and cd into it:

git clone https://github.com/ra1nb0rn/avain.git && cd avain

After that, you can either use the available Dockerfile to create an AVAIN image, have the available install script install AVAIN automatically on your system or install AVAIN manually. Once you have AVAIN set up, you can invoke it within a shell by simply calling it like any other program: avain. For more information about calling and using AVAIN, see the Usage wiki page.

Note 1: AVAIN was made to work on Unix-based systems, in particular macOS and Linux. AVAIN was tested to work as intended on macOS Mojave, Kali Linux and Ubuntu. The automated installation script or AVAIN itself may not work properly on other, untested operating systems. In this case, feel free to open an issue.

Note 2: macOS recently started implementing security features that make it more difficult to install and use applications, see e.g. https://stackoverflow.com/questions/60362018/macos-catalinav-10-15-3-error-chromedriver-cannot-be-opened-because-the-de. As such, the automated install on macOS may require manual interaction at some points. Also, the automated install may be successful, but the installed tools may not be able to run without the user allowing it.

Docker

AVAIN comes with a Dockerfile. To build an AVAIN docker image, cd into the directory with AVAIN's Dockerfile and run:

docker build -t avain .

This may take a while. After the build has completed, start a container with the new image like this:

docker run -it avain

When running the container, you are given a bash shell and are placed into AVAIN's working directory. From there, since everything is installed, you can go ahead and run AVAIN. Note that the image building process may take some time. Alternatively you can install AVAIN on your system directly, see below.

Automated Installation

To install AVAIN and all of its required software automatically, make sure you are in AVAIN's root directory and run:

./install.sh

By default the script runs in verbose mode and shows all installation output. This can be disabled by supplying the -q (quiet) flag. The software packages are installed with a platform specific package manager (macOS: Homebrew, Linux: apt) and pip / pip3. For macOS this means you have to have Homebrew installed beforehand. For Linux this means, your package manager has to be apt and unless you want to be asked for the password several times during the installation, you have to run the installation script as root. In case apt is not the main package manager on your Linux distribution, you may be fine by overwriting the LINUX_PACKAGE_MANAGER variable at the start of the installation script install.sh. For more information about the automated install have a look at the script itself.

Note: After the installation, AVAIN may only be fully useable by the original user that installed it (and root).

Manual Installation

Finally, AVAIN can also be installed manually, which is discouraged, because it entails manually installing a decent amount of software and other resources. The manual explanation steps are best explained by describing roughly what the automated installation script does & what software it installs:

  • the base packages that AVAIN requires are: python3, pip3, cmake, gcc and wget
  • the basic Python packages that need to be installed are listed in the requirements.txt file located in AVAIN's root directory
  • all other software packages that need to be installed are listed on the Module Overview wiki page
  • git submodules need to be initialized and updated
  • the top module updater located at modules/module_updater.py needs to be executed
  • as the installation script sources all of the scripts named avain_build.sh that are located (recursively) within the modules subdirectory, you have to run all of these scripts too
Clone this wiki locally