Categories

Versions

You are viewing the RapidMiner Hub documentation for version 10.1 - Check here for latest version

Docker-compose deployment

This document will help you to deploy RapidMiner AI Hub on a single host. For multi-host deployments, see Kubernetes deployment with Helm.

To deploy RapidMiner AI Hub with docker compose:

All versions: [10.0.0] - [10.0.1] - [10.1.0] - [10.1.2] - [10.1.3]

Table of contents

System requirements

Rootless Docker was introduced in Docker Engine version 19.03 as an experimental feature, and graduated from that status in version 20.10.

Hence, it is recommended that you use version >= 20.10 of the Docker Engine.

For details related to the operating system, see the distribution-specific hints. Note that CentOS 6/7 are not supported, because unprivileged user namespaces are not supported in Linux kernel versions < 3.19.

Minimum recommended hardware configuration

The amount of memory needed depends heavily on the amount of data that will be processed by RapidMiner AI Hub. By themselves, the RapidMiner services can run with as little as 16 GB. However, in production environments, we recommend 32GB or more depending on user data, in order to provide users with enough capacity to analyze data from realistic use cases.

Each virtual or physical machine should at least have:

  • Quad core
  • 32GB RAM
  • >30GB free disk space

Profiles

If you only want a subset of the features provided by RapidMiner AI Hub, you can use the profiles feature of docker compose to pick and choose from the following set:

Profile Description
aihub-activemq aihub-activemq
aihub-backend aihub-backend
aihub-frontend aihub-frontend
aihub-job-agent Job Agent
altair-license Licensing
ces Coding environment storage
deployment-init deployment-init
grafana Dashboards
jupyter JupyterHub
keycloak Keycloak
landing-page Landing page
letsencrypt letsencrypt
platform-admin Platform Admin
proxy Proxy
scoring-agent Real-Time Scoring
token-tool Token generator

In the environment file, edit the variable COMPOSE_PROFILES to choose your subset. Note that value of COMPOSE_PROFILES is a comma-separated list with no spaces.

# Maximum set
# COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent,jupyter,grafana,scoring-agent,platform-admin,ces,token-tool,letsencrypt,go,tabgo

# Minimum set
# COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent

# Go profile set
# COMPOSE_PROFILES=deployment-init,proxy,keycloak,landing-page,go

# Default set
COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent,jupyter,grafana,scoring-agent,platform-admin,ces,token-tool,letsencrypt

Instructions

To deploy this template, take the following steps.

  1. If you have not yet done so, install Docker.

  2. Download the ZIP file. Unzip and examine the contents:

    • .env (note that because of the preceding dot, this file is usually hidden)
    • docker-compose.yml
    • go folder
    • ssl folder
  3. (optional) By default, RapidMiner AI Hub will start with the set of services identified in the COMPOSE_PROFILES variable, as discussed above. You can choose a different set of profiles by setting the following variable in the .env file:

    • COMPOSE_PROFILES

    If you are using the traditional RapidMiner License, you should disable the altair-license profile.

  4. As discussed in detail below, set the following variables in the .env file:

    • PUBLIC_DOMAIN
    • PUBLIC_URL
    • SSO_PUBLIC_DOMAIN
    • SSO_PUBLIC_URL
  5. (Altair Units license only) Skip to the next step if you are using RapidMiner licensing.

    By default, AI Hub uses Altair Unit licensing. Make sure that altair-license is enabled in your profiles.

  6. (RapidMiner license only) Skip to the next step if you are using Altair Units licensing.

    Set the following variable to RAPIDMINER in the .env file:

     LICENSE_MODE=RAPIDMINER
    

    and the following variables with the values of your licenses from my.rapidminer.com:

    • LICENSE

    With SCORING_AGENT_ENABLE_SERVER_LICENSE=true, the AI Hub license will be used also for the bundled RTS deployment. The RTS status is visible after logging in, via Platform Administration.

    Finally, uncomment the LICENSE_LICENSE variable in docker-compose.yml:

     # Legacy licensing
     - LICENSE_LICENSE=${LICENSE}
    
  7. (optional) Set additional frequently used configuration values:

    • The initial admin password can be set using the variable KEYCLOAK_PASSWORD (default: "changeit")
    • The AUTH_SECRET value is used as internal authentication encryption key. We propose to change the default value to any base64 encoded string.
  8. Transfer the contents of the ZIP file, with URLs and licenses configured, to the server host, the machine where you installed Docker.

  9. Connect to the server host, and change directory to the folder containing those files. Please make sure the .env file is readable and writable by all users:

     sudo chmod a+rw .env
    
  10. If SSO configuration is not disabled (this is the case by default), then the platform deployment needs to be initialized before the first startup. In the directory containing docker-compose.yml, type:

    docker compose up -d deployment-init
    

    If immediately afterwards you type

    docker compose logs -f deployment-init
    

    you can observe the initialization taking place, and you will know that you are ready to execute the next step when you see the following text printed repeatedly to the screen, typically after 1-2 minutes:

    [DEPLOYMENT INIT] Successfully finished.
    

    Alternatively, if you observe the following error message:

    | [RM INIT] Starting...
    | [RM INIT] Starting job /rapidminer/provision/tasks/01_check_permissions.sh
    | touch: cannot touch '/tmp/ssl/.test_permission': Permission denied
    | Permission denied on file/directory ssl/ !
    |     Please make sure about good permissions of these files/dirs:
    |       - .env : it should be writable by anyone (666, or -rw-rw-rw-)
    |       - ssl : it should be writable by anyone (777, or drwxrwxrwx)
    

    make sure to set the appropriate permissions on the ssl directory:

    sudo chown -R 2011:0 ssl/
    sudo chmod -R ug+w ssl/
    sudo chmod -R o-rwx ssl/
    

    before reissuing the initial command:

    docker compose up -d deployment-init
    
  11. Finally, start the stack by running the command:

    docker compose up -d
    

    Again, you can observe the progress of startup with the command:

    docker compose logs -f deployment-init
    

    The service deployment-init will exit without error when complete.

If the Docker images are not available on the host, they will be automatically downloaded from the Docker Hub.

PUBLIC_URL

The deployed stack needs to have a valid public URL, both for internal communication and so that external clients (like RapidMiner Studio and a browser) can connect to it. In the .env file, before first startup, set the values of the environment variables PUBLIC_URL and SSO_PUBLIC_URL to this public URL.

  • The values http://localhost and http://127.0.0.1 are not supported, because this URL will be used also for internal container-to-container communication between our services.

  • If deploying on a single host, use the host's public IP address, such as http://192.168.1.101 or a publicly resolvable hostname that resolves to this IP address, like http://platform.rapidminer.com.

  • If the deployment cannot listen on the default HTTP and HTTPS ports (80 and 443), then read Change the default port.

  • It is highly preferred to use HTTPS for the connection. In this case the PUBLIC_URL and SSO_PUBLIC_URL variables should be configured using the https:// prefix and the certificate chain and private key files should be provided in PEM format in the ssl sub-folder using the filenames certificate.crt and private.key. The default filenames can be changed using the environment variables in the Proxy section of the .env file. Make sure to set the permissions of the ssl directory as indicated above in the final point of the instructions.

Once the deployment is running, the configured reverse proxy listens by default on the standard HTTP (80) port, and also on the HTTPS (443) port if an HTTPS certificate is configured.

The initial login credentials are set in the .env file (by the variables KEYCLOAK_USER and KEYCLOAK_PASSWORD). By default you can log in using the username "admin" and password: "changeit".

From the landing page at PUBLIC_URL, the full range of services of RapidMiner AI Hub is available.

The environment file (.env)

# ############################################
#
# Global parameters
#
# ############################################

# Public domain of the deployment
PUBLIC_DOMAIN=platform.rapidminer.com

