Skip to content
Eli Jones edited this page Mar 19, 2024 · 2 revisions

Add Forest to your Beiwe deployment

  1. Update the servers to the most recent version of the code.
    1. Update the webservers by pulling the current version of the code to your local machine, and from your local machine, run eb deploy.
    2. Update the worker server by SSHing into it and running up.
  2. When SSHed into the worker server, cd into the ~/beiwe-backend directory and run pip install -r requirements_data_processing.txt. This will install Forest through Pip.
  3. Copy the file /beiwe-backend/cluster_management/pushed_files/install_celery_worker.sh into the server's ~/ directory (this file already exists in the server's ~/ directory, but you need to update it. Then run that file ($ ~/install_celery_worker.sh)
  4. Run sudo processing-restart

Run Forest

  1. Forest must be enabled on a study-by-study basis. Go to the /edit_study/<study_id> page for your study (you must be a study admin or site admin to do this) and click "Enable Forest"
  2. To run Forest, go to "Forest" -> "Create Forest Tasks" in the top navbar. From that page, you can queue up new Forest tasks. Once they're queued, they'll be picked up the next time a cronjob pushes them to Celery, which should happen every five minutes if Celery is running correctly. If you have problems with that, see Troubleshooting Celery.

Getting data out of Forest

  1. Forest data is designed to be exported to Tableau via a Tableau Web Data Connector (WDC) API endpoint on the Beiwe deployment.
    1. The address of this endpoint is [beiwe_deployment_url]/api/v0/studies/<study_object_id>/summary-statistics/daily/wdc.
    2. You can authenticate this endpoint by going to /manage_credentials and creating an API key.
  2. We are in the process of (March 2024) adding additional APIs to access all data generated by Beiwe. If it is past roughly April 2024 and this page has not been updated you may file a bug report.
Clone this wiki locally