The main playbook and Vagrantfile in this repository are targeted to build FOLIO systems using Ansible against an Ubuntu 16.04 (Xenial) host. The Ansible inventory is designed to support a few groups as follows:
folio
-- targets hosts for building a full FOLIO systemvagrant
-- targets hosts built as stand-alone Vagrant systemstesting
-- targets hosts that run a FOLIO installation based on the HEAD of the master branch of the FOLIO component modules
There are Ansible variables files in the group_vars
directory with
settings for the vagrant
, and testing
groups.
The folio.yml playbook uses the following roles:
All roles targeted for Ubuntu 16.04 (Xenial)
Installs Ansible from the Ansible repository
Runs apt-cache update
, creates the folio user and group, installs
git, curl, and the postgresql client from apt. Configures the FOLIO
apt repository.
Installs the Docker engine from the Docker repository.
Installs Apache Maven 3 from the Apache archive.
Hooks up mod-auth modules for the sample tenant, loads sample users and auth data. Depends on tenant-data.
Note: without a running Okapi instance with mod-auth and mod-users, this role will fail
Creates shim users in mod-auth login and permissions modules for all users in mod-users (with password = username), if they don't already exist in the mod-auth modules. Temporary fix until there is a business logic module that handles both users and authn/z. Depends on mod-auth-data.
Note: without a running Okapi instance with mod-auth and mod-users, this role will fail
Sample data for the mod-circulation business logic module. Depends on:
- tenant-data
- mod-users-data
Note: without a running Okapi instance with mod-circulation and mod-loan-storage installed and enabled, this role will fail.
Hooks up mod-configuration for the sample tenant. Depends on tenant-data.
Note: without a running Okapi instance, this role will fail
Sample data for the mod-users-bl business logic module. Depends on:
- tenant-data
- mod-users-data
Note: without a running Okapi instance with mod-users-bl and mod-users installed and enabled, this role will fail.
Sample data for the mod-users backend module. Depends on tenant-data. If mod-auth modules are enabled, must run after mod-auth-data role, or permissions will not be correctly initialized.
Note: without a running Okapi instance with mod-users installed and enabled, this role will fail.
Installs a more recent MongoDB Community Edition from the Mongo repository.
Installs nodejs, n, and mocha
Installs a more recent PostgreSQL from the PostgreSQL repository.
Installs Okapi from apt as a system service with persistent storage. Depends on openjdk-8 and postgresql.
Installs an okapi-deploy service on the target, configured by the
folio_modules
variable. See
../group_vars/blackbox for a working set of
module defaults. The service posts deployment descriptors to a running
Okapi instance.
Note: This role depends on a running Okapi instance. Modules defined
in the folio_modules
variable must be registered with Okapi (see
okapi-register-modules role below).
Posts module descriptors to a running Okapi, configured by the
folio_modules
variable. See
../group_vars/blackbox for a working set of
module defaults.
Note: This role depends on a running Okapi instance.
Clones the folio-org/okapi repository from GitHub, builds the JAR files needed for deployment. Depends on common, openjdk-8, and maven-3. Launches an Okapi server in development mode from the source tree.
Deploys the Okapi test modules from the source code in the folio-org/okapi repository. Depends on okapi-src.
Installs a simple script to undeploy all instances of a module from a running Okapi.
Installs the openjdk-8-jdk package from backports, required for Okapi and Maven 3.
Installs SDKMAN! from http://sdkman.io Depends on common
Builds a Docker container with Stripes and the configured modules from the folioci npm respository. Optionally creates a container to proxy Stripes using nginx.
Note: requires a running Okapi with a configured tenant and appropriate backend modules
Clones the folio-org/raml-module-builder repository from GitHub, builds the code. Depends on openjdk-8 and maven-3.
Load a demo tenant into a running Okapi instance.
Installs the yarn package manager from the yarn repository. Depends on nodejs.
Clones the folio-org/mod-auth repository from GitHub, builds and deploys the modules. Depends on:
- common
- openjdk-8
- maven-3
- mongodb-org
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Loads the Docker images for the authtoken, login, and permissions modules from Docker Hub, registers and deploys as a system service in a running Okapi instance, with persistent storage. Depends on:
- postgresql
- docker-engine
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Hooks up mod-auth with mod-users, loads sample permissions data for the sample tenant (diku). Depends on mod-auth, mod-users-demo, tenant-data.
Build and deploy the mod-auth Node.js sample modules (thing-module and retrieve-module). Depends on mod-auth and nodejs.
Note: without a running Okapi instance, this role will fail.
Loads the Docker image from Docker Hub, registers and deploys as a system service in a running Okapi instance. Depends on:
- docker-engine
- okapi-undeploy
Note: without a running Okapi instance with mod-loan-storage, this role will fail
Clones and builds the source from folio-org/mod-circulation on GitHub. Depends on common, openjdk-8, and maven-3.
Builds the Docker image for mod-circulation and launches it via Okapi. Depends on mod-circulation-build, docker-engine, and okapi-docker or okapi-src.
Loads the Docker image from Docker Hub, registers and deploys as a system service in a running Okapi instance, with persistent storage. Depends on:
- postgresql
- docker-engine
- okapi-undeploy
Loads the Docker images for the inventory-storage and inventory modules from Docker Hub, registers and deploys as a system service in a running Okapi instance, with persistent storage. Depends on:
- postgresql
- docker-engine
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Clones and builds the source from folio-org/mod-metadata on GitHub. Depends on:
- common
- openjdk-8
- maven-3
Registers and deploys mod-metadata modules with persistent storage in a running Okapi instance. Depends on:
- mod-metadata-build
- postgresql
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Loads the Docker image from Docker Hub, registers and deploys as a system service in a running Okapi instance, with persistent storage. Depends on:
- postgresql
- docker-engine
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Loads the Docker image from Docker Hub, registers and deploys as a system service in a running Okapi instance. Depends on:
- docker-engine
- okapi-undeploy
Note: without a running Okapi instance with mod-users, this role will fail
Clones and builds the source from folio-org/mod-users on GitHub. Depends on common, openjdk-8, and maven-3.
Registers and deploys mod-users with persistent storage in a running Okapi instance. Depends on:
- mod-users-build
- postgresql
- okapi-undeploy
Note: without a running Okapi instance, this role will fail.
Builds a Docker image from the Dockerfile and registers it with Okapi. Depends on docker-engine, mod-users-build.
Clones the folio-org/okapi repository from GitHub, installs and launches Okapi as a system service with persistent storage. Depends on common, openjdk-8, maven-3, and postgresql.
Clones the folio-org/okapi repository from GitHub, builds and launches an Okapi server in development mode in a Docker container. Depends on docker-engine.
Installs stripes from the folioci npm repository. Launches the stripes dev server as a system service. Depends on yarn. Includes the following Stripes modules:
- trivial
- ui-items
- ui-okapi-console
- ui-users
Note: requires a running Okapi with a configured tenant, mod-users, and mod-metadata Sample data available in mod-users-data
Installs stripes from the folioci npm repository. Launches the stripes dev server with the Okapi Console as a system service. Depends on yarn.
Note: without a running Okapi instance and a configured tenant, the Okapi Console will not run
Adds the ui-items module to stripes-core from https://repository.folio.org/repository/npm-folioci/ Depends on stripes-core.
Note: without a running Okapi instance and a configured tenant, the Items application will not run.
Adds the ui-okapi-console module to stripes-core from https://repository.folio.org/repository/npm-folioci/ Depends on stripes-core.
Note: without a running Okapi instance, this role will fail.
Adds the ui-users module to stripes-core from https://repository.folio.org/repository/npm-folioci/ Depends on stripes-core.
Note: without a running Okapi instance and a configured tenant, the Users application will not run. Sample user data is available in mod-users-data.