Skip to content

Setting up your dev environment

Slin Lee edited this page May 16, 2020 · 20 revisions

Prerequisites

  • Install Vagrant
  • Install VirtualBox
  • Clone the Webapp repo
  • Set environment variables
    • Copy the 'vagrant-user-env.sh.example' file: cp vagrant-user-env.sh.example vagrant-user-env.sh
    • Fill in the variables in vagrant-user-env.sh. SQS and SNS env variables are documented here
    • AWS S3 buckets. Please contact @kepricon for details.
    • Mock backend. The mockbackend is disabled by default. To enabled it it set export JOB_MOCK_CYCLE=10

These instructions are meant to be run in the root folder once you clone the pathmind-webapp repo.

If you have Vagrant installed (vagrantup.com), you can set up a local environment with this command:

> vagrant up

This will build a VM and install all the prerequisites and set up the local database.

You can edit files normally using your favorite IDE outside the VM, and then run the server with these commands:

> vagrant up                     // This boots the vm
> vagrant ssh                    // This logs you into the VM
> ./start-pathmind.sh.           // Builds and runs the Webapp and Updater

This might vary system by system, but you can connect to the webserver at 127.0.0.1:8080


Troubleshooting tips:

  • vagrant provision will run the setup script again. This is good if for some reason the environment variables aren't set up correctly, etc
  • In more extreme cases, you can start from scratch with vagrant destroy and then vagrant up
  • Make sure your VM has enough RAM allocated to it. This shouldn't be the case anymore, but if you see a JAVA OOM error/Heap Space error you can increase the ram for the VM.

The Vagrantfile can be found here if you're interested

Clone this wiki locally