Skip to content

Development environment

Tasos Laskos edited this page Feb 2, 2017 · 15 revisions

Notice

The preferred way to setup a development environment is outlined bellow, if however the build scripts fail on your machine, you can still setup your environment manually by installing the necessary dependencies: https://github.com/Arachni/arachni/wiki/Installation#nix-source-based

Setting up a development environment

In order to ensure that what you'll be experiencing during development will be what the end-user will experience in terms of stability, performance and compatibility, the preferred way to setup a development environment is to essentially work from inside one of Arachni's self-contained packages.

Actually, this makes setting up a development environment even easier as you won't have to go digging through dependencies or affecting the libraries and packages of your workstation at all.

All this goodness is facilitated by the project's build scripts.

The following will build and setup a self-contained environment for you:

ARACHNI_BUILD_ENV=development wget -O - https://raw.github.com/Arachni/build-scripts/master/bootstrap.sh | bash

The ARACHNI_BUILD_ENV=development variable tells the build-scripts to preserve development headers of all the libraries it installs so that you'll be able to install more gems inside that env if need be. (If you don't plan on installing extra gems you can leave the ARACHNI_BUILD_ENV variable undefined and save some space.)

Setting the environment

Place the following into an .env file:

# Get us into the package env
source ~/arachni-build-dir/arachni/system/setenv

# The setenv script sets this to 'production', so unset it.
unset RAILS_ENV

# Unset custom log directories to avoid storing the logs inside the package env.
unset ARACHNI_FRAMEWORK_LOGDIR
unset ARACHNI_WEBUI_LOGDIR

And then, from your working directory, run source .env.

This will need to be called from each new shell prior to working with Arachni.