# Public URL of the deployment that will be used for external access (Public domain + protocol + port)
PUBLIC_URL=http://platform.rapidminer.com

# Public domain of the SSO endpoint that will be used for external access. In most cases it should be the same as the PUBLIC_DOMAIN
SSO_PUBLIC_DOMAIN=platform.rapidminer.com

# Public URL of the SSO endpoint that will be used for external access. In most cases it should be the same as the PUBLIC_URL
SSO_PUBLIC_URL=http://platform.rapidminer.com

# SSO default parameters
SSO_IDP_REALM=master
SSO_SSL_REQUIRED=none

WEBMASTER_MAIL=operations@sampleorg.com

# Enable/disable the service build into the RapidMiner cloud images, that updates the PUBLIC_URL and SSO_PUBLIC_URL variables to the new dynamic cloud hostname/IP address
AUTOMATIC_PUBLIC_URL_UPDATE_FOR_CLOUD_IMAGES=false

# Enable/disable the Legacy BASIC authentication support for REST endpoints, like webservices. (lowercase true/false)
LEGACY_REST_BASIC_AUTH_ENABLED=false

# Timezone setting
TZ=UTC

# License mode for the platform
# Supported modes are 'ALTAIR_UNIT' and 'RAPIDMINER'
LICENSE_MODE=ALTAIR_UNIT

# Legacy RapidMiner License
# Providing LICENSE variable is colliding with LICENSE_ENABLE_ALTAIR, please provide this variable only if you have legacy license.
# In that case please take care to un-comment the relevant lines (LICENSE_LICENSE environment variables) in the docker-compose.yml too
LICENSE=

# Profiles
# A coma separated list of active profiles

# For deployments with legacy licensing please disable altair-license in your profile

# Maximum set
# COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent,jupyter,grafana,scoring-agent,platform-admin,ces,token-tool,letsencrypt

# Minimum set
# COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent

# Default set
COMPOSE_PROFILES=deployment-init,proxy,keycloak,altair-license,landing-page,aihub-frontend,aihub-backend,aihub-activemq,aihub-job-agent,jupyter,grafana,scoring-agent,platform-admin,ces,token-tool,letsencrypt

# Docker-compose timeout setting
COMPOSE_HTTP_TIMEOUT=600

# ############################################
#
# Deployment parameters
#
# ############################################

# Prefix to use for docker registry
REGISTRY=rapidminer/

# Version of the Init container
INIT_VERSION=10.1.3

# Enable configuring server settings for Python Scripting extension
INIT_SHARED_CONDA_SETTINGS=true

# ############################################
#
# Proxy
#
# ############################################

PROXY_VERSION=10.1.3

UNPRIVILEGED_PORTS=false
PROXY_DATA_UPLOAD_LIMIT=10240M

# Backends
AIHUB_FRONTEND=http://aihub-frontend
AIHUB_BACKEND=http://aihub-backend:8080
GRAFANA_BACKEND=http://grafana:3000/
JUPYTERHUB_BACKEND=http://jupyterhub:8000/
KEYCLOAK_BACKEND=http://keycloak:8080
KIBANA_BACKEND=http://rm-kibana:5601
LANDING_BACKEND=http://landing-page:1080/
LETSENCRYPT_BACKEND=http://letsencrypt:1084/
METRICS_BACKEND=http://prometheus:9090/
PLATFORM_ADMIN_BACKEND=http://platform-admin:1082/
SCORING_AGENT_BACKEND=http://scoring-agent:8090/
SCORING_AGENT_WEBUI_BACKEND=http://platform-admin:1082/
STANDPY_BACKEND=http://standpy-router/
TOKEN_BACKEND=http://token-tool:1080/
# Backend suffixes
GRAFANA_URL_SUFFIX=/grafana
JUPYTERHUB_URL_SUFFIX=/jupyter/
KIBANA_URL_SUFFIX=/kibana
METRICS_URL_SUFFIX=/metrics
PLATFORM_ADMIN_URL_SUFFIX=/platform-admin
SCORING_AGENT_URL_SUFFIX=/rts
SCORING_AGENT_WEBUI_URL_SUFFIX=/rts-admin
STANDPY_URL_SUFFIX=/standpy
TOKEN_TOOL_URL_SUFFIX=/get-token
# Default Basic Auth Accesses
METRICS_AUTH_BASIC_USER=admin
METRICS_AUTH_BASIC_PASS=changeit
LOGS_AUTH_BASIC_USER=admin
LOGS_AUTH_BASIC_PASS=changeit
SCORING_AGENT_BASIC_AUTH=true
# Change these when you want to use non-default pair to login
SCORING_AGENT_ADMIN_USER=admin
SCORING_AGENT_ADMIN_PASSWORD=changeit
# HTTPS settings
ALLOW_LETSENCRYPT=true
HTTPS_CRT_PATH=/etc/nginx/ssl/certificate.crt
HTTPS_KEY_PATH=/etc/nginx/ssl/private.key
HTTPS_KEY_PASSWORD_FILE_PATH=/etc/nginx/ssl/password.txt
HTTPS_DH_PATH=/etc/nginx/ssl/dhparam.pem

WAIT_FOR_DHPARAM=true
DEBUG_CONF_INIT=false

# ############################################
#
# KeyCloak (SSO)
#
# ############################################

# Keycloak container version
KEYCLOAK_VERSION=10.1.3

# Keycloak database parameters
KEYCLOAK_POSTGRES_VERSION=10.1.3
KEYCLOAK_DBSCHEMA=kcdb
KEYCLOAK_DBUSER=kcdbuser
KEYCLOAK_DBPASS=changeit
KEYCLOAK_POSTGRES_INITDB_ARGS="--encoding UTF8 --locale=C /var/lib/postgresql/data"

# Default platform admin user credentials
KEYCLOAK_USER=admin
KEYCLOAK_PASSWORD=changeit

KC_FEATURES=token-exchange,upload_scripts
KC_HOSTNAME_STRICT="false"
KC_HOSTNAME_STRICT_BACKCHANNEL="false"
KC_HOSTNAME_STRICT_HTTPS="false"
KC_LOG_LEVEL=info
KC_PROXY=edge
KC_HTTP_ENABLED="true"

# ############################################
#
# License Proxy
#
# ############################################

LICENSE_PROXY_VERSION=10.1.3
# License Proxy url with protocol and port
LICENSE_PROXY_INTERNAL_URL=http://license-proxy:9898
# Unique machine id of the deployment
# may be generated with the command: echo "$(openssl rand -hex 4)-$(openssl rand -hex 2)-$(openssl rand -hex 2)-$(openssl rand -hex 2)-$(openssl rand -hex 6)"
LICENSE_AGENT_MACHINE_ID="00000000-0000-0000-0000-000000000000"
# supported modes are 'on_prem' and 'altair_one'
LICENSE_PROXY_MODE=on_prem

# ## settings for 'on_prem' mode ###
# Altair License Manager path for on-prem mode pointing to an Altair Lincense Manager endpoint in format of port@host
# must be set if mode is 'on_prem'
ALTAIR_LICENSE_PATH=
# ##

# ## settings for 'altair_one' mode ###
# Authentication type for communicating with license server
# possible values are 'credentials' and 'static_token'
LICENSE_UNIT_MANAGER_AUTHENTICATION_TYPE=credentials

# ##### settings for 'credentials' authentication type
# Altair One username. Must be set if the authentication type is 'credentials' and License Proxy mode is 'altair_one'
LICENSE_UNIT_MANAGER_USER_NAME=
# Altair One password. Must be set if the authentication type is 'credentials' and License Proxy mode is 'altair_one'
LICENSE_UNIT_MANAGER_PASSWORD=
# When mode is 'altair_one', resets any stored auth code when 'credentials' already persisted a valid auth token
LICENSE_UNIT_MANAGER_RESET_AUTH_TOKEN=false
# #####

