Volaris - BE- Onboarding plan
(this is a draft)
This documentation provides some help for backend developers to get started. It is most likely incomplete, so please don't hesitate to ask and add information here as needed.
See also: Overview for a new developer and Newcomer's first steps
FOLIO Design & Architecture
Okapi : Gateway/Discovery service and Security model - https://folio-org.atlassian.net/wiki/display/~vijay/FOLIO+-+Developer+Onboarding+Guide#FOLIODeveloperOnboardingGuide-Design&Architecture
RMB framework : Core module for all Vertx based modules - https://github.com/folio-org/raml-module-builder#overview
Introduction to FOLIO Modules Owned by Volaris -
Some demo videos are useful to understand FOLIO acquisition apps (these are using old versions):
Some modules were transferred to Volaris and here the KT sessions were recorded.
Running in IDEA
Installation
Install Java JDK 11
Install IDEA as IDE : https://www.jetbrains.com/idea/
Install last version of Vagrant : https://www.vagrantup.com/
Install VirtualBox : https://www.virtualbox.org/
Install Postman: https://www.postman.com/
Clone from git modules and add all of them in one IDEA project
Volairs back-end modules : edge-caiasoft, edge-dematic, edge-dcb, edge-inn-reach, folio-custom-fields, mod-audit, mod-circulation-item, mod-dcb, mod-email, mod-event-config, mod-inn-reach, mod-notify, mod-password-validation, mod-remote-storage, mod-sender, mod-tags, mod-template-engine, mod-users-bl, mod-users, edge-sip2
Modules with integration tests: folio-integration-tests(Karate), folio-api-tests(Postman)
Up FOLIO platform by using one of the box :
Back-end + UI : https://app.vagrantup.com/folio/boxes/snapshot
See build times at https://dev.folio.org/guides/automation/#reference-environments
Configure VitualBox and IDEA for running FOLIO microservice from IDEA : How to run folio backend modules with IntelliJ Idea and interact with Vagrant box environment
IDEA project / modules organization and plugins
In IDEA, a single project can use the acquisition git repositories as modules. It can use a project directory containing all the git repositories.
A module is added with the Maven configuration. After compile, the directory target/generated-sources should be set as a generated source folder for the module.
The following plugins can be useful: Cucumber for Java, Gherkin, YAML.
Module deployment
The mod-invoice and mod-invoice-storage modules are not included in the testing VagrantBox VMs, so it's easier to practice deployment with these modules:
Download Postman collections with all necessary requests or create it by yourself. The storage module should be deployed before the business one: mod-invoice-storage and then mod-invoice.
Deployment collections
with all the Postman collections to deploy modules.
"FOLIO VAGRANT local.postman_environment.json" → All request in the Postman collections use variables from Environment configuration.
Please import this environment configuration with predefined values of variables : {{protocol}}, {url}}, {{okapiport}}
"Add okapi permission to diku_admin.postman_collection.json" → After you started VagrantBox, then you should add "okapi.all" permission to give ability to deploy modules by "diku_admin" user.
"Redeploy-invoice-storage-module.postman_collection.json" → Please use this collection to deploy mod-invoice-storage
Deployment Steps
On Linux, use this first:
sudo ifconfig lo:1 10.0.2.15 upsudo ifconfig lo:0 10.0.2.2 upAssign “okapi.all” permission for diku_admin
Login
Build mod-invoice-storage module : mvn clean install. As a result target/ModuleDescriptor.json is created, which will be used as deployment descriptor for your microservice.
Copy ModuleDescriptor.json into body of “POST Module Descriptor” and run request
Run module from IDEA
Let OKAPI (Api Getway and discovery server) know were is your microservice by send request
Important:“srvcId” and “id” from deployment descriptor must be the same
Port in “url” must be the same with port from IDEA configuration “-Dhttp.port=8097”
Make the microservice accessible from the outside and allow access to it
If everythigs fine – start using APIs
If a module was already deployed and a new version needs to be tested for integration tests, it is not necessary to remove the old version: simply add .xxx to the id in the descriptor, with a number higher than the currently deployed one, and the karate tests will automatically use the latest version.