IUDX platform can be deployed in Docker Swarm using the scripts and Swarm code present in this directory and sub-directories. Each component is deployed as a single instance in Swarm. The components can be scaled manually. IUDX platform exposes endpoints through two ports - one for HTTPS traffic which it passes to Nginx and Nginx routes to appropriate service; one for Rabbitmq management and AMQPS streaming. The whole system is monitored using a monitoring stack module - Prometheus for metrics, promtail and Loki for logs, and Grafana for visualization and alerting. The overall architecture of Swarm deployment is summarised in the below figure.
- Scaling of services can be done manually by increasing the number of replica containers backing the swarm service.
- Cloud agnostic deployment, achieved through the layered architecture of deployment and using open source tools whenever possible instead of using cloud services.
- Cost-effective deployment, typically can be done with 4-6 nodes or a single node based on load requirements
- It is useful for small-scale deployment/prototyping/proof-of-concept(PoC) where reliability is not critical.
IUDX deployment in Docker swarm is based on layered architecture as depicted below figure: Layered architecture gives more flexibility in replacing different technology/software in one layer and not affecting the whole deployment. The Layered approach also enables the deployment to be cloud agnostic.
-
First layer is cloud infrastructure, which would include bringing up the necessary infrastructure for Swarm deployment - VPC, subnet, Load balancers, IAM users, roles, Service Accounts, Virtual Machines, and Security Groups.
-
Operating System: This can be any Linux-based modern server distribution that is supported by Docker. Deployment is tested and supported on Ubuntu 20/22.04 LTS distribution.
-
Docker: Docker (docker-ce, docker-cli, build, compose plugin) needs to be installed in all the nodes to create the swarm
-
Docker Swarm: Docker swarm cluster of all nodes ( can be one or more) needs to be created with an overlay network named "overlay-net". Installation of docker and creation of swarm with appropriate node labels is achieved using scripts at infrastructure
-
Addons - The components which are essential for certain features on top of Swarm that IUDX deployment will actively use but not part of the IUDX platform are classified as addons. This typically includes
- HTTPS API Gateway- Nginx
- Monitoring Stack
-
Workload/IUDX system: This is the actual deployment of IUDX components in the Docker swarm cluster. This is deployed through stack files, present in this directory.
The deployment order follows in a layered way with the innermost layer deployed first and then the next layer, until the final layer of the IUDX system. The IUDX system has a lot of components and needs to be orderly deployed, as described in next sub-section
IUDX components depend on each other and are represented below in Directed Acyclic Graph (DAG).
From DAG, the components can be deployed as follows in 6 stages:
- Stage 1
- Immudb
- Rabbitmq
- Postgresql
- Redis
- Zookeeper
- Elasticsearch (Deploy ELK together)
- Stage 2
- Logstash
- Kibana
- Keycloak
- Latest ingestion pipeline
- Auditing server
- Stage 3
- AAA server
- Stage 4
- Catalogue server
- Stage 5
- Resource Server
- Resource Server Proxy
- File server
- GIS server
- Data Ingestion server
- Stage 6
- Advance Monitoring Stack