Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleScript preparation
  1. Copy deployment_scripts folder from following archive into vagrant root folder (directory with Vagrantfile)
    for java 8: deployment_scripts.7z and for java 11: deployment_scripts.7z
  2. Edit file copy_jar_and_deploy.sh:
    set variable VAGRANT_PATH to vagrant root folder
    set VAGRANT_VM_NAME to the name or id of vagrant VM (you can get it by running "vagrant global-status", normally it will be "testing" or "testing-backend")
    Example for windows: 

    Code Block
    languagejava
    VAGRANT_PATH=C:/EBSCO_Vagrant
    VAGRANT_VM_NAME=6bffd2b
    SCRIPT_DIR=deployment_scripts


  3. Edit file make_docker_directory.sh to set variable VAGRANT_PATH to the same value as in copy_jar_and_deploy.sh

...

Expand
titleRedeploying module
If you are using latest version of Intellij Idea then use Shell Script Run configuration: 
  1. Go to Run - Edit Configuration
  2. Add Shell Script configuration with path to copy_jar_and_deploy.sh, specify jar filename and docker directory as parameters:
    Image Removed
If you are using older Intellij Idea then use BashSupport plugin https://plugins.jetbrains.com/plugin/4230-bashsupport to create similar Run configuration
  1. Go to the directory with module:

    Code Block
    git clone --recursive https://github.com/folio-org/mod-notes.git
    cd mod-notes


  2. Build module with maven:

    Code Block
    mvn clean install


  3. Make sure that version of built module is greater or equal to version of already deployed module, script uses "/_/proxy/tenants/diku/upgrade" endpoint for redeployment, so redeployment will only work if new version is greater than old version. (You can temporarily set the version to be greater by modifying pom.xml and rebuilding module)
  4. run copy_jar_and_deploy.sh, pass name of jar file, name of docker directory and path to module:

    Code Block
    D:\\myFolder\\folio\\folio-ansible\\deployment_scripts\\copy_jar_and_deploy.sh mod-notes-fat.jar mod-notes D:\\myFolder\\folio\\mod-notes

    Alternatively, if you don't pass module folder path then it will default to current folder:

    Code Block
    cd mod-notes
    D:\\myFolder\\folio\\folio-ansible\\deployment_scripts\\copy_jar_and_deploy.sh mod-notes-fat.jar mod-notes
Expand
titleRedeploying from Intellij Idea
  1. NOTE: Launching this script on Windows should be run via git bash (run as administrator).


Expand
titleAccessing debug port

Each redeployed module exposes debug port that is specified in docker_dir/DEBUG_PORT.txt. To access debug port you need to forward it in Vagrantfile by adding following string: 

Code Block
config.vm.network"forwarded_port", guest:9555, host:9555

You can forward a range of ports by using a for loop: 

Code Block
    for i in 9555..9575
      config.vm.network :forwarded_port, guest: i, host: i
    end



Expand
titleRedeploying from Intellij Idea
If you are using latest version of Intellij Idea then use Shell Script Run configuration: 
  1. Go to Run - Edit Configuration
  2. Add Shell Script configuration with path to copy_jar_and_deploy.sh, specify jar filename and docker directory as parameters:
    Image Added

If you are using older Intellij Idea then use BashSupport plugin https://plugins.jetbrains.com/plugin/4230-bashsupport to create similar Run configuration


Expand
titleUndeploying module

deployment_scripts.7z also contains an undeploy.sh script that sends requests to:

1)Unassign module from diku tenant

2)Undeploy module from docker

3)Delete module description from Okapi

undeploy.sh takes module name as a parameter.

Usage example:

D:\\myFolder\\folio\\folio-ansible\\deployment_scripts\\undeploy.sh mod-notes

Filter by label (Content by label)
showLabelsfalse
max5
spacesFOLIJET
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "FOLIJET"
labelskb-how-to-article

...