2.1. Installation
GEMINI Digital Twin is compiled as docker container, thus it will be easy to setup and replicate to a server (on premises or cloud). It is needed to have a basic knowledge of Docker to install this tool. Several tutorial can be found in the internet (example)
The pre-requisite software of this installation are:
Docker Desktop (https://docs.docker.com/engine/install/)
Docker Compose (https://docs.docker.com/compose/install/)
- docker-compose.yml
1version: '3.8' 2 3networks: 4 gemini: 5 6services: 7 gemini_framework: 8 image: ghcr.io/gemini-digital-twin/gemini-framework:MVPv2 9 environment: 10 - GEMINI_PLANT= # put project name 11 - INFLUXDB_URL=http://influxdb:8086 12 - INFLUXDB_ORG=TNO 13 - INFLUXDB_USERNAME=gemini-username 14 - INFLUXDB_PASSWORD=gemini-password 15 - INFLUXDB_BUCKET=gemini-project 16 volumes: 17 - project-db:/opt/gemini-project 18 depends_on: 19 - influxdb 20 networks: 21 - gemini 22 23 gemini_gui: 24 image: ghcr.io/gemini-digital-twin/gemini-user-interface:MVPv2 25 ports: 26 - 5101:5101 27 environment: 28 - GEMINI_FRONTEND_PORT=5101 29 - GEMINI_MYSQLDB_URL=mysqldb 30 - CELERY_BROKER_URL=redis://redis:6379/0 31 - CELERY_RESULT_BACKEND=redis://redis:6379/0 32 - MONGODB_HOST=mongodb 33 - MONGODB_PORT=27017 34 - MONGODB_USERNAME=root 35 - MONGODB_USERNAME=gemini 36 - INFLUXDB_URL=http://influxdb:8086 37 - INFLUXDB_ORG=TNO 38 - INFLUXDB_USERNAME=gemini-username 39 - INFLUXDB_PASSWORD=gemini-password 40 - INFLUXDB_BUCKET=gemini-project 41 - GEMINI_ADMIN_EMAIL=admin@localhost 42 - GEMINI_ADMIN_PASSWORD=Admin123456!@#$ 43 restart: unless-stopped 44 volumes: 45 - project-db:/opt/gemini-project 46 - doc-db:/opt/gemini-documentation 47 depends_on: 48 - mysqldb 49 - influxdb 50 - mongodb 51 - redis 52 networks: 53 - gemini 54 55 gemini_celery: 56 image: ghcr.io/gemini-digital-twin/gemini-celery:MVPv2 57 environment: 58 - PYTHONUNBUFFERED=1 59 - CELERY_BROKER_URL=redis://redis:6379/0 60 - CELERY_RESULT_BACKEND=redis://redis:6379/0 61 restart: unless-stopped 62 volumes: 63 - project-db:/opt/gemini-project 64 depends_on: 65 - redis 66 networks: 67 - gemini 68 69 gemini_doc: 70 image: ghcr.io/gemini-digital-twin/gemini-documentation:MVPv2 71 restart: unless-stopped 72 volumes: 73 - doc-db:/opt/gemini-documentation 74 networks: 75 - gemini 76 77 gemini_project: 78 image: ghcr.io/gemini-digital-twin/gemini-project:MVPv2 79 restart: unless-stopped 80 volumes: 81 - project-db:/opt/gemini-project 82 networks: 83 - gemini 84 85 grafana: 86 image: grafana/grafana:latest 87 ports: 88 - 3000:3000 89 environment: 90 - GF_SECURITY_ALLOW_EMBEDDING=true 91 - GF_SECURITY_ADMIN_USER=admin 92 - GF_SECURITY_ADMIN_PASSWORD=G3m1n!_@dmin 93 volumes: 94 - grafana-storage:/var/lib/grafana 95 depends_on: 96 - influxdb 97 networks: 98 - gemini 99 100 mysqldb: 101 image: mysql:8.0 102 ports: 103 - 3306:3306 104 environment: 105 - MYSQL_ROOT_PASSWORD=root 106 - MYSQL_DATABASE=geminidb 107 volumes: 108 - mysqldb_data-storage:/data/db 109 - mysqldb_var_lib-storage:/var/lib/mysql 110 restart: unless-stopped 111 networks: 112 - gemini 113 114 influxdb: 115 image: influxdb:latest 116 ports: 117 - 8086:8086 118 - 8998:8088 119 environment: 120 - DOCKER_INFLUXDB_INIT_MODE=setup 121 - DOCKER_INFLUXDB_INIT_ORG=TNO 122 - DOCKER_INFLUXDB_INIT_BUCKET=gemini-project 123 - DOCKER_INFLUXDB_INIT_USERNAME=gemini-user 124 - DOCKER_INFLUXDB_INIT_PASSWORD=gemini-password 125 volumes: 126 - influxdb-storage:/var/lib/influxdb 127 - influxdb2-storage:/var/lib/influxdb2 128 - influxdb2etc-storage:/etc/influxdb2 129 restart: unless-stopped 130 networks: 131 - gemini 132 133 redis: 134 image: redis:6-alpine 135 ports: 136 - 6379:6379 137 restart: unless-stopped 138 networks: 139 - gemini 140 141 mongodb: 142 image: mongo:latest 143 ports: 144 - 27017:27017 145 environment: 146 - MONGO_INITDB_ROOT_USERNAME=root 147 - MONGO_INITDB_ROOT_PASSWORD=gemini 148 volumes: 149 - mongo-storage:/data/db 150 restart: unless-stopped 151 networks: 152 - gemini 153 154volumes: 155 mysqldb_data-storage: 156 mysqldb_var_lib-storage: 157 grafana-storage: 158 influxdb-storage: 159 influxdb2-storage: 160 influxdb2etc-storage: 161 project-db: 162 doc-db: 163 mongo-storage:
There are several services in this docker-compose.yml file:
- GEMINI Framework
This container runs the real-time modules when is called. The container shares volume of project-db with other container to have a common project data. The project name should be given in GEMINI_PLANT environment variable. This container depends on InfluxDB container to access the real-time data.
- GEMINI User interface (GUI)
This container provides the web user interface of GEMINI. This container depends on MySQLDB container to access user authentication and project. The port number can be defined in GEMINI_FRONTEND_PORT environment variable. The container shares volume of project-db with other container to have a common project data and volume of doc-db to access the documentation.
- GEMINI Celery
Celery is an open source asynchronous task queue or job queue which is based on distributed message passing. While it supports scheduling, its focus is on operations in real time.
- GEMINI Documentation
This container provides the web-based documentation of GEMINI. The content is shared with GEMINI User Interface container.
- GEMINI Project
This container provides the shared volume project-db that can be accessed by GEMINI Framework container and GEMINI User Interface container.
- Grafana
This is a multi-platform open source analytics and interactive visualization web application. It can produce charts, graphs, and alerts for the web when connected to supported data sources. It is used to visualize the time series data.
- MySQLDB
It is an open-source relational database management system. To handle several data structured of GEMINI.
- InfluxDB
It is an open-source time series database. It is used for storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. We use this database to store time series data from Geothermal assets.
- REDIS
Redis is an open source data structure server. It belongs to the class of NoSQL databases known as key/value stores. Redis is used as result and message broker of celery workflow.
- MongoDB
MongoDB is built on a scale-out architecture that has become popular with developers of all kinds for developing scalable applications with evolving data schemas. As a document database, MongoDB makes it easy for developers to store structured or unstructured data.