-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up your dev environment
- Install Vagrant
- Install VirtualBox
- Clone the Webapp repo
- Set environment variables in the vagrant VM (after you log into the vm with the
vagrant sshstep). The critical ones are:- SQS and SNS env variables documented here
- AWS S3 buckets. Please contact @kepricon for details.
- Mock backend. The mockbackend is enabled by default. To disable it set
export JOB_MOCK_CYCLE=0before runningmvn spring-boot:run
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
> mvn clean install // Build required libraries
> cd /Vagrant/pathmind-webapp // Change to the webapp directory
> mvn spring-boot:run // Run the webapp
In a separate terminal window, you'll start the updater
> vagrant ssh
> cd /Vagrant/pathmind-updater/
> mvn spring-boot:run
the first mvn clean install builds the required shared libraries.
This might vary system by system, but the local webserver is accessible at 127.0.0.1:8080
-
vagrant provisionwill 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 - 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
--
Here are instructions from Henri that are useful to know. Maybe one day I'll clean this up.
Instead if running mvn spring-boot:run in the root of the project, now you need to run it in the 'pathmind-webapp' sub-module.
Now we have the following modules
- pathmind-parent
- pathmind-shared
- pathmind-database
- pathmind-services
- pathmind-updater
- pathmind-updater
This is the parent module. Running mvn clean install here builds all sub-modules.
This module should contain all dependency versions. Dependencies in sub-modules should not contain version numbers, version numbers are defined here in the <dependencyManagement> section.
Also, dependencies defined in the <dependencies> section are applied to every sub-module.
Shared code for every module.
Contains
- Entities (data classes)
- generated JOQ classes (the plugin to generate these classes is still in the
pathmind-webappsub-module) - Liquibase migrations (the plugin to generate these classes is still in the
pathmind-webappsub-module) - DAOs
- Repositories
- Some util classes used by DAOs
- Event bus implementations which need data classes from this module.
Contains all service classes and util and DTO classes used by service classes,
UI code goes here. This is the only module which can contain Vaadin UI code.
This is the module for a standalone updater app but because we don't have a mechanism to push updates from this app to the webapp yet (and also to avoid too many changes at once) this is just another jar module on the project right now.
Configurations from application.properties have been moved to 'pathmind-shared' (shared.properties). Property values defined in shared.properties can be overridden in application.properties in the pathmind-webapp module. Also, after pathmind-updater is its own independent app, it will have its own application.properties which inherits shared.properties.