Versions Compared

Key

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

The scratch environment (http://core-functional.ci.folio.org/) is a shared environment for deploying and testing back-end modules.  Back-end devs can use it in place of the local Okapi setups described in this document: https://dev.folio.org/guides/run-local-folio/, which eliminates a lot of the work of setting up a local development environment.  No fiddling with virtualboxes, local host networks, or the Okapi module registration process necessary.  

What is Rancher?

From the Rancher site: Rancher is an open source software platform that enables organizations to run and manage Docker and Kubernetes in production. With Rancher, organizations no longer have to build a container services platform from scratch using a distinct set of open source technologies. Rancher supplies the entire software stack needed to manage containers in production.


To put it another way, Rancher is a tool for deploying Docker containers to the scratch environment quickly and relatively painlessly.  You can overwrite the stock docker container for a given module with your own and be testing it on the scratch environment in minutes.


More comprehensive information on Rancher:  https://dev.folio.org/faqs/how-to-get-started-with-rancher/

Pay attention to the https://dev.folio.org/faqs/how-to-get-started-with-rancher/#deployment-tips if your module needs more resources especially CPU, because only 50m (0,5% of CPU vcore) is dedicated by default.

Please do not forget to release resources (CPU and Memory) when you do not need it anymore for your module.

Requirements:

Docker will need to be installed on your system, and you will need to set up a public docker repo in docker hub.  Working with back-end modules also requires Maven and a recent version of the Java SE.

How to do it:

Clone the module you need to work on from github using the --recursive flag. 

...

When you've made changes to the module and want to upload them, just , rebuild the project with maven, then rebuild the docker image with a new tag, push it up to your repo, then go to Rancher and edit the item.tag variable in the upgrade screen of your module to the new tag name and click the "upgrade" button.  That will pull the new version of the image from your repo.  

...