How to automate new modules’ registration within folio/testing-backend Vagrant box.

This "how to" describes a straightforward and simple approach to add new modules to the folio/testing-backend Vagrant box. This particular case is developed for 3 data-import modules "mod-source-record-storage", "mod-source-record-manager", "mod-data-import". But it can be easily extended/changed to deal with any other modules assuming all modules' dependencies are in place.



Step-by-step guide

  1. Prepare jar files for all modules which will be added to the box and start the vagrant box.

     Click here to expand...

    1 compile and package all modules you are going to add to the box. You should have *-fat.jar, ModuleDescriptor.json and DeploymentDescriptor.json files in the target folder for each module.

    2 extract folio-testing-backend-additionalModules.zip into the folder where the vagrant file will be located.

    3 For each module copy *-fat.jar, ModuleDescriptor.json and DeploymentDescriptor.json files into the target folder of the respective module under the additionalModules, Dockerfile into the respective module's folder under the additionalModules.

    4 Start Vagrant Box using "vagrant up" command

    5 Wait until the box starts.

    6 Enjoy, you have your modules added to the diku tenant in the folio/testing-backend Vagrant box.

  2. In case you need to redeploy the module(s) just copy new versions of *-fat.jar, ModuleDescriptor.json and DeploymentDescriptor.json files as you did at the previous step and run "vagrant provision" command.


  3. If you need to add another module to the box

     Click here to expand...

    1 create a new folder for the module under the additionalModules

    2 Copy docker-DeploymentDescriptor.json and docker-TenantAssignment.json into this new folder from any existing module's folder

    3 Define new MACRO for the module in these files


    also define a new docker image name for the module

    4 Change run-basic.sh to include the new module into the box. The changes are quite straightforward just copy and paste code snippets for one of the existing modules and change the MACRO name.

    5 Recreate a vagrant box or run "vagrant provision" command.