Business Bot Plattform mit Docker¶
Die Business Bot Plattform wird mit der Containervirtualisierung Docker für Linux bereitgestellt. Mit Docker können mehrere Instanzen der Business Bot Plattform isoliert voneinander auf einem Hostsystem betrieben werden.
Die Business Bot Plattform besteht aus drei Containern, die auf Docker Hub zum Download zur Verfügung stehen.
- citunius/bbp_webserver (Apache Web-Server)
- citunius/bbp_dbserver (MySQL Datenbank Server)
- citunius/bbp_dbsetup (Datenbank Setup)
- citunius/bbp_appserver (Tomcat Application Server und Business Bot Plattform)
Darstellung der Zusammenhänge der einzelnen Komponenten:
Verwendung¶
Laden Sie die Docker-Compose-Datei herunter und benennen Sie die Datei in docker-compose.yml
um:
- docker-compose.yml.R2020.FP2048
- docker-compose.yml.R2020.FP2040
- docker-compose.yml.R2020.GA
- docker-compose.yml.R2019.FP1948
1 | $ curl -O https://library.citunius.de/products/bbp_edition_community/documentation/R2019-FP1948/en/installation/docker/docker-compose.yml |
Zum Downloaden und Starten der Container führen Sie folgenden Befehl aus, in dem sich die docker-compose.yml
befindet:
1 | $ docker-compose up |
Folgende Ausgabe sollten Sie dabei erhalten:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | Creating network "dockerimagetest_default" with the default driver Pulling db (citunius/bbp_db:R2019FP1948)... R2019FP1948: Pulling from citunius/bbp_db d599a449871e: Pull complete f287049d3170: Pull complete 08947732a1b0: Pull complete Digest: sha256:a0357277b044e417e57008bd33fc430a66a8d55d6ad2c5b8f15e4736fd975f5d Status: Downloaded newer image for citunius/bbp_db:R2019FP1948 Pulling dbsetup (citunius/bbp_dbsetup:R2019FP1948)... R2019FP1948: Pulling from citunius/bbp_dbsetup f17d81b4b692: Pull complete c691115e6ae9: Pull complete 41544cb19235: Pull complete Digest: sha256:36a1b7d255bb60e1ebe8948e4702d387c8d0786c74e93701c5502449fa05322c Status: Downloaded newer image for citunius/bbp_dbsetup:R2019FP1948 Pulling app (citunius/bbp_app:R2019FP1948)... R2019FP1948: Pulling from citunius/bbp_app c5e155d5a1d1: Pull complete 221d80d00ae9: Pull complete 4250b3117dca: Pull complete Digest: sha256:ed43d29601fe961e7e678342ab593ed8db07e6602241bc3c81432222cac29c20 Status: Downloaded newer image for citunius/bbp_app:R2019FP1948 Creating bbp_mysql ... done Creating bbp_mysqlSetup ... done Creating bbp_tomcat ... done Attaching to bbp_mysql, bbp_mysqlSetup, bbp_tomcat bbp_mysql | 2019-12-06 10:23:41+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started. bbp_mysql | 2019-12-06 10:23:42+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' bbp_mysql | 2019-12-06 10:23:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.18-1debian9 started. bbp_mysql | 2019-12-06 10:23:43+00:00 [Note] [Entrypoint]: Initializing database files bbp_mysql | 2019-12-06T10:23:43.139540Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.18) initializing of server in progress as process 45 bbp_mysqlSetup | ========================= bbp_mysqlSetup | Setup database... bbp_mysqlSetup | ========================= bbp_mysqlSetup | Lockfile does not exist, creating lock /root/lock/start-dbsetup.sh.lock ... bbp_mysqlSetup | Connecting to db... bbp_mysqlSetup | Retry connecting to db... bbp_tomcat | ========================= bbp_tomcat | Setup app... bbp_tomcat | ========================= bbp_tomcat | Preparing BBP setup... bbp_tomcat | Creating BBP filestore directory... bbp_tomcat | Check if BBP Edition file exists... bbp_tomcat | BBP_EDITION.txt bbp_tomcat | 06-Dec-2019 10:23:47.522 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.41 bbp_tomcat | 06-Dec-2019 10:23:47.526 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 4 2019 09:17:16 UTC bbp_tomcat | 06-Dec-2019 10:23:47.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.41.0 bbp_tomcat | 06-Dec-2019 10:23:47.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux bbp_tomcat | 06-Dec-2019 10:23:47.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.9.184-linuxkit bbp_tomcat | 06-Dec-2019 10:23:47.527 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64 bbp_tomcat | 06-Dec-2019 10:23:47.528 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre bbp_tomcat | 06-Dec-2019 10:23:47.529 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_212-8u212-b01-1~deb9u1-b01 bbp_tomcat | 06-Dec-2019 10:23:47.530 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation bbp_tomcat | 06-Dec-2019 10:23:47.531 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/tomcat bbp_tomcat | 06-Dec-2019 10:23:47.531 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/tomcat bbp_tomcat | 06-Dec-2019 10:23:47.551 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] bbp_tomcat | 06-Dec-2019 10:23:47.571 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.0j 20 Nov 2018] bbp_tomcat | 06-Dec-2019 10:23:47.813 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] bbp_tomcat | 06-Dec-2019 10:23:47.842 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read bbp_tomcat | 06-Dec-2019 10:23:47.890 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] bbp_tomcat | 06-Dec-2019 10:23:47.902 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read bbp_tomcat | 06-Dec-2019 10:23:47.917 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1266 ms bbp_tomcat | 06-Dec-2019 10:23:47.972 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] bbp_tomcat | 06-Dec-2019 10:23:47.972 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.41 bbp_mysql | 2019-12-06 10:24:00+00:00 [Note] [Entrypoint]: Database files initialized bbp_mysql | 2019-12-06 10:24:00+00:00 [Note] [Entrypoint]: Starting temporary server bbp_mysql | 2019-12-06T10:24:00.551745Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 94 bbp_mysql | 2019-12-06T10:24:02.932254Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.18' socket: '/var/run/mysqld/mysqld.sock' port: 0 MySQL Community Server - GPL. bbp_tomcat | 06-Dec-2019 10:24:02.978 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. bbp_mysql | 2019-12-06 10:24:02+00:00 [Note] [Entrypoint]: Temporary server started. bbp_tomcat | BBP: log4j.configuration: [log4j.properties] bbp_tomcat | BBP: log4j is watching [log4j.properties] for changes every [10] seconds bbp_tomcat | 06-Dec-2019 10:24:07.380 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/bbp.war] has finished in [19,331] ms bbp_tomcat | 06-Dec-2019 10:24:08.068 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] bbp_tomcat | 06-Dec-2019 10:24:08.152 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] bbp_tomcat | 06-Dec-2019 10:24:08.161 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 20243 ms bbp_mysqlSetup | ========================= bbp_mysqlSetup | Run SQL scripts... bbp_mysqlSetup | ========================= bbp_mysqlSetup | Creating new BBP user... bbp_mysqlSetup | Changing db root password... bbp_mysqlSetup exited with code 0 |
Dadurch wird ein Applikations-Container mit einem MySQL-Container + DB-Setup-Container gestartet.
Die Docker-Installation und Konfiguration verwendet als System-Hostname demo.bbp.local
. Wenn Sie einen anderen Hostnamen verwenden möchten, müssen Sie Konfigurationsdateien und Befehle für Ihre Umgebung anpassen. Stellen Sie sicher, dass dieser Hostname / diese Domain auch in Ihrem Netzwerk verfügbar ist (nicht nur auf Ihrem lokalen System). Wenn Sie nur lokal arbeiten möchten, können Sie anstatt eines neuen DNS-Namens auch einfach nur die Windows hosts
Datei anpassen. Öffnen Sie dazu die Datei C:\Windows\System32\drivers\etc\hosts
(als Administrator) und fügen den Eintrag 127.0.0.1 demo.bbp.local
hinzu. Der Name demo.bbp.local
wird dann von Windows mit der IP-Adresse 127.0.0.1
aufgelöst.
Die Business Bot Plattform ist nun unter https://demo.bbp.local:55550/bbp/admin/ erreichbar. Sie können nun mit dem WebSetup beginnen. Folgen Sie dazu Kapitel Web-Setup der Plattform und beachten Sie die Datenbank-Anmeldeinformationen im nächsten Abschnitt.
Datenbank-Anmeldeinformationen¶
Das WebSetup der Business Bot Plattform benötigt die Datenbank-Information der Docker Umgebung. Diese sind wie folgt:
DB Hostname | dbserver |
DB Port | 3306 |
Benutzer | root / bbp_admin |
Passwort | bbppass |
DB Name | bbp |
Befehle¶
Plattform starten
1 | $ docker-compose up |
Plattform stoppen
1 | $ docker-compose down |
Verbindung zum Tomcat-Container via bash
1 | $ docker exec -i -t bbp_tomcat bash
|
Verbindung zum MySQL-Container via bash
1 | $ docker exec -i -t bbp_mysql bash
|
Verbindung zum MySQL-Container um eine MySQL-Konsole zu erhalten (mit Datenbank-Passwort)
1 | $ docker exec -i -t bbp_mysql mysql -u root -p
|
Verbindung zum MySQL-Container um eine MySQL-Konsole zu erhalten (ohne Datenbank-Passwort)
1 | $ docker exec -i -t bbp_mysql mysql
|