Kubernetes installation
The following installation steps assumes that a kubernetes server with Okapi, Postgres, Kafka/Zookeeper, Elasticsearch and a namespace folio is available.
So that the deployment works, Okapi needs to be running with service discovery enabled.
Here is a Dockerfile to build an image of Okapi with Kubernetes integration.
Create a config named myFolio, with th e fqdn of okapi and the port. If Okapi is running with ssl add –ssl to the command:
foliolib server create myFolio --host <fqdn okapi> --port 9130 [--ssl]
Copy the kube config file to $HOME/.foliolib/myFolio/kube_config
Edit the File $HOME/.foliolib/myFolio/server.conf and add the following Kubernetes and Env section and replace the database and kafka config with your values:
[Kubernetes] enable = True namespace = folio memoryRequestPercentage = 10 [Env] db_host = <fqdn postgres> db_port = 5432 db_username = folio db_password = folio_password db_database = okapi_modules db_querytimeout = 120000 db_charset = UTF-8 db_maxpoolsize = 50 db_connection_timeout = 100 kafka_host = <fqdn kafka> kafka_port = 9092 okapi_url = http://okapi:9130 # replication_factor = 3
Create the file $HOME/.foliolib/myFolio/modules/mod-erm-usage-harvester.conf
[Kubernetes] hazelcast = True
Create the file $HOME/.foliolib/myFolio/modules/mod-agreements.conf
[Env] okapi_service_host = okapi okapi_service_port = 9130 [Resources] max-memory = 1200Mi [Kubernetes] hazelcast = True
Create the file $HOME/.foliolib/myFolio/modules/mod-search.conf and replace the ELASTIC_PASSWORD and MODSEARCH_PASSOWRD with your own value:
[Env] ELASTICSEARCH_URL = http://<fqdn elasticsearch>:9200 ELASTICSEARCH_PORT = 9200 ELASTICSEARCH_HOST = <fqdn elasticsearch> ELASTICSEARCH_USERNAME = elastic ELASTICSEARCH_PASSWORD = ELASTIC_PASSWORD INITIAL_LANGUAGES = eng,ger SYSTEM_USER_PASSWORD = MODSEARCH_PASSOWRD
Create the file $HOME/.foliolib/myFolio/modules/mod-remote-storage.conf
[Kubernetes] hazelcast = True
Create the file $HOME/.foliolib/myFolio/modules/mod-pubsub.conf and replace MOD_PUBSUB_PASSWORD with your own value:
[Env] SYSTEM_USER_PASSWORD = MOD_PUBSUB_PASSWORD
Install a folio tenant named test:
foliolib platform install test --loadReference --loadSample -a -p R1-2023-GA
Create a superuser for the tenant test with username test and password test:
foliolib folio superuser test -u test -p test
Install the Frontend for the folio platform R1-2023-GA for the tenant test.