-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up your dev environment
!! Remember to set up the SQS and SNS env variables documented here - Slin, May 7, 2020 !!
!! You'll need to add some ENV vars for AWS training. Please contact @kepricon for details. This is temporary while we're building the mockbackend for training - Slin Feb 12, 2020 !!
The Vagrant image uses the mockbackend by default. To disable it, run this before mvn spring-boot:run > export JOB_MOCK_CYCLE=0
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 their favorite IDE outside the VM, and then run the server with these commands:
> vagrant up
> vagrant ssh
> mvn clean install
> cd /Vagrant/pathmind-webapp
> 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. I think on VirtualBox the default is 1 GB. If you don't increase it, you're likely to see a JAVA OOM error/Heap Space error
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.