This is an outline of a tutorial that can be given to a group in a workshop or followed by an individual developer in a self-paced fashion.
- Set up a running instance of the Stripes Development UI Server
- Set up a running instance of Okapi Gateway
- Demonstrate how to deploy an Okapi Module to a tenant in Okapi Gateway and the Stripes UI Server
- Understand how Okapi Gateway routes requests to modules
There are two choices: either running the Stripes Development UI Server and the Okapi Gateway directly on a developer’s machine (“on-machine”) or running Stripes and Okapi in a VirtualBox guest. An Ansible playbook with appropriate roles is used to create the VirtualBox guest, and can also be used to automatically build a developer’s environment (making the playbook target localhost).
- macOS 10.? or higher (On-machine or VirtualBox)
- Windows 10 or higher (VirtualBox required)
- Linux (On-machine or VirtualBox)
Before attending the workshop, participants must meet these requirements. When in doubt, using the VirtualBox guest machine is recommended.
- Java: 8u101 or higher.
- Maven 3.3.9 or higher
- Node.js 6.x or higher
- Yarn package manager v0.20.3 or higher
To download the VirtualBox guest:
- Make a clean directory and change into it:
mkdir folio-curriculum && cd folio-curriculum
- Set up the Vagrantfile:
vagrant init --minimal folio/curriculum
- Launch the VirtualBox guest:
- Connect to the VirtualBox guest:
Note: Do this download prior to attending a workshop. If also doing Lesson 6 then get it ready beforehand too.
In subsequent lessons, the command lines are executed within the VirtualBox guest.
Be sure you are connected to the VirtualBox guest (from the host computer:
vagrant ssh) before running the commands.
Other instructions and commands that are specific to the VirtualBox guest mode of using the tutorial are noted using this style of information box.
There are some FOLIO-related Vagrant tips, known issues, and troubleshooting notes available.
If launching Vagrant from a Windows Command Prompt, be sure to use Run As Administrator… when opening the Command Prompt itself (
cmd.exe). If you are seeing the error “EPROTO: protocol error, symlink”, the likely cause is that Vagrant was not launched with administrator privileges. See issue STRIPES-344 for details.
FOLIO_ROOT Variable for Lessons
Each lesson assumes the existence of a
$FOLIO_ROOT shell variable.
This variable holds the path to a directory where the components of the Okapi Server and the Stripes Development UI Server are located.
If using the VirtualBox guest setup, it is recommended to first
cd /vagrant before creating the empty directory. Doing so makes the Okapi and Stripes files available from the host operating system in the same directory the Vagrantfile file is located.
The first command below connects from the VirtualBox host to the VirtualBox guest.
The second command changes the working directory to the shared
$ vagrant ssh $ cd /vagrant
Create the directory, enter the directory, and save the directory location using these commands:
$ mkdir folio-tutorial-working-files $ cd folio-tutorial-working-files $ export FOLIO_ROOT=`pwd`
Each time that you open a new shell terminal window, do those latter two steps to set