nsacyber / WALKOFF

A flexible, easy to use, automation framework allowing users to integrate their capabilities and devices to cut through the repetitive, tedious tasks slowing them down. #nsacyber
https://nsacyber.github.io/WALKOFF/
Other
1.2k stars 222 forks source link

walkoff.py does not work 'out of the box' #215

Closed astrohart closed 4 years ago

astrohart commented 5 years ago

On Ubuntu Desktop 18.04 LTS with all software updates, apt-get updated, and all WALKOFF pre-reqs installed, after a clone from this GitHub and then a successful run of sudo python3 setup_walkoff.py, running sudo python3 walkoff.py from a non-root user fails:

walkoff@nsacyber:~/nsacyber/WALKOFF$ sudo python3 walkoff.py
[sudo] password for walkoff: 
Traceback (most recent call last):
  File "walkoff.py", line 9, in <module>
    from prometheus_flask_exporter import PrometheusMetrics
ModuleNotFoundError: No module named 'prometheus_flask_exporter'

I know that the solution is to run pip and install prometheus_flask_exporterhowever I wanted to raise this issue in hopes that perhapssetup_walkoff.py``` could be modified to include this module.

astrohart commented 5 years ago

I continue to get new errors upon reverting my VM to a prior snapshot (where the pre-reqs have just been installed) and I get 'msgpack not found,' 'zmq not found', Module 'redis' not found when running setup_walkoff.py and when I try to run walkoff.py it complains about other packages and modules not being present, such as gevent and alembic.

astrohart commented 5 years ago

I am trying the Docker Setup route and seeing if that fixes the issues. I am doing so on a fresh Ubuntu Desktop 18.04 LTS VM.

ghost commented 5 years ago

Hello @astrohart,

To fully setup and build this project, the pre-pre instructions should be as follows:

Installing & starting postgre:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install postgresql postgresql-contrib
sudo service postgresql restart
su - postgres
psql

Installing & starting redis:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install redis-server
redis-cli -v
sudo service redis-server restart
redis-cli

Starting from the WALKOFF (root) directory:

pip install -r requirements.txt
pip install -r requirements-test.txt
python scripts/install_dependencies.py
python scripts/generate_certificates.py
cd walkoff\client
npm install package.json
cd ..\..
python setup_walkoff.py

Then you can run through the rest of the https://github.com/nsacyber/WALKOFF#natively install process. Alternatively, the docker processes should work as well.

Let me know if this helps you out.