# ##### settings for 'static_token' authentication type
# License Server access token. Must be set if the authentication type is 'static_token' and License Proxy mode is 'altair_one'
LICENSE_UNIT_MANAGER_TOKEN=
# #####
# ##

# ############################################
#
# Rapidminer AiHub
#
# ############################################

AIHUB_FRONTEND_VERSION=10.1.3
AIHUB_BACKEND_VERSION=10.1.3
AIHUB_POSTGRES_VERSION=10.1.3
AIHUB_DBHOST=aihub-postgresql
AIHUB_DBSCHEMA=aihub-db
AIHUB_DBUSER=aihub-db-user
AIHUB_DBPASS=changeit
AIHUB_POSTGRES_INITDB_ARGS="--encoding UTF8 --locale=C /var/lib/postgresql/data"
AIHUB_FRONTEND_SSO_CLIENT_ID=aihub-frontend
AIHUB_BACKEND_SSO_CLIENT_ID=aihub-backend
AIHUB_BACKEND_SSO_CLIENT_SECRET=
AIHUB_BACKEND_HOSTNAME=aihub-backend
AIHUB_BACKEND_PORT=8080
AIHUB_BACKEND_INTERNAL_URL=http://aihub-backend:8080
# AiHub and JA authenticates using this shared secret, which shall be a random string in base64 encoded format
# echo $RANDOM | md5sum | head -c 20; echo | base64;
AUTH_SECRET=TTY5MjUxbzRBN2ZIWThpNGVKNGo4V2xqOHk0dTNV

# ############################################
#
# Job Agent
#
# ############################################

JOBAGENT_VERSION=10.1.3
JOBAGENT_QUEUE_ACTIVEMQ_URI=failover:(tcp://aihub-activemq:61616)
JOBAGENT_CONTAINER_COUNT=2
JOBAGENT_SSO_CLIENT_ID=aihub-jobagent
JOBAGENT_SSO_CLIENT_SECRET=
JOBAGENT_JOB_QUEUE=DEFAULT
JOBAGENT_CONTAINER_MEMORYLIMIT=2048
AIHUB_BACKEND_PROTOCOL=http
JOBAGENT_NAME=JOBAGENT-1

# ############################################
#
# ActiveMQ
#
# ############################################

ACTIVEMQ_VERSION=10.1.3
BROKER_ACTIVEMQ_USERNAME=amq-user
BROKER_ACTIVEMQ_PASSWORD=M69251o4A7fHY8i4eJ4j8Wlj8y4u3U

# ############################################
#
# Jupyterhub
#
# ############################################

JUPYTERHUB_VERSION=10.1.3
JUPYTERHUB_DBHOST=jupyterhub-db
JUPYTERHUB_DBSCHEMA=jupyterhub
JUPYTERHUB_DBUSER=jupyterhubdbuser
JUPYTERHUB_DBPASS=changeit
JUPYTERHUB_HOSTNAME=jupyterhub
JUPYTERHUB_POSTGRES_INITDB_ARGS="--encoding UTF8 --locale=C /var/lib/postgresql/data"
# Jupyterhub crypt key can be generated with the command: openssl rand -hex 32
JUPYTERHUB_CRYPT_KEY=ab7207529f552a686326dae86bb64e2e7d11c9018e73fdcc06039bc5965cc606
JUPYTERHUB_DEBUG=False
JUPYTERHUB_TOKEN_DEBUG=False
JUPYTERHUB_PROXY_DEBUG=False
JUPYTERHUB_DB_DEBUG=False
JUPYTERHUB_SPAWNER_DEBUG=False
JUPYTERHUB_STACK_NAME=default
JUPYTERHUB_SSO_CLIENT_ID=jupyterhub
JUPYTERHUB_SSO_CLIENT_SECRET=
JUPYTERHUB_SPAWNER=dockerspawner
JUPYTERHUB_API_PROTOCOL=http
JUPYTERHUB_API_HOSTNAME=jupyterhub
JUPYTERHUB_PROXY_PORT=8000
JUPYTERHUB_API_PORT=8001
JUPYTERHUB_APP_PORT=8081
# JUPYTERHUB_CUSTOM_CA_CERTS=${PWD}/ssl/deb_cacerts/
JUPYTERHUB_DOCKER_DISABLE_NOTEBOOK_IMAGE_PULL_AT_STARTUP=False

# ############################################
#
# Jupyter Notebook
#
# ############################################

JUPYTERHUB_NOTEBOOK_VERSION=10.1.3

JUPYTERHUB_NOTEBOOK_SSO_NB_UID_KEY=X_NB_UID
JUPYTERHUB_NOTEBOOK_SSO_NB_GID_KEY=X_NB_GID
JUPYTERHUB_NOTEBOOK_SSO_CUSTOM_BIND_MOUNTS_KEY=X_NB_CUSTOM_BIND_MOUNTS
# Content should be in json format, use quotes here instead of apostrophes
# JUPYTERHUB_NOTEBOOK_CUSTOM_BIND_MOUNTS={"/usr/share/doc/apt":"/tmp/apt","/usr/share/doc/mount/":"/tmp/mount"}
JUPYTERHUB_NOTEBOOK_CUSTOM_BIND_MOUNTS=
JUPYTERHUB_NOTEBOOK_CPU_LIMIT=100
# Docker
JUPYTERHUB_NOTEBOOK_MEM_LIMIT=2g
#k8s
# JUPYTERHUB_NOTEBOOK_MEM_LIMIT=2G
JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_DOCKERSPAWNER=coding-shared-vol
# kubespawner
# JUPYTERHUB_NOTEBOOK_KUBERNETES_CMD: '/entrypoint.sh'
# JUPYTERHUB_NOTEBOOK_KUBERNETES_ARGS: ''
# JUPYTERHUB_NOTEBOOK_KUBERNETES_NAMESPACE=rapidminer
# JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_NAME: 'rapidminer.node'
# JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_VALUE: 'notebook'
# JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_ACCESS_MODE=ReadWriteOnce
# JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CAPACITY=5Gi
# JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CLASS=ms-ebs-us-west-2b
# JUPYTERHUB_NOTEBOOK_IMAGE_PULL_SECRET=rm-docker-login-secret
# JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_KUBESPAWNER=python-envs-pvc
# JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_SUBPATH_KUBESPAWNER=coding-shared

# ############################################
#
# Platform admin
#
# ############################################

PLATFORM_ADMIN_VERSION=10.1.3
PLATFORM_ADMIN_SSO_CLIENT_ID=platform-admin
PLATFORM_ADMIN_SSO_CLIENT_SECRET=
PLATFORM_ADMIN_DISABLE_PYTHON=false
PLATFORM_ADMIN_DISABLE_RTS=false

# ############################################
#
# Coding Environment Storage
#
# ############################################

CES_VERSION=10.1.3
DISABLE_DEFAULT_CHANNELS=False

# ############################################
#
# Real-Time Scoring Agent
#
# ############################################

SCORING_AGENT_VERSION=10.1.3
WAIT_FOR_LICENSES=1
SCORING_AGENT_ENABLE_SERVER_LICENSE=true
SCORING_AGENT_SPRING_PROFILES_ACTIVE=default
SCORING_AGENT_SSO_CLIENT_ID=aihub-scoringagent
SCORING_AGENT_SSO_CLIENT_SECRET=
# Supported modes are 'ALTAIR_UNIT', 'RAPIDMINER' and 'ALTAIR_STANDALONE'
# Uncomment this to use 'SCORING_AGENT_LICENSE_MODE' in Scoring Agent instead of LICENSE_MODE variable declared above
# SCORING_AGENT_LICENSE_MODE=ALTAIR_STANDALONE

# ############################################
#
# Grafana
#
# ############################################

# Official grafana image from: https://hub.docker.com/r/grafana/grafana/
OFFICIAL_GRAFANA_IMAGE=grafana/grafana:9.3.8-ubuntu
# Image tag used by grafana-proxy and grafana-init
GRAFANA_UTILS_VERSION=10.1.3
GF_AUTH_GENERIC_OAUTH_SCOPES=email,openid

#
# Grafana Proxy
#
# Possible values: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL
GRAFANA_PROXY_LOGGING_LEVEL=INFO
# Comma spearated list of Scoring Agent URLs (http://scoring-agent-1:8090,https://scoring-agent-2:8888)
GRAFANA_SCORING_AGENT_BACKENDS=http://scoring-agent:8090/
# Set this to 'True' to log data (eg. result from webservice) returned from GF proxy
GRAFANA_PROXY_LOG_RESPONSE_DATA=False

# ############################################
#
# Grafana Direct (these values injected directly to Grafana)
#
# ############################################

GF_AUTH_GENERIC_OAUTH_AUTH_URL=
GF_AUTH_GENERIC_OAUTH_TOKEN_URL=
GF_AUTH_GENERIC_OAUTH_API_URL=
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=
GF_AUTH_SIGNOUT_REDIRECT_URL=
GF_SERVER_ROOT_URL=

# ############################################
#
# LetsEncrypt Client
#
# ############################################

LETSENCRYPT_VERSION=10.1.3

# ############################################
#
# Docker Deployment Manager
#
# ############################################

DDM_VERSION=10.1.3

# ############################################
#
# Landing page
#
# ############################################

LANDING_PAGE_VERSION=10.1.3
LANDING_PAGE_SSO_CLIENT_ID=landing-page
LANDING_PAGE_SSO_CLIENT_SECRET=
LANDING_PAGE_DEBUG=false

# ############################################
#
# Token Tool
#
# ############################################

TOKEN_TOOL_SSO_CLIENT_ID=token-tool
TOKEN_TOOL_SSO_CLIENT_SECRET=
TOKEN_TOOL_DEBUG=false

# ############################################
#
# Service overrides
#  - true/false - false means automatic detection
#
# ############################################

DEPLOYED_GRAFANA=false
DEPLOYED_JUPYTERHUB=false
DEPLOYED_LANDINGPAGE=false
DEPLOYED_PLATFORMADMIN=false
DEPLOYED_SERVER=false
DEPLOYED_TOKENTOOL=false

The definition file (docker-compose.yml)

Notice that you can link directly to any of the services in the docker-compose file using the service name as an ID, for example #aihub-job-agent. You can also link to the #volumes and #networks.

  proxy:
    image: "${REGISTRY}rapidminer-proxy:${PROXY_VERSION}"
    hostname: proxy
    restart: always
    environment:
      - UNPRIVILEGED_PORTS=${UNPRIVILEGED_PORTS}
      - PROXY_DATA_UPLOAD_LIMIT=${PROXY_DATA_UPLOAD_LIMIT}
      - SSO_PUBLIC_URL=${SSO_PUBLIC_URL}
      - SSO_IDP_REALM=${SSO_IDP_REALM}
      # Backends
      - AIHUB_BACKEND=${AIHUB_BACKEND}
      - AIHUB_FRONTEND=${AIHUB_FRONTEND}
      - GRAFANA_BACKEND=${GRAFANA_BACKEND}
      - JUPYTERHUB_BACKEND=${JUPYTERHUB_BACKEND}
      - KEYCLOAK_BACKEND=${KEYCLOAK_BACKEND}
      - KIBANA_BACKEND=${KIBANA_BACKEND}
      - LANDING_BACKEND=${LANDING_BACKEND}
      - LETSENCRYPT_BACKEND=${LETSENCRYPT_BACKEND}
      - METRICS_BACKEND=${METRICS_BACKEND}
      - PLATFORM_ADMIN_BACKEND=${PLATFORM_ADMIN_BACKEND}
      - SCORING_AGENT_BACKEND=${SCORING_AGENT_BACKEND}
      - SCORING_AGENT_WEBUI_BACKEND=${SCORING_AGENT_WEBUI_BACKEND}
      - STANDPY_BACKEND=${STANDPY_BACKEND}
      - TOKEN_BACKEND=${TOKEN_BACKEND}
      # Backend suffixes
      - GRAFANA_URL_SUFFIX=${GRAFANA_URL_SUFFIX}
      - JUPYTERHUB_URL_SUFFIX=${JUPYTERHUB_URL_SUFFIX}
      - KIBANA_URL_SUFFIX=${KIBANA_URL_SUFFIX}
      - METRICS_URL_SUFFIX=${METRICS_URL_SUFFIX}
      - PLATFORM_ADMIN_URL_SUFFIX=${PLATFORM_ADMIN_URL_SUFFIX}
      - SCORING_AGENT_URL_SUFFIX=${SCORING_AGENT_URL_SUFFIX}
      - SCORING_AGENT_WEBUI_URL_SUFFIX=${SCORING_AGENT_WEBUI_URL_SUFFIX}
      - STANDPY_URL_SUFFIX=${STANDPY_URL_SUFFIX}
      - TOKEN_TOOL_URL_SUFFIX=${TOKEN_TOOL_URL_SUFFIX}
      # Default Basic Auth Accesses
      - METRICS_AUTH_BASIC_USER=${METRICS_AUTH_BASIC_USER}
      - METRICS_AUTH_BASIC_PASS=${METRICS_AUTH_BASIC_PASS}
      - SCORING_AGENT_BASIC_AUTH=${SCORING_AGENT_BASIC_AUTH}
      - SCORING_AGENT_ADMIN_USER=${SCORING_AGENT_ADMIN_USER}
      - SCORING_AGENT_ADMIN_PASSWORD=${SCORING_AGENT_ADMIN_PASSWORD}
      # HTTPS settings
      - ALLOW_LETSENCRYPT=${ALLOW_LETSENCRYPT}
      - HTTPS_CRT_PATH=${HTTPS_CRT_PATH}
      - HTTPS_KEY_PATH=${HTTPS_KEY_PATH}
      - HTTPS_KEY_PASSWORD_FILE_PATH=${HTTPS_KEY_PASSWORD_FILE_PATH}
      - HTTPS_DH_PATH=${HTTPS_DH_PATH}
      - WAIT_FOR_DHPARAM=${WAIT_FOR_DHPARAM}
      - DEBUG_CONF_INIT=${DEBUG_CONF_INIT}
    ports:
      - 0.0.0.0:80:80
      - 0.0.0.0:443:443
    networks:
      platform-int-net:
        aliases:
          - proxy
          - ${PUBLIC_DOMAIN}
      jupyterhub-user-net:
        aliases:
          - ${PUBLIC_DOMAIN}
    volumes:
      - ./ssl:/etc/nginx/ssl
      - platform-admin-uploaded-vol:/rapidminer/platform-admin/uploaded/
    profiles:
      - proxy
      - deployment-init

  letsencrypt:
    image: "${REGISTRY}rm-letsencrypt-client:${LETSENCRYPT_VERSION}"
    hostname: letsencrypt
    restart: always
    environment:
    - PUBLIC_URL=${PUBLIC_URL}
    - LETSENCRYPT_HOME=/certificates/
    - DOMAIN=${PUBLIC_URL}
    - WEBMASTER_MAIL=${WEBMASTER_MAIL}
    - TZ=${TZ}
    networks:
      platform-int-net:
        aliases:
        - letsencrypt
    volumes:
      - ./ssl:/etc/letsencrypt/
    profiles:
      - letsencrypt

  keycloak-db:
    image: "${REGISTRY}postgres-14:${KEYCLOAK_POSTGRES_VERSION}"
    restart: always
    hostname: keycloak-db
    environment:
      - POSTGRES_DB=${KEYCLOAK_DBSCHEMA}
      - POSTGRES_USER=${KEYCLOAK_DBUSER}
      - POSTGRES_PASSWORD=${KEYCLOAK_DBPASS}
      - POSTGRES_INITDB_ARGS=${KEYCLOAK_POSTGRES_INITDB_ARGS}
    volumes:
      - keycloak-db-vol:/var/lib/postgresql/data
    networks:
      idp-db-net:
        aliases:
         - keycloak-db
    profiles:
      - keycloak
      - deployment-init

  keycloak:
    image: "${REGISTRY}rapidminer-keycloak:${KEYCLOAK_VERSION}"
    restart: always
    hostname: keycloak
    environment:
      - KC_DB=postgres
      - KC_DB_SCHEMA=public
      - KC_DB_URL_HOST=keycloak-db
      - KC_DB_URL_DATABASE=${KEYCLOAK_DBSCHEMA}
      - KC_DB_USERNAME=${KEYCLOAK_DBUSER}
      - KC_DB_PASSWORD=${KEYCLOAK_DBPASS}
      - KC_FEATURES=${KC_FEATURES}
      - KC_HOSTNAME=${PUBLIC_DOMAIN}
      - KC_HOSTNAME_PATH=/auth
      - KC_HTTP_RELATIVE_PATH=/auth
      #- KC_HOSTNAME_PORT=8080
      - KC_HOSTNAME_STRICT_BACKCHANNEL=${KC_HOSTNAME_STRICT_BACKCHANNEL}
      - KC_HOSTNAME_STRICT=${KC_HOSTNAME_STRICT}
      - KC_HOSTNAME_STRICT_HTTPS=${KC_HOSTNAME_STRICT_HTTPS}
      - KEYCLOAK_ADMIN=${KEYCLOAK_USER}
      - KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_PASSWORD}
      - KC_LOG_LEVEL=${KC_LOG_LEVEL}
      - KC_PROXY=${KC_PROXY}
      - KC_HTTP_ENABLED=${KC_HTTP_ENABLED}
    depends_on:
      - keycloak-db
      - proxy
    networks:
      platform-int-net:
        aliases:
          - keycloak
      idp-db-net:
        aliases:
          - keycloak
    profiles:
      - keycloak
      - deployment-init

  deployment-init:
    image: "${REGISTRY}rapidminer-deployment-init:${INIT_VERSION}"
    restart: "no"
    hostname: deployment-init
    depends_on:
      - keycloak
      - aihub-postgresql
    environment:
      - DEBUG=false
      - SSO_INTERNAL_URL=${KEYCLOAK_BACKEND}
    volumes:
      - ./ssl:/tmp/ssl
      # Deployment-init reads all variable directly from .env file
      - ./.env:/rapidminer/.env
      - ./docker-compose.yml:/docker-compose.yml:ro
      - keycloak-kcadm-vol:/rapidminer/.keycloak/
      - deployed-services-vol:/rapidminer/deployed-services/
    networks:
      platform-int-net:
        aliases:
          - deployment-init
      aihub-db-net:
        aliases:
          - deployment-init
    profiles:
      - deployment-init

  license-proxy:
    image: "${REGISTRY}rapidminer-licenseproxy:${LICENSE_PROXY_VERSION}"
    hostname: license-proxy
    restart: always
    environment:
      - KEYCLOAK_AUTH_SERVER_URL=${SSO_PUBLIC_URL}/auth/
      - KEYCLOAK_REALM=${SSO_IDP_REALM}
      - LICENSE_PROXY_MODE=${LICENSE_PROXY_MODE}
      - LICENSE_UNIT_MANAGER_AUTHENTICATION_TYPE=${LICENSE_UNIT_MANAGER_AUTHENTICATION_TYPE}
      - LICENSE_UNIT_MANAGER_USER_NAME=${LICENSE_UNIT_MANAGER_USER_NAME}
      - LICENSE_UNIT_MANAGER_PASSWORD=${LICENSE_UNIT_MANAGER_PASSWORD}
      - LICENSE_UNIT_MANAGER_RESET_AUTH_TOKEN=${LICENSE_UNIT_MANAGER_RESET_AUTH_TOKEN}
      - LICENSE_UNIT_MANAGER_TOKEN=${LICENSE_UNIT_MANAGER_TOKEN}
      - ALTAIR_LICENSE_PATH=${ALTAIR_LICENSE_PATH}
      # - DEBUG=true
    volumes:
      - license-proxy-vol:/license-proxy/home
    depends_on:
      - keycloak
    networks:
      platform-int-net:
        aliases:
          - license-proxy
    profiles:
      - altair-license

  aihub-postgresql:
    image: "${REGISTRY}postgres-14:${AIHUB_POSTGRES_VERSION}"
    hostname: aihub-postgresql
    restart: always
    environment:
     - POSTGRES_DB=${AIHUB_DBSCHEMA}
     - POSTGRES_USER=${AIHUB_DBUSER}
     - POSTGRES_PASSWORD=${AIHUB_DBPASS}
     - POSTGRES_INITDB_ARGS=${AIHUB_POSTGRES_INITDB_ARGS}
    volumes:
     - aihub-db-vol:/var/lib/postgresql/data
    networks:
      aihub-db-net:
        aliases:
         - aihub-postgresql
    profiles:
      - aihub-backend
      - deployment-init

  aihub-frontend:
    image: ${REGISTRY}rapidminer-aihub-ui:${AIHUB_FRONTEND_VERSION}
    hostname: aihub-frontend
    restart: always
    environment:
      - REACT_APP_API_URL=${PUBLIC_URL}/api/v1/
      - REACT_APP_KEYCLOAK_BASE_URL=${SSO_PUBLIC_URL}/auth
      - REACT_APP_KEYCLOAK_REALM=${SSO_IDP_REALM}
      - REACT_APP_KEYCLOAK_CLIENT_ID=${AIHUB_FRONTEND_SSO_CLIENT_ID}
      - REACT_APP_KEYCLOAK_ON_LOAD=login-required
      - REACT_APP_KEYCLOAK_SSL_REQUIRED=${SSO_SSL_REQUIRED}
    depends_on:
      - proxy
      - aihub-backend
      - keycloak
    networks:
      platform-int-net:
        aliases:
         - aihub-frontend
    profiles:
      - aihub-frontend

  aihub-activemq:
    image: ${REGISTRY}rapidminer-activemq-artemis:${ACTIVEMQ_VERSION}
    hostname: aihub-activemq
    restart: always
    environment:
      - BROKER_ACTIVEMQ_HOST=aihub-activemq
      - BROKER_ACTIVEMQ_PORT=61616
      - BROKER_ACTIVEMQ_USERNAME=${BROKER_ACTIVEMQ_USERNAME}
      - BROKER_ACTIVEMQ_PASSWORD=${BROKER_ACTIVEMQ_PASSWORD}
      - ARTEMIS_USERNAME=${BROKER_ACTIVEMQ_USERNAME}
      - ARTEMIS_PASSWORD=${BROKER_ACTIVEMQ_PASSWORD}
    networks:
      platform-int-net:
        aliases:
         - aihub-activemq
    profiles:
      - aihub-activemq
    volumes:
      - activemq-artemis-vol:/var/lib/artemis/data

  aihub-backend:
    image: ${REGISTRY}rapidminer-aihub:${AIHUB_BACKEND_VERSION}
    hostname: aihub-backend
    restart: always
    environment:
      #- LOGGING_LEVEL_COM_RAPIDMINER=DEBUG
      - SERVER_FORWARD_HEADERS_STRATEGY=framework
      - DB_HOST=${AIHUB_DBHOST}
      - DB_PORT=5432
      - DB_NAME=${AIHUB_DBSCHEMA}
      - DB_USER=${AIHUB_DBUSER}
      - DB_PASSWORD=${AIHUB_DBPASS}
      - KEYCLOAK_REALM=${SSO_IDP_REALM}
      - AUTH_REALM=${SSO_IDP_REALM}
      - KEYCLOAK_AUTH_SERVER_URL=${SSO_PUBLIC_URL}/auth
      - KEYCLOAK_RESOURCE=${AIHUB_BACKEND_SSO_CLIENT_ID}
      - KEYCLOAK_SSL_REQUIRED=${SSO_SSL_REQUIRED}
      - AUTH_SERVICE_CLIENT_ID=${AIHUB_BACKEND_SSO_CLIENT_ID}
      - AUTH_SERVICE_CLIENT_SECRET=${AIHUB_BACKEND_SSO_CLIENT_SECRET}
      - BROKER_ACTIVEMQ_HOST=aihub-activemq
      - BROKER_ACTIVEMQ_PORT=61616
      - BROKER_ACTIVEMQ_USERNAME=${BROKER_ACTIVEMQ_USERNAME}
      - BROKER_ACTIVEMQ_PASSWORD=${BROKER_ACTIVEMQ_PASSWORD}
      - LICENSE_MODE=${LICENSE_MODE}
      # RapidMiner licensing
      - LICENSE_LICENSE=${LICENSE}
      # Altair Unit Licensing
      - LICENSE_AGENT_PROXY_URL=${LICENSE_PROXY_INTERNAL_URL}
      - LICENSE_AGENT_MACHINE_ID=${LICENSE_AGENT_MACHINE_ID}
    volumes:
      - aihub-home-vol:/aihub/home
    depends_on:
      - aihub-postgresql
      - aihub-activemq
      - license-proxy
    networks:
      jupyterhub-user-net:
        aliases:
         - aihub-backend
      platform-int-net:
        aliases:
         - aihub-backend
      aihub-db-net:
        aliases:
         - aihub-backend
    profiles:
      - aihub-backend

  aihub-job-agent:
    image: ${REGISTRY}rapidminer-jobagent:${JOBAGENT_VERSION}
    hostname: aihub-job-agent
    restart: always
    environment:
      #- LOGGING_LEVEL_COM_RAPIDMINER=DEBUG
      - JOBAGENT_NAME=${JOBAGENT_NAME}
      - JOBAGENT_AUTH_AUTH_SERVER_URL=${SSO_PUBLIC_URL}/auth
      - JOBAGENT_AUTH_REALM=${SSO_IDP_REALM}
      - JOBAGENT_AUTH_SERVICE_CLIENT_ID=${JOBAGENT_SSO_CLIENT_ID}
      - JOBAGENT_AUTH_SERVICE_CLIENT_SECRET=${JOBAGENT_SSO_CLIENT_SECRET}
      - JOBAGENT_QUEUE_ACTIVEMQ_USERNAME=${BROKER_ACTIVEMQ_USERNAME}
      - JOBAGENT_QUEUE_ACTIVEMQ_PASSWORD=${BROKER_ACTIVEMQ_PASSWORD}
      - BROKER_ACTIVEMQ_HOST=aihub-activemq
      - BROKER_ACTIVEMQ_PORT=61616
      - BROKER_ACTIVEMQ_USERNAME=${BROKER_ACTIVEMQ_USERNAME}
      - BROKER_ACTIVEMQ_PASSWORD=${BROKER_ACTIVEMQ_PASSWORD}
      - AIHUB_CONNECTION_PROTOCOL=http
      - AIHUB_CONNECTION_HOST=aihub-backend
      - AIHUB_CONNECTION_PORT=8080
      - JOBAGENT_CONTAINER_COUNT=${JOBAGENT_CONTAINER_COUNT}
      - JOBAGENT_JOB_QUEUE=${JOBAGENT_JOB_QUEUE}
      - JOBAGENT_CONTAINER_MEMORYLIMIT=${JOBAGENT_CONTAINER_MEMORYLIMIT}
      - INIT_SHARED_CONDA_SETTINGS=${INIT_SHARED_CONDA_SETTINGS}
      - TZ=${TZ}
      - LICENSE_MODE=${LICENSE_MODE}
      # Altair Unit Licensing
      - JOBAGENT_LICENSE_AGENT_PROXY_URL=${LICENSE_PROXY_INTERNAL_URL}
      - JOBAGENT_LICENSE_AGENT_MACHINE_ID=${LICENSE_AGENT_MACHINE_ID}
    volumes:
      - coding-shared-vol:/opt/coding-shared/:ro
      - job-agent-vol:/jobagent/home
    depends_on:
      - aihub-backend
      - aihub-activemq
      - license-proxy
    networks:
      platform-int-net:
        aliases:
         - aihub-job-agent
    profiles:
      - aihub-job-agent

  platform-admin:
    image: "${REGISTRY}rapidminer-platform-admin-webui:${PLATFORM_ADMIN_VERSION}"
    hostname: platform-admin
    restart: always
    environment:
      - PLATFORM_ADMIN_URL_SUFFIX=${PLATFORM_ADMIN_URL_SUFFIX}
      - PLATFORM_ADMIN_DATA_UPLOAD_LIMIT=${PROXY_DATA_UPLOAD_LIMIT}
      - SCORING_AGENT_URL_SUFFIX=${SCORING_AGENT_URL_SUFFIX}
      - SCORING_AGENT_BACKEND=${SCORING_AGENT_BACKEND}
      - SSO_PUBLIC_URL=${SSO_PUBLIC_URL}
      - SSO_IDP_REALM=${SSO_IDP_REALM}
      - SSO_CLIENT_ID=${PLATFORM_ADMIN_SSO_CLIENT_ID}
      - SSO_CLIENT_SECRET=${PLATFORM_ADMIN_SSO_CLIENT_SECRET}
      - PLATFORM_ADMIN_DISABLE_PYTHON=${PLATFORM_ADMIN_DISABLE_PYTHON}
      - PLATFORM_ADMIN_DISABLE_RTS=${PLATFORM_ADMIN_DISABLE_RTS}
      - DEBUG=false
      - CES_VERSION=${CES_VERSION}
    volumes:
      - platform-admin-uploaded-vol:/var/www/html/uploaded/
    networks:
      jupyterhub-user-net:
        aliases:
         - platform-admin
      platform-int-net:
        aliases:
         - platform-admin
      coding-environment-storage-net:
        aliases:
         - platform-admin
    profiles:
      - platform-admin

  scoring-agent:
    image: "${REGISTRY}rapidminer-scoringagent:${SCORING_AGENT_VERSION}"
    hostname: scoring-agent
    restart: always
    environment:
      - TZ=${TZ}
      - CES_VERSION=${CES_VERSION}
      - INIT_SHARED_CONDA_SETTINGS=true
      - SPRING_PROFILES_ACTIVE=${SCORING_AGENT_SPRING_PROFILES_ACTIVE}
      - SCORING_AGENT_MAX_UPLOAD_SIZE=${PROXY_DATA_UPLOAD_LIMIT}
      # - DEBUG=true
      - SCORING_AGENT_AUTH_REALM=${SSO_IDP_REALM}
      - SCORING_AGENT_AUTH_AUTH_SERVER_URL=${SSO_PUBLIC_URL}/auth
      - SCORING_AGENT_AUTH_SERVICE_CLIENT_ID=${SCORING_AGENT_SSO_CLIENT_ID}
      - SCORING_AGENT_AUTH_SERVICE_CLIENT_SECRET=${SCORING_AGENT_SSO_CLIENT_SECRET}
      - LICENSE_MODE=${SCORING_AGENT_LICENSE_MODE:-$LICENSE_MODE}
      # RapidMiner licensing
      - WAIT_FOR_LICENSES=${WAIT_FOR_LICENSES}
      - SCORING_AGENT_ENABLE_SERVER_LICENSE=${SCORING_AGENT_ENABLE_SERVER_LICENSE}
      - LICENSE_LICENSE=${LICENSE}
      # Altair Unit Licensing
      - SCORING_AGENT_LICENSE_AGENT_PROXY_URL=${LICENSE_PROXY_INTERNAL_URL}
      - SCORING_AGENT_LICENSE_AGENT_MACHINE_ID=${LICENSE_AGENT_MACHINE_ID}
    volumes:
      - scoring-agent-vol:/scoring-agent/home
      - coding-shared-vol:/opt/coding-shared/:ro
      # Uncomment the below line to specify the Altair license file for Scoring Agent in case of LICENSE_MODE=ALTAIR_STANDALONE
      # - ${PWD}/altair_standalone.dat:/scoring-agent/home/resources/licenses/altair_standalone.dat
    depends_on:
      - license-proxy
    # In case of LICENSE_MODE=ALTAIR_STANDALONE, set mac_address according to the Ethernet address of the docker host. It shall match the MAC address in your license.
    # mac_address: 00:00:00:00:00:00
    networks:
      platform-int-net:
        aliases:
         - scoring-agent
    profiles:
      - scoring-agent

  jupyterhub-db:
    image: ${REGISTRY}rapidminer-jupyterhub-postgres:${JUPYTERHUB_VERSION}
    hostname: jupyterhub-db
    restart: always
    environment:
      - POSTGRESQL_DATABASE=${JUPYTERHUB_DBSCHEMA}
      - POSTGRESQL_USER=${JUPYTERHUB_DBUSER}
      - POSTGRESQL_PASSWORD=${JUPYTERHUB_DBPASS}
      - POSTGRES_INITDB_ARGS=${JUPYTERHUB_POSTGRES_INITDB_ARGS}
    volumes:
      - jupyterhub-db-vol:/var/lib/postgresql/data
    networks:
      jupyterhub-user-net:
        aliases:
          - jupyterhub-db
    profiles:
      - jupyter

  jupyterhub:
    image: "${REGISTRY}rapidminer-jupyterhub-jupyterhub:${JUPYTERHUB_VERSION}"
    hostname: jupyterhub
    restart: always
    environment:
      - JUPYTERHUB_VERSION=${JUPYTERHUB_VERSION}
      - AIHUB_BACKEND=${AIHUB_BACKEND}
      - JUPYTERHUB_DBHOST=${JUPYTERHUB_DBHOST}
      - JUPYTERHUB_DBSCHEMA=${JUPYTERHUB_DBSCHEMA}
      - JUPYTERHUB_DBUSER=${JUPYTERHUB_DBUSER}
      - JUPYTERHUB_DBPASS=${JUPYTERHUB_DBPASS}
      - JUPYTERHUB_HOSTNAME=${JUPYTERHUB_HOSTNAME}
      - JUPYTERHUB_CRYPT_KEY=${JUPYTERHUB_CRYPT_KEY}
      - JUPYTERHUB_DEBUG=${JUPYTERHUB_DEBUG}
      - JUPYTERHUB_TOKEN_DEBUG=${JUPYTERHUB_TOKEN_DEBUG}
      - JUPYTERHUB_PROXY_DEBUG=${JUPYTERHUB_PROXY_DEBUG}
      - JUPYTERHUB_DB_DEBUG=${JUPYTERHUB_DB_DEBUG}
      - JUPYTERHUB_SPAWNER_DEBUG=${JUPYTERHUB_SPAWNER_DEBUG}
      - JUPYTERHUB_STACK_NAME=${JUPYTERHUB_STACK_NAME}
      - PUBLIC_URL=${PUBLIC_URL}
      - JUPYTERHUB_URL_SUFFIX=${JUPYTERHUB_URL_SUFFIX}
      - SSO_PUBLIC_URL=${SSO_PUBLIC_URL}
      - SSO_IDP_REALM=${SSO_IDP_REALM}
      - SSO_CLIENT_ID=${JUPYTERHUB_SSO_CLIENT_ID}
      - SSO_CLIENT_SECRET=${JUPYTERHUB_SSO_CLIENT_SECRET}
      - JUPYTERHUB_SPAWNER=${JUPYTERHUB_SPAWNER}
      - JUPYTERHUB_API_PROTOCOL=${JUPYTERHUB_API_PROTOCOL}
      - JUPYTERHUB_API_HOSTNAME=${JUPYTERHUB_API_HOSTNAME}
      - JUPYTERHUB_PROXY_PORT=${JUPYTERHUB_PROXY_PORT}
      - JUPYTERHUB_API_PORT=${JUPYTERHUB_API_PORT}
      - JUPYTERHUB_APP_PORT=${JUPYTERHUB_APP_PORT}
      # - JUPYTERHUB_CUSTOM_CA_CERTS=${JUPYTERHUB_CUSTOM_CA_CERTS}
      - JUPYTERHUB_DOCKER_DISABLE_NOTEBOOK_IMAGE_PULL_AT_STARTUP=${JUPYTERHUB_DOCKER_DISABLE_NOTEBOOK_IMAGE_PULL_AT_STARTUP}
      - SSO_USERNAME_KEY=preferred_username
      - SSO_RESOURCE_ACCESS_KEY=resource_access
      - JUPYTERHUB_DEFAULT_ENV_NAME=aihub-${JUPYTERHUB_VERSION}-python
      # Notebook
      # kubespawner
      #      - JUPYTERHUB_NOTEBOOK_KUBERNETES_NAMESPACE=${JUPYTERHUB_NOTEBOOK_KUBERNETES_NAMESPACE}
      #      - JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_NAME=${JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_NAME}
      #      - JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_VALUE=${JUPYTERHUB_NOTEBOOK_KUBERNETES_NODE_SELECTOR_VALUE}
      #      - JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_ACCESS_MODE=${JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_ACCESS_MODE}
      #      - JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CAPACITY=${JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CAPACITY}
      #      - JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CLASS=${JUPYTERHUB_NOTEBOOK_HOME_KUBERNETES_STORAGE_CLASS}
      #      - JUPYTERHUB_NOTEBOOK_IMAGE_PULL_SECRET=${JUPYTERHUB_NOTEBOOK_IMAGE_PULL_SECRET}
      #      - JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_KUBESPAWNER=${JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_KUBESPAWNER}
      #      - JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_SUBPATH_KUBESPAWNER=${JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_SUBPATH_KUBESPAWNER}
      - DOCKER_NOTEBOOK_IMAGE=${REGISTRY}rapidminer-jupyter_notebook:${JUPYTERHUB_NOTEBOOK_VERSION}
      - JUPYTERHUB_NOTEBOOK_VERSION=${JUPYTERHUB_NOTEBOOK_VERSION}
      - JUPYTERHUB_NOTEBOOK_SSO_NB_UID_KEY=${JUPYTERHUB_NOTEBOOK_SSO_NB_UID_KEY}
      - JUPYTERHUB_NOTEBOOK_SSO_NB_GID_KEY=${JUPYTERHUB_NOTEBOOK_SSO_NB_GID_KEY}
      - JUPYTERHUB_NOTEBOOK_SSO_CUSTOM_BIND_MOUNTS_KEY=${JUPYTERHUB_NOTEBOOK_SSO_CUSTOM_BIND_MOUNTS_KEY}
      - JUPYTERHUB_NOTEBOOK_CUSTOM_BIND_MOUNTS=${JUPYTERHUB_NOTEBOOK_CUSTOM_BIND_MOUNTS}
      - JUPYTERHUB_NOTEBOOK_CPU_LIMIT=${JUPYTERHUB_NOTEBOOK_CPU_LIMIT}
      - JUPYTERHUB_NOTEBOOK_MEM_LIMIT=${JUPYTERHUB_NOTEBOOK_MEM_LIMIT}
      - JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_DOCKERSPAWNER=${JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_DOCKERSPAWNER}
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:rw
    depends_on:
      - jupyterhub-db
    networks:
      platform-int-net:
        aliases:
          - jupyterhub
      jupyterhub-user-net:
        aliases:
          - jupyterhub
    profiles:
      - jupyter

  coding-environment-storage:
    image: "${REGISTRY}rapidminer-coding-environment-storage:${CES_VERSION}"
    hostname: coding-environment-storage
    restart: always
    environment:
      - PLATFORM_ADMIN_BACKEND=${PLATFORM_ADMIN_BACKEND}
      - PLATFORM_ADMIN_SYNC_DEBUG=False
      - DISABLE_DEFAULT_CHANNELS=${DISABLE_DEFAULT_CHANNELS}
    networks:
      coding-environment-storage-net:
        aliases:
         - coding-environment-storage
    depends_on:
      - platform-admin
    volumes:
      - coding-shared-vol:/opt/coding-shared/
    profiles:
      - ces

  grafana-init:
    image: "${REGISTRY}rapidminer-grafana-init:${GRAFANA_UTILS_VERSION}"
    restart: "no"
    volumes:
      - grafana-home-vol:/var/lib/grafana
      - grafana-provisioning:/etc/grafana/provisioning
    profiles:
      - grafana

  grafana:
    image: "${OFFICIAL_GRAFANA_IMAGE}"
    hostname: grafana
    restart: always
    environment:
      - GF_PATHS_DATA=${GF_PATHS_DATA:-/var/lib/grafana/aihub}
      - GF_PATHS_PLUGINS=${GF_PATHS_PLUGINS:-/var/lib/grafana/aihub/plugins}
      - GF_AUTH_GENERIC_OAUTH_AUTH_URL=${GF_AUTH_GENERIC_OAUTH_AUTH_URL}
      - GF_AUTH_GENERIC_OAUTH_TOKEN_URL=${GF_AUTH_GENERIC_OAUTH_TOKEN_URL}
      - GF_AUTH_GENERIC_OAUTH_API_URL=${GF_AUTH_GENERIC_OAUTH_API_URL}
      - GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=${GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET}
      - GF_AUTH_SIGNOUT_REDIRECT_URL=${GF_AUTH_SIGNOUT_REDIRECT_URL}
      - GF_SERVER_ROOT_URL=${GF_SERVER_ROOT_URL}
      - GF_USERS_DEFAULT_THEME=${GF_USERS_DEFAULT_THEME:-light}
      - GF_PANELS_DISABLE_SANITIZE_HTML=${GF_PANELS_DISABLE_SANITIZE_HTML:-true}
      - GF_SERVER_SERVE_FROM_SUB_PATH=${GF_SERVER_SERVE_FROM_SUB_PATH:-true}
      - GF_AUTH_DISABLE_LOGIN_FORM=${GF_AUTH_DISABLE_LOGIN_FORM:-true}
      - GF_AUTH_OAUTH_AUTO_LOGIN=${GF_AUTH_OAUTH_AUTO_LOGIN:-true}
      - GF_AUTH_BASIC_ENABLED=${GF_AUTH_BASIC_ENABLED:-false}
      - GF_AUTH_GENERIC_OAUTH_ENABLED=${GF_AUTH_GENERIC_OAUTH_ENABLED:-true}
      - GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP=${GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP:-true}
      - GF_AUTH_GENERIC_OAUTH_CLIENT_ID=${GF_AUTH_GENERIC_OAUTH_CLIENT_ID:-grafana}
      - GF_USERS_EXTERNAL_MANAGE_LINK_NAME=${GF_USERS_EXTERNAL_MANAGE_LINK_NAME:-false}
      - GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH=${GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH:-contains(grafana_roles[*], 'admin') && 'Admin' || contains(grafana_roles[*], 'editor') && 'Editor' || 'Viewer'}
      - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=${GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS:-rapidminer-aihub-datasource}
      - GF_AUTH_GENERIC_OAUTH_SCOPES=${GF_AUTH_GENERIC_OAUTH_SCOPES:-email}
      - TZ=${TZ}
    volumes:
      - grafana-home-vol:/var/lib/grafana
      - grafana-provisioning:/etc/grafana/provisioning
    depends_on:
      grafana-proxy: 
        condition: service_started
      grafana-init:
        condition: service_completed_successfully
    networks:
      platform-int-net:
        aliases:
         - grafana
    profiles:
      - grafana

  grafana-proxy:
    image: "${REGISTRY}rapidminer-grafana-proxy:${GRAFANA_UTILS_VERSION}"
    hostname: grafana-proxy
    restart: always
    environment:
      - AIHUB_BACKEND_INTERNAL_URL=${AIHUB_BACKEND_INTERNAL_URL}
      # Comma spearated list of RTSA URLs (http://scoring-agent:8090,https://scoring-agent-2:8888)
      - GRAFANA_SCORING_AGENT_BACKENDS=${GRAFANA_SCORING_AGENT_BACKENDS}
      - GRAFANA_PROXY_LOGGING_LEVEL=${GRAFANA_PROXY_LOGGING_LEVEL}
      - LOG_RESPONSE_DATA=${GRAFANA_PROXY_LOG_RESPONSE_DATA}
    depends_on:
      - aihub-backend
    networks:
      platform-int-net:
        aliases:
         - grafana-proxy
    profiles:
      - grafana

  landing-page:
    image: "${REGISTRY}rapidminer-deployment-landing-page:${LANDING_PAGE_VERSION}"
    restart: always
    hostname: landing-page
    environment:
      - SSO_PUBLIC_URL=${SSO_PUBLIC_URL}
      - SSO_IDP_REALM=${SSO_IDP_REALM}
      - SSO_CLIENT_ID=${LANDING_PAGE_SSO_CLIENT_ID}
      - SSO_CLIENT_SECRET=${LANDING_PAGE_SSO_CLIENT_SECRET}
      - DEBUG=${LANDING_PAGE_DEBUG}
    volumes:
      - landing-page-vol:/var/www/html/uploaded/
      - deployed-services-vol:/rapidminer/deployed-services/
    networks:
      platform-int-net:
        aliases:
         - landing-page
    profiles:
      - landing-page

  token-tool:
    image: "${REGISTRY}rapidminer-deployment-landing-page:${LANDING_PAGE_VERSION}"
    restart: always
    hostname: token-tool
    environment:
    - PUBLIC_URL=${PUBLIC_URL}
    - SSO_PUBLIC_URL=${SSO_PUBLIC_URL}
    - SSO_IDP_REALM=${SSO_IDP_REALM}
    - SSO_CLIENT_ID=${TOKEN_TOOL_SSO_CLIENT_ID}
    - SSO_CLIENT_SECRET=${TOKEN_TOOL_SSO_CLIENT_SECRET}
    - DEBUG=${TOKEN_TOOL_DEBUG}
    - SSO_CUSTOM_SCOPE=openid offline_access
    - CUSTOM_URL_SUFFIX=${TOKEN_TOOL_URL_SUFFIX}
    - CUSTOM_CONTENT=get-token
    volumes:
      - token-tool-vol:/var/www/html/uploaded/
    networks:
      platform-int-net:
        aliases:
        - token-tool
    profiles:
      - token-tool

volumes:
  license-proxy-vol:
  aihub-db-vol:
  aihub-home-vol:
  job-agent-vol:
  platform-admin-uploaded-vol:
  scoring-agent-vol:
  jupyterhub-db-vol:
  grafana-home-vol:
  grafana-provisioning:
  keycloak-db-vol:
  keycloak-kcadm-vol:
  landing-page-vol:
  token-tool-vol:
  deployed-services-vol:
  coding-shared-vol:
    name: ${JUPYTERHUB_NOTEBOOK_SHARED_ENV_VOLUME_NAME_DOCKERSPAWNER}
  activemq-artemis-vol:

networks:
  platform-int-net:
  idp-db-net:
  aihub-db-net:
  coding-environment-storage-net:
  jupyterhub-user-net:
    name: jupyterhub-user-net-${JUPYTERHUB_STACK_NAME}