No description, website, or topics provided.
Java Shell Python RAML
Permalink
Failed to load latest commit information.
descriptors Update versions to reflect breaking semantic change for permanent loc… Jul 2, 2018
doc Gone Sep 21, 2017
docker Move inventory into new repository May 1, 2017
okapi-registration Register proxy for unmanaged module before discovery Jul 2, 2018
okapi-setup Move inventory into new repository May 1, 2017
ramls Update versions to reflect breaking semantic change for permanent loc… Jul 2, 2018
registration Increment inventory interface major version to 5.0 MODINV-37 Dec 20, 2017
sample-data Remove 'creators' property, extend 'contributors' property. MODINV-41 Dec 20, 2017
scripts Ensure bash 4+ Apr 12, 2018
src MODINV-64: Fix ReferenceRecordClient sub-string search, use CQL == not = Jul 6, 2018
.editorconfig Move inventory into new repository May 1, 2017
.eslintrc Move inventory into new repository May 1, 2017
.gitignore Use CQL's == for barcode and id Jan 9, 2018
.gitmodules Move raml-util to ramls/raml-util RMB-30 Aug 9, 2017
CONTRIBUTING.md Fix dev URLs FOLIO-1179 Apr 16, 2018
CONTRIBUTORS.md Move inventory into new repository May 1, 2017
Dockerfile switch to fabric8-based docker base image Dec 19, 2017
Jenkinsfile whitespace Nov 20, 2017
LICENSE Move inventory into new repository May 1, 2017
NEWS.md Update news to reflect 9.1.0 release Jul 10, 2018
README.MD Fix dev URLs FOLIO-1179 Apr 16, 2018
build-docker-image.sh Use maven artefact path for docker image (copy fails) Oct 31, 2017
build.gradle Use python scripts during integration tests Jan 8, 2018
create-okapi-database.sh Move inventory into new repository May 1, 2017
create-tenant.sh Move inventory into new repository May 1, 2017
delete-tenant.sh Move inventory into new repository May 1, 2017
full-build.sh Do generateDescriptors in build scripts FOLIO-701 Aug 29, 2017
generate-documentation.sh Move inventory into new repository May 1, 2017
import-sample-data.sh Move inventory into new repository May 1, 2017
ingest-demo.sh Move inventory into new repository May 1, 2017
pom.xml [maven-release-plugin] prepare for next development iteration Jul 10, 2018
quick-test.sh Convert tests to java MODINV-16 Nov 21, 2017
register-managed.sh Increment inventory interface major version to 5.0 MODINV-37 Dec 20, 2017
register.sh Increment inventory interface major version to 5.0 MODINV-37 Dec 20, 2017
start-managed-demo.sh Use maven artefacts and descriptors for managed demo MODINV-20 Oct 31, 2017
start-okapi.sh Move inventory into new repository May 1, 2017
stop-managed-demo.sh Use python scripts during managed demo Jan 8, 2018
test-via-okapi.sh Update version of mod-inventory-storage used in tests via Okapi to 12… Jul 6, 2018

README.MD

mod-inventory

Copyright (C) 2016-2018 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Goal

FOLIO compatible inventory module.

Provides basic physical item inventory management, currently limited to basic representations of local instances and items, which can only be created via a MODS import.

Written in Java and uses Maven as its build system.

Further Documentation

This readme is intended to get these modules up and running. For further information on what they do, see the guide.

Prerequisites

Required

  • Java 8 JDK
  • Maven 3.5.0

Optional

  • Node 6.4.0 (for API linting and documentation generation)
  • NPM 3.10.3 (for API linting and documentation generation)
  • Python 3.6.0 (for deployment scripts and tests via okapi setup)

Preparation

Git Submodules

There are some common RAML definitions that are shared between FOLIO projects via Git submodules.

To initialise these please run git submodule init && git submodule update in the root directory.

If these are not initialised, document generation and API linting operations may fail.

More information is available on the developer site.

Groovy and Gradle

If sdkman is installed, run source ./setup-environment.sh to setup the shell with the appropriate versions of Gradle and Groovy.

Building

run mvn compile from the root directory.

In order to build an executable Jar (e.g. for Okapi to deploy), run mvn package.

Running

Preparation

Running Okapi

Make sure that Okapi is running on its default port of 9130 (see the guide for instructions).

A script for building and running Okapi is provided. Run /start-okapi.sh from the root of the Okapi source.

As this runs Okapi using Postgres storage, some database preparation is required. This can be achieved by running ./create-okapi-database.sh from the root of this repository.

Dependencies

In order to activate the inventory module for a tenant, the dependencies described in the Module Descriptor need to be fulfilled.

The simplest way to fulfil these is to use the inventory storage module.

Registration

To register the module with deployment instructions and activate it for a demo tenant, run ./start-managed-demo.sh from the root directory.

To deactivate and unregister the module, run ./stop-managed-demo.sh from the root directory.

Sample Data

Importing/ingesting of sample data is done via Okapi, so modules must be registered prior to importing.

To load some sample data run ./import-sample-data.sh from the root directory.

Making Requests

These modules provide HTTP based APIs rather than any UI themselves.

As FOLIO is a multi-tenant system, many of the requests made to these modules are tenant aware (via the X-Okapi-Tenant header), which means most requests need to be made via a system which understands these headers (e.g. another module or UI built using Stripes).

Therefore, it is suggested that requests to the API are made via tools such as curl or postman, or via a browser plugin for adding headers, such as Requestly.

Okapi Root Address

It is recommended that the modules are located via Okapi. Access via Okapi requires passing the X-Okapi-Tenant header (see the Okapi guide above for details).

http://localhost:9130/inventory

Operating System Support

Most of the development for these modules, thus far, has been performed on OS X, with some on Ubuntu. Feedback for these, and particularly other operating systems is very welcome.

Permissions

The inventory.all permission set currently represents all of the permissions needed to use the inventory related parts of the system (e.g. the scan application and its configuration). This means that it contains additional permissions than those directly needed by the inventory module itself.

Additional Information

The guide and other documentation for this module.

Other modules.

See project MODINV at the FOLIO issue tracker.

Other FOLIO Developer documentation is at dev.folio.org

Appendix 1 - Docker Information

When Using the Modules as Docker Containers

For the modules to communicate via Okapi Proxy, when running in Docker containers, the address for Okapi Proxy needs to be routable from inside the container.

This can be achieved by passing a parameter to the script used to start Okapi, as follows ../mod-inventory/start-okapi.sh http://192.168.X.X:9130

Where 192.168.X.X is a routable IP address for the host from container instances and both repository clones are at the same directory level on your machine.

Finding a Routable Address

Finding the appropriate IP address can be OS and Docker implementation dependent, so this is a very early guide rather than thorough treatment of the topic.

If these methods don't work for you, please do get in touch, so this section can be improved.

On Linux, ifconfig docker0 | grep 'inet addr:' should give output similar to inet addr:192.168.X.X Bcast:0.0.0.0 Mask:255.255.0.0, , the first IP address is usually routable from within containers.

On Mac OS X (using Docker Native), ifconfig en0 | grep 'inet ' should give output similar to inet 192.168.X.X netmask 0xffffff00 broadcast 192.168.X.X, the first IP address is usually routable from within containers.