Our deployment is on an Oracle Enterprise Linux 7 VM that is running docker engine. We are currently running folio in 20 docker containers. Okapi does not deploy any of the containers, everything is deployed by hand/manually. Here is an overview of our deployment process:
- Docker - Install and configure docker.
- PostgreSQL - We have a postgresql container image. (NOTE: Running postgresql in a container is not recommended for a production environment and is done here only as a proof of concept.) In this image we use a postgresql database dump from the "snapshot" vagrant VM to initialize the database. We also add several postgresql users and roles that are necessary to get the databases up and running. The postgresql image is based upon this website.
- OKAPI - We have a custom image for okapi. This image is based upon Wayne's documentation, and we build okapi from source using maven to build the code. We point okapi at the postgresql container.
- Stripes - We have a custom image for stripes. This image is also based upon Wayne's documentation, and we use the folio-testing-platform as our base to build stripes. We serve up stripes using nginx. Currently, we have to re-build this image each time the okapi external url changes.
Create Tenant - Next we execute a shell script with curl commands to create a tenant within okapi and to enable the default okapi module.
Dependencies - Either using a test instance of okapi or the current instance of okapi, we pull all of the registered modules from indexdata to okapi.
We create an enable.json file (either edit one by hand or using Wayne's Pearl Script). We then pass enable.json to install&simulate=true to determine what modules we need to enable/register (output to full-install.json).
- Back End Modules - Using the information supplied in full-install.json, we find the necessary modules in dockerhub.com/folioci. We spin up the backend module containers using docker commands and point them at the postgresql database container (approximately 17 containers).
Okapi Scripts - Once the containers are up, we run a shell script to determine the docker ip addresses to use to register the containers with the okapi discovery service.
We run another shell script to (a) register backend modules with okapi (b) deploy the modules to the okapi discovery service and (c) enable the modules for the tenant. It is important to do this in the correct order or some modules will not enable/register with okapi.
Lastly, we run a shell script to (a) register the front-end modules with okapi and (b) enable them for the tenant.
- Finished - You should now be able to point a browser at stripes and login. (We have our stripes instance behind our load balancer).