Kubernetes Example Deployment
Overview
Right in the beginning of a long way we would highly recommend to become familiar with the Folio Eureka Platform Overview document
to be aware of main concepts for the new platform.
Setting Up the Environment
Prerequisites:
Kubernetes Cluster (system for automating deployment, scaling, and management of containerized applications)
PostgreSQL (RDBMS used by Keycloak, Kong Gateway, Eureka modules)
Apache Kafka (distributed event streaming platform)
HashiCorp Vault (identity-based secret and encryption management system)
Keycloak (Identity and Access Management)
Kong Gateway (API Gateway)
MinIO (Enterprise Object Store is built for production environments, OPTIONAL)
Elasticsearch or OpenSearch(enterprise-grade search and observability suite)
MinIO is implementation of Object Storage compatible with AWS S3 service.
It also works the other way around instead of MinIO you are free to use AWS S3 service without any problem.
To set up Eureka Platform you should already have Kubernetes Cluster installed. Then just create a new Namespace within K8s Cluster to assign and manage resources granularity for your Eureka deployment.
You can have your cluster nodes on premise in local data center or adopt any cloud provider (i.e. AWS, Azure, GCP and so on) most suitable for you to meet planned or not planned resource demand.
Eureka Platform depends on a bunch of 3rd party services (listed above) for its expected operation. Some of these services (PostgreSQL, Apache Kafka, OpenSearch, Hashicorp Vault) can be deployed as standalone servces outside of cluster namespace but others mostly never depoloyed outside.
For initial Eureka deployment you will need about 30Gb of RAM. Such setup incorporates all mentioned 3rd party services in one kubernetes namespace.
It may require some extra resources (RAM, CPU, HDD Disk Space, HDD IOPS) to be assigned to destination Kubernetes Cluster in case prerequisites services are deployed in to the same cluster namespace.
Also in case you are going to have Consortia deployment it also needs extra resources to be assigned.
In case you make decision to have everything in one place please pay attention for HDD IOPS required by PostgreSQL/OpenSearch/ApacheKafka services.
PostgreSQL RDBMS should be installed to cluster namespace first since its the prerequisite for Kong Gateway and Keycloak Identity Manager.
Apache Kafka service is used by Eureka for internal communication between modules and very important to keep it in a good shape.
HashiCorp Vault stores all secrets used within Platform. AWS SSM Parameters are also supported as secrets' storage now.
Keycloak service provides authentication and authorization (granting access) for any kind of identities (users, roles, endpoints).
Kong Gateway as API Gateway routes requests to modules and provides access to Eureka REST APIs.
MinIO object storage keeps data for some modules to be used during platform operation.
Elasticsearch instance contains huge amount of information and indexes it for a fast search. It is very important to look after appropriate level of performance for this service. Also can be installed outside of Kubernetes Cluster.
Expected Prerequisites deployment order:
Hashicorp Vault
PostgreSQL
Apache Kafka
ElasticSearch
MinIO (Optional)
Kong Gateway
Keycloak Identity Manager
Cluster setup
Lets assume you are going to set up Eureka Platform development environment on Kubernetes Cluster. To meet resource scalability ease during workload spikes it worth to use Cloud Services like EKS (AWS), AKS (Azure), GKE (GCP).
In the same time to control cloud vendor lock and cut down expences we are going to deploy all prerequisite services into the one cluster namespace except OpenSearch instance :)
To deploy prerequisite services we would recommend to adopt following Container (Docker) Images and Helm Charts:
PostgreSQL container Image: hub.docker.com/bitnami/postgresql , Helm Chart: github.com/bitnami/charts/postgresql
Apache Kafka container Image: hub.docker.com/bitnami/kafka, Helm Chart: github.com/bitnami/charts/kafka
Hashicorp Vault container Image: hub.docker.com/bitnami/kafka, Helm Chart: github.com/bitnami/charts/vault
Keycloak container Image: hub.docker.com/folioci/folio-keycloak, Helm Chart: github.com/bitnami/charts/kong, Git Repository github.com/folio-org/folio-keycloak
Kong Gateway container Image: hub.docker.com/folioci/folio-kong, Helm Chart: charts/bitnami/keycloak, Git Repository github.com/folio-org/folio-kong
MinIO container Image: hub.docker.com/bitnami/minio Helm Chart: github.com/bitnami/charts/minio
Also we need to have Module Descriptors Registry to be in place.
Module Descriptors Registry service (MDR) represents HTTP Server that configured in Kubernetes Pod.
Also this Service can be hosted as a static website using Amazon S3.
This HTTP Server holds and distributes Modules Descriptors for Eureka Instance install and updade.
Module descriptor (see Module Descriptor Template) is generated during Continues Integration Flow and is put to Modules Descriptor Registry on finish.
These modules descriptors are used by Eureka install and update flows.
Deploying EUREKA on Kubernetes
Once all Prerequisites are met we can proceed with mgr-* Eureka modules deployment to cluster namespace:
mgr-applications module:
Github Repository folio-org/mgr-applications
Container Image folioci/mgr-applications
Helm Chart charts/mgr-applications
Helm Chart variable values (
./values/mgr-applications.yaml
file below):
mgr-tenant-entitlements module:
Github Repository folio-org/mgr-tenant-entitlements
Container Image folioci/mgr-tenant-entitlements
Helm Chart charts/mgr-tenant-entitlements
Helm Chart variable values(
./values/mgr-tenant-entitlements.yaml
file below):
mgr-tenants module:
Github Repository folio-org/mgr-tenants