From 80895cf1afe8e9f46a59cb66f89ed4de121cb9e3 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Mon, 29 Jun 2015 17:09:44 +0200 Subject: [PATCH 01/15] Add Bonita BPM Official Docker image --- bonita/README-short.txt | 1 + bonita/content.md | 49 ++++++++++++++++++++++++++++++++++++++++ bonita/license.md | 3 +++ bonita/logo.png | Bin 0 -> 4442 bytes 4 files changed, 53 insertions(+) create mode 100644 bonita/README-short.txt create mode 100644 bonita/content.md create mode 100644 bonita/license.md create mode 100644 bonita/logo.png diff --git a/bonita/README-short.txt b/bonita/README-short.txt new file mode 100644 index 000000000..3edcf5ad2 --- /dev/null +++ b/bonita/README-short.txt @@ -0,0 +1 @@ +Bonita BPM is an open-source business process management and workflow suite diff --git a/bonita/content.md b/bonita/content.md new file mode 100644 index 000000000..f357ef5ca --- /dev/null +++ b/bonita/content.md @@ -0,0 +1,49 @@ +# What is Bonita BPM? + +Bonita BPM is an open-source business process management and workflow suite created in 2001. It was started in France National Institute for Research in Computer Science, and then had incubated several years inside of the French computer science company Groupe Bull. Since 2009, the development of Bonita is supported by a company dedicated to this activity: Bonitasoft. + +> [wikipedia.org/wiki/Bonita_BPM](http://en.wikipedia.org/wiki/Bonita_BPM) + +![logo](https://github.com/bonitasoft/docker/blob/master/bonita/7.0.0/logo.png?raw=true) + +# How to use this image + +## Quick start + + docker run --name bonita -d -p 8080:8080 bonita + +This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-1) with Bonita BPM Engine + Portal. As you didn't sepecify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. + +You can access to the portal on http://localhost:8080/bonita and login using the default credentials : install / install + +## Link Bonita BPM to a database + +### MySQL + + docker run --name mydbmysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d bonitasoft/mysql + docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 bonita + +### PostgreSQL + + docker run --name mydbpostgres -e POSTGRES_PASSWORD=mysecretpassword -d bonitasoft/postgres + docker run --name bonita_postgres --link mydbpostgres:postgres -d -p 8080:8080 bonita + +## Modify default credentials + + docker run --name=bonita -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 bonita + +If you do so, you can access to the portal on http://localhost:8080/bonita and login using : tech_user / secret + +# Security + +This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. + + * REST API authorization + * [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) + * [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) + * [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) + +But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : + + docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita + diff --git a/bonita/license.md b/bonita/license.md new file mode 100644 index 000000000..4c0b64c27 --- /dev/null +++ b/bonita/license.md @@ -0,0 +1,3 @@ +Bonita BPM image includes two parts : + * Bonita BPM Engine under [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) + * Bonita BPM Portal under [GPL v2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) diff --git a/bonita/logo.png b/bonita/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7d5e013115979f991dfc2aa78e7997a4ca81077e GIT binary patch literal 4442 zcmb7I_dDAG6aOL-v$gk#y=&L15<4hGQAAOj*QS&rVz>6FMD10o6qA!gVx^Z|&f%=#qeM^);0B(X9bL*VEPj zZvMvwZST`>J*3_`7JdLgPWwM00J3wKZk-T+_#;io5+NO#Fr&Mm)d&Dkt;027PlE6} zh?glGn)Ek2VMDw8YuQx3)Ppc&3V{<8MDYsg5}`%jYYZzO3=*-epj#m&xU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V2kmbohb=nXgNn>V`tMp7kwHpP$xV;(Po}?OA&&DPxJ)-V58t(nI2yxAR76aYtfvg&d{AAKWFvGhhcso}V zsU6S}Ap_LBJ?~uUbXZ&YUzk*6^2BwE0{Md%3nKF2d@WVMgbfSsjH!)W!z~UVW^h>X zSGmE(Q?31P^;0v`aBz*O%1`_es5WoZrR62yso`-$3=Ma6cl;#qoyA4;GyKy_^rIt2w6a|XFzh1+Y52~jGV2cV0qUaDyZ5p~9Vpqqpx!Xb% zTKh;Xr0Js;NT`+aA>ww9en@;}Y zoeLb9^(>b$fBI>WFKNERO8G-Rk{XJJyR*uawgxQ3{35#pGd)>yOiiR0Z^rei-Cd^w z6hf_38(k!9(wjE!_?|B9?fwnE??0b>t0!9DvX;9~R5V{4aTlySGs}wnIqCDR0`>;6QLCLNPycTkJip7)KIbsfFE)Ss P1p(li1{zgrwy6ICkj*u} literal 0 HcmV?d00001 From 443849a5ad0d11a5a650f2880252289f8fa9d703 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Mon, 29 Jun 2015 17:39:41 +0200 Subject: [PATCH 02/15] update markdown format --- bonita/content.md | 11 +++++------ bonita/license.md | 7 +++++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index f357ef5ca..745e2090b 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -11,7 +11,7 @@ Bonita BPM is an open-source business process management and workflow suite crea ## Quick start docker run --name bonita -d -p 8080:8080 bonita - + This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-1) with Bonita BPM Engine + Portal. As you didn't sepecify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. You can access to the portal on http://localhost:8080/bonita and login using the default credentials : install / install @@ -38,12 +38,11 @@ If you do so, you can access to the portal on http://localhost:8080/bonita and l This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. - * REST API authorization - * [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) - * [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) - * [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) + - REST API authorization + - [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) + - [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) + - [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita - diff --git a/bonita/license.md b/bonita/license.md index 4c0b64c27..c60179da5 100644 --- a/bonita/license.md +++ b/bonita/license.md @@ -1,3 +1,6 @@ Bonita BPM image includes two parts : - * Bonita BPM Engine under [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) - * Bonita BPM Portal under [GPL v2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + +- Bonita BPM Engine under [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) + +- Bonita BPM Portal under [GPL v2.0](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + From e4a39a8921f0dbb1a53b5309c2308f6dea367157 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Mon, 29 Jun 2015 17:47:27 +0200 Subject: [PATCH 03/15] fix markdown format --- bonita/content.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index 745e2090b..a8135c796 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -38,10 +38,13 @@ If you do so, you can access to the portal on http://localhost:8080/bonita and l This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. - - REST API authorization - - [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) - - [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) - - [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) +- REST API authorization + + - [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) + + - [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) + +- [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : From 21a0a678be0685bab14663753516856d593141dc Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 15 Jul 2015 11:24:52 +0200 Subject: [PATCH 04/15] fix typo --- bonita/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index a8135c796..f800b30d4 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -12,7 +12,7 @@ Bonita BPM is an open-source business process management and workflow suite crea docker run --name bonita -d -p 8080:8080 bonita -This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-1) with Bonita BPM Engine + Portal. As you didn't sepecify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. +This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-1) with Bonita BPM Engine + Portal. As you didn't specify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. You can access to the portal on http://localhost:8080/bonita and login using the default credentials : install / install From a3053fa67aea2508842e3226a9d7729912c0cb89 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 15 Jul 2015 12:29:06 +0200 Subject: [PATCH 05/15] explaining how to use the MySQL official container directly --- bonita/content.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index f800b30d4..ef0cfb624 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -20,7 +20,20 @@ You can access to the portal on http://localhost:8080/bonita and login using the ### MySQL - docker run --name mydbmysql -e MYSQL_ROOT_PASSWORD=mysecretpassword -d bonitasoft/mysql +We need to [increase the packet size](http://documentation.bonitasoft.com/database-configuration-2#mysqlspec) set by default to 1M : + + mkdir -p ~/Documents/Docker/Volumes/custom_mysql + echo "[mysqld]" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf + echo "max_allowed_packet=16M" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf + +Then we can mount that directory location as /etc/mysql/conf.d inside the MySQL container : + + docker run --name mydbmysql -v ~/Documents/Docker/Volumes/custom_mysql/:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql:5.5 + +See the [official MySQL documentation](https://registry.hub.docker.com/_/mysql/) for more details. + +Now we can start our application container like this in order to link it to the MySQL container : + docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 bonita ### PostgreSQL From bf8dc1fe6412ea6a8d8cc36d9f386a2549500a15 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 15 Jul 2015 14:47:11 +0200 Subject: [PATCH 06/15] fix typo --- bonita/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index ef0cfb624..2a3a20bbc 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -24,7 +24,7 @@ We need to [increase the packet size](http://documentation.bonitasoft.com/databa mkdir -p ~/Documents/Docker/Volumes/custom_mysql echo "[mysqld]" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf - echo "max_allowed_packet=16M" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf + echo "max_allowed_packet=16M" >> ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf Then we can mount that directory location as /etc/mysql/conf.d inside the MySQL container : From 6e716818052a04472183915dc21851222b0c1fad Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 15 Jul 2015 15:08:05 +0200 Subject: [PATCH 07/15] explaining how to use the PostgreSQL official container directly --- bonita/content.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index 2a3a20bbc..9ecd5ec90 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -38,7 +38,19 @@ Now we can start our application container like this in order to link it to the ### PostgreSQL - docker run --name mydbpostgres -e POSTGRES_PASSWORD=mysecretpassword -d bonitasoft/postgres +We need to [set max_prepared_transactions to 100](http://documentation.bonitasoft.com/database-configuration-business-data-1) : + + mkdir -p ~/Documents/Docker/Volumes/custom_postgres + echo '#!/bin/bash' > ~/Documents/Docker/Volumes/custom_postgres/bonita.sh + echo 'sed -i "s/^.*max_prepared_transactions\s*=\s*\(.*\)$/max_prepared_transactions = 100/" "$PGDATA"/postgresql.conf' >> ~/Documents/Docker/Volumes/custom_postgres/bonita.sh + chmod +x ~/Documents/Docker/Volumes/custom_postgres/bonita.sh + +Then we can mount that directory location as /docker-entrypoint-initdb.d inside the PostgreSQL container : + + docker run --name mydbpostgres -v ~/Documents/Docker/Volumes/custom_postgres/:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.3 + +See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/postgres/) for more details. + docker run --name bonita_postgres --link mydbpostgres:postgres -d -p 8080:8080 bonita ## Modify default credentials From 5b14285a2e553eba74a945b416df9daebd4b9d9b Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 15 Jul 2015 15:22:11 +0200 Subject: [PATCH 08/15] update documentation links to 7.0.0 version --- bonita/content.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index 9ecd5ec90..2f711902a 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -12,7 +12,7 @@ Bonita BPM is an open-source business process management and workflow suite crea docker run --name bonita -d -p 8080:8080 bonita -This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-1) with Bonita BPM Engine + Portal. As you didn't specify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. +This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-2) with Bonita BPM Engine + Portal. As you didn't specify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. You can access to the portal on http://localhost:8080/bonita and login using the default credentials : install / install @@ -65,11 +65,11 @@ This docker image ensures to activate by default both static and dynamic authori - REST API authorization - - [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#static) + - [Static authorization checking](http://documentation.bonitasoft.com/rest-api-authorization-0#static) - - [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization#dynamic) + - [Dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization-0#dynamic) -- [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization#activate) +- [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization-0#activate) But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : From 6a215bb3b2253050813395481ba7895bb6f5e19e Mon Sep 17 00:00:00 2001 From: JeremJR Date: Fri, 17 Jul 2015 14:07:22 +0200 Subject: [PATCH 09/15] Describe environnement variables --- bonita/content.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index 2f711902a..2de3dc00e 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -59,7 +59,7 @@ See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/po If you do so, you can access to the portal on http://localhost:8080/bonita and login using : tech_user / secret -# Security +## Security This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. @@ -74,3 +74,75 @@ This docker image ensures to activate by default both static and dynamic authori But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita + +## Environnement variables + +When you start the `bonita` image, you can adjust the configuration of the Bonita instance by passing one or more environment variables on the `docker run` command line. + +### `PLATFORM_PASSWORD` + +This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. This environment variable sets the platform administrator password for Bonita. If it is not specified, then the default password of `platform` will be used. + +### `PLATFORM_LOGIN` + +This optional environment variable is used in conjunction with `PLATFORM_PASSWORD` to define the username for the platform administrator. If it is not specified, then the default user of `platformAdmin` will be used. + +### `TENANT_PASSWORD` + +This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. This environment variable sets the tenant administrator password for Bonita. If it is not specified, then the default password of `install` will be used. + +### `TENANT_LOGIN` + +This optional environment variable is used in conjunction with `TENANT_PASSWORD` to define the username for the tenant administrator. If it is not specified, then the default user of `install` will be used. + +### `REST_API_DYN_AUTH_CHECKS` + +This optional environment variable is used to enable or not [dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization-0#dynamic) on Bonita REST API. The default value is true`, which will activate dynamic authorization checking. + +### `HTTP_API` + +This optional environment variable is used to enable or not Bonita HTTP API. The default value is `false`, which will deactivate the HTTP API. + +### `JAVA_OPTS` + +This optional environment variable is used to customize JAVA_OPTS. The default value is `-Xms1024m -Xmx1024m -XX:MaxPermSize=256m`. + +### `ENSURE_DB_CHECK_AND_CREATION` + +This optional environment variable is used to allow or not the SQL queries to automatically check and create the databases using the database adminstrator credentials. The default value is `true`. + +### `DB_VENDOR` + +This environment variable is automatically set to `postgres` or `mysql` if the bonita container is linked to a PostgreSQL or MySQL database using `--link`. The default value is `h2`. It can be overrided if you don't use the `--link` capability. + +### `DB_HOST`, `DB_PORT` + +These variables are optional, used in conjunction to configure the `bonita` image to reach the database instance. There are automatically set if `--link` is used to run the container. + +### `DB_NAME`, `DB_USER`, `DB_PASS` + +These variables are used in conjunction to create a new user, set that user's password and create the `bonita` database. + +`DB_NAME` default value is `bonitadb`. + +`DB_USER` default value is `bonitauser`. + +`DB_PASS` default value is `bonitapass`. + +### `BIZ_DB_NAME`, `BIZ_DB_USER`, `BIZ_DB_PASS` + +These variables are used in conjunction to create a new user, set that user's password and create the `bonita` [business database](http://documentation.bonitasoft.com/business-data-model#bdmanddb). + +`BIZ_DB_NAME` default value is `businessdb`. + +`BIZ_DB_USER` default value is `businessuser`. + +`BIZ_DB_PASS` default value is `businesspass`. + +### `DB_ADMIN_USER`, `DB_ADMIN_PASS` + +These variables are optional, used in conjunction to create users and databases through the administrator account used on the database instance. + +`DB_ADMIN_USER` if no value is provided, it's automatically set to `root` with MySQL or `postgres` with PostgreSQL. + +`DB_ADMIN_PASS` if no value is provided, it's automatically set using the value from the container linked : `MYSQL_ENV_MYSQL_ROOT_PASSWORD` or `POSTGRES_ENV_POSTGRES_PASSWORD`. From 6e301ddd914a5f1752a6c14f3b28049891cc00a1 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Fri, 17 Jul 2015 15:14:06 +0200 Subject: [PATCH 10/15] add "How to extend this image" --- bonita/content.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/bonita/content.md b/bonita/content.md index 2de3dc00e..63c4c510a 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -146,3 +146,21 @@ These variables are optional, used in conjunction to create users and databases `DB_ADMIN_USER` if no value is provided, it's automatically set to `root` with MySQL or `postgres` with PostgreSQL. `DB_ADMIN_PASS` if no value is provided, it's automatically set using the value from the container linked : `MYSQL_ENV_MYSQL_ROOT_PASSWORD` or `POSTGRES_ENV_POSTGRES_PASSWORD`. + +# How to extend this image + +If you would like to do additional initialization, you can add a `*.sh` script under `/opt/custom-init.d`. The `startup.sh` file will source any `*.sh` script found in that directory to do further initialization before starting the service. + +For example, you can increase the log level : + + mkdir -p ~/Documents/Docker/Volumes/custom_bonita + echo '#!/bin/bash' > ~/Documents/Docker/Volumes/custom_bonita/bonita.sh + echo 'sed -i "s/^org.bonitasoft.level = WARNING$/org.bonitasoft.level = FINEST/" /opt/bonita/BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/conf/logging.properties' >> ~/Documents/Docker/Volumes/custom_bonita/bonita.sh + chmod +x ~/Documents/Docker/Volumes/custom_bonita/bonita.sh + + docker run --name bonita_custom -v ~/Documents/Docker/Volumes/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita + +Note : there are several ways to check the `bonita` logs, one of them is + + docker exec -ti bonita_custom /bin/bash + tail -f /opt/bonita/BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/logs/bonita.`date +%Y-%m-%d`.log From 093ead88007c087bede24d0a1ffbfb57c6b70ca1 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Fri, 17 Jul 2015 18:44:38 +0200 Subject: [PATCH 11/15] add "Where to Store Data" and "Migrate from an earlier version of Bonita BPM" --- bonita/content.md | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/bonita/content.md b/bonita/content.md index 63c4c510a..e8aae2db8 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -59,6 +59,113 @@ See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/po If you do so, you can access to the portal on http://localhost:8080/bonita and login using : tech_user / secret +## Where to Store Data + +Most of the data are stored in database and can be stored outside the Bonita container as described above using PostgreSQL or MySQL container. However some data remains inside the Bonita Bundle. The [Bonita Home](http://documentation.bonitasoft.com/bonita-home-0) is a folder called `bonita` which contains configuration, working, and temporary folders and files. There are also logs file inside the `logs` folder. + +Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the `%%REPO%%` images to familiarize themselves with the options available, including: + +- Let Docker manage the storage of your data [by writing the files to disk on the host system using its own internal volume management](https://docs.docker.com/userguide/dockervolumes/#adding-a-data-volume). This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers. +- Create a data directory on the host system (outside the container) and [mount this to a directory visible from inside the container](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume). This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly. + +The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above: + +1. Create a data directory on a suitable volume on your host system, e.g. `/my/own/datadir`. +2. Start your `%%REPO%%` container like this: + + docker run --name some-%%REPO%% -v /my/own/datadir:/opt/bonita -d %%REPO%%:tag + +The `-v /my/own/datadir:/opt/bonita` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/opt/bonita` inside the container, where Bonita by default will deploy its Bundle and write its data files. + +Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it: + + chcon -Rt svirt_sandbox_file_t /my/own/datadir + +## Migrate from an earlier version of Bonita BPM + +1. First we need to stop the container to perform a backup + + docker stop bonita_7.0.0_postgres + +2. Check where your data are stored + + docker inspect bonita_7.0.0_postgres | grep -A1 '"Volumes"' + "Volumes": { + "/opt/bonita": {} + -- + "Volumes": { + "/opt/bonita": "/home/user/Documents/Docker/Volumes/bonita_7.0.0_postgres" + +3. Copy data from the filesystem + + cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.1_postgres + +4. Retrieve the DB container IP + + docker inspect --format '{{ .NetworkSettings.IPAddress }}' mydbpostgres + 172.17.0.26 + +5. Dump the database + + export PGPASSWORD=mysecretpassword + pg_dump -O -x -h 172.17.0.26 -U postgres bonitadb > /tmp/bonitadb.sql + + Note that businessdb won't be updated with the migration tool but you may wan't to also backup/move it. + +6. Load the dump + + export PGPASSWORD=mysecretpassword + psql -U postgres -h 172.17.0.26 -d postgres -c "CREATE USER newbonitauser WITH PASSWORD 'newbonitapass';" + psql -U postgres -h 172.17.0.26 -d postgres -c "CREATE DATABASE newbonitadb OWNER newbonitauser;" + export PGPASSWORD=newbonitapass + cat /tmp/bonitadb.sql | psql -U newbonitauser -h 172.17.0.26 newbonitadb + +7. Retrieve the last migration tool and the target version of bonita bundle + + cd ~/Documents/Docker/Volumes/bonita_7.0.1_postgres + wget http://download.forge.ow2.org/bonita/bonita-migration-distrib-2.0.0.zip + wget http://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.0.1-Tomcat-7.0.55.zip + unzip bonita-migration-distrib-2.0.0.zip -d bonita-migration-distrib-2.0.0 + unzip BonitaBPMCommunity-7.0.1-Tomcat-7.0.55.zip + +8. Move previous home into the new bundle + + mv BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita.orig + cp -r BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita/ + +9. Configure the migration tool + + cd bonita-migration-distrib-2.0.0/ + + add jdbc driver + + cp ../BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/lib/bonita/postgresql-9.3-1102.jdbc41.jar lib/ + + edit the migration tool config to point towards the copy of bonita home and db + + vim Config.properties + + For example : + + bonita.home=/home/user/Documents/Docker/Volumes/bonita_7.0.1_postgres/BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita + # JDBC properties + ## Postgres + db.vendor=postgres + db.url=jdbc:postgresql://172.17.0.26:5432/newbonitadb + db.driverClass=org.postgresql.Driver + db.user=newbonitauser + db.password=newbonitapass + +10. Launch the migration : + + ./migration.sh + +11. launch the new container pointing towards the copy of DB and filesystem : + + docker run --name=bonita_7.0.1_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v ~/Documents/Docker/Volumes/bonita_7.0.1_postgres:/opt/bonita/ -d -p 8081:8080 bonita:7.0.1 + +For more details regarding Bonita migration, see the [documentation](http://documentation.bonitasoft.com/migrate-earlier-version-bonita-bpm-0). + ## Security This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. From f1337fdd58096042ed8ead5bed52457ec7b03f45 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Fri, 17 Jul 2015 18:59:59 +0200 Subject: [PATCH 12/15] fix ident --- bonita/content.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index e8aae2db8..fa358d3a5 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -85,7 +85,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T 1. First we need to stop the container to perform a backup - docker stop bonita_7.0.0_postgres + docker stop bonita_7.0.0_postgres 2. Check where your data are stored @@ -98,7 +98,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T 3. Copy data from the filesystem - cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.1_postgres + cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.1_postgres 4. Retrieve the DB container IP From c17e789c7f238726fa7ceba457781324f1679691 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Fri, 31 Jul 2015 15:12:52 +0200 Subject: [PATCH 13/15] fix mistake --- bonita/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bonita/content.md b/bonita/content.md index fa358d3a5..0c4c7eb04 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -110,7 +110,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T export PGPASSWORD=mysecretpassword pg_dump -O -x -h 172.17.0.26 -U postgres bonitadb > /tmp/bonitadb.sql - Note that businessdb won't be updated with the migration tool but you may wan't to also backup/move it. + Note that businessdb won't be updated with the migration tool but you may want to also backup/move it. 6. Load the dump From 27f58c094c7a74d55dc9215d6bd8b01bd82235e9 Mon Sep 17 00:00:00 2001 From: JeremJR Date: Thu, 10 Sep 2015 16:48:52 +0200 Subject: [PATCH 14/15] rephrase sentences and update the example of migration with 7.0.3 --- bonita/content.md | 111 ++++++++++++++++++++++++---------------------- 1 file changed, 57 insertions(+), 54 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index 0c4c7eb04..42abe4670 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -12,40 +12,40 @@ Bonita BPM is an open-source business process management and workflow suite crea docker run --name bonita -d -p 8080:8080 bonita -This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-2) with Bonita BPM Engine + Portal. As you didn't specify any environment variables it's almost like if you have launched the Bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). It means that Bonita BPM uses a H2 database here. +This will start a container running the [Tomcat Bundle](http://documentation.bonitasoft.com/tomcat-bundle-2) with Bonita BPM Engine + Bonita BPM Portal. With no environment variables specified, it's as like if you have launched the bundle on your host using startup.{sh|bat} (with security hardening on REST and HTTP APIs, cf Security part). Bonita BPM uses a H2 database here. -You can access to the portal on http://localhost:8080/bonita and login using the default credentials : install / install +You can access the Bonita BPM Portal on http://localhost:8080/bonita and login using the default credentials: install / install ## Link Bonita BPM to a database ### MySQL -We need to [increase the packet size](http://documentation.bonitasoft.com/database-configuration-2#mysqlspec) set by default to 1M : +[Increase the packet size](http://documentation.bonitasoft.com/database-configuration-2#mysqlspec) which is set by default to 1M: mkdir -p ~/Documents/Docker/Volumes/custom_mysql echo "[mysqld]" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf echo "max_allowed_packet=16M" >> ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf -Then we can mount that directory location as /etc/mysql/conf.d inside the MySQL container : +Mount that directory location as /etc/mysql/conf.d inside the MySQL container: docker run --name mydbmysql -v ~/Documents/Docker/Volumes/custom_mysql/:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql:5.5 See the [official MySQL documentation](https://registry.hub.docker.com/_/mysql/) for more details. -Now we can start our application container like this in order to link it to the MySQL container : +Start your application container to link it to the MySQL container: docker run --name bonita_mysql --link mydbmysql:mysql -d -p 8080:8080 bonita ### PostgreSQL -We need to [set max_prepared_transactions to 100](http://documentation.bonitasoft.com/database-configuration-business-data-1) : +[Set max_prepared_transactions to 100](http://documentation.bonitasoft.com/database-configuration-business-data-1): mkdir -p ~/Documents/Docker/Volumes/custom_postgres echo '#!/bin/bash' > ~/Documents/Docker/Volumes/custom_postgres/bonita.sh echo 'sed -i "s/^.*max_prepared_transactions\s*=\s*\(.*\)$/max_prepared_transactions = 100/" "$PGDATA"/postgresql.conf' >> ~/Documents/Docker/Volumes/custom_postgres/bonita.sh chmod +x ~/Documents/Docker/Volumes/custom_postgres/bonita.sh -Then we can mount that directory location as /docker-entrypoint-initdb.d inside the PostgreSQL container : +Mount that directory location as /docker-entrypoint-initdb.d inside the PostgreSQL container: docker run --name mydbpostgres -v ~/Documents/Docker/Volumes/custom_postgres/:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.3 @@ -57,16 +57,16 @@ See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/po docker run --name=bonita -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 bonita -If you do so, you can access to the portal on http://localhost:8080/bonita and login using : tech_user / secret +Now you can access the Bonita BPM Portal on localhost:8080/bonita and login using: tech_user / secret -## Where to Store Data +## Where to store data -Most of the data are stored in database and can be stored outside the Bonita container as described above using PostgreSQL or MySQL container. However some data remains inside the Bonita Bundle. The [Bonita Home](http://documentation.bonitasoft.com/bonita-home-0) is a folder called `bonita` which contains configuration, working, and temporary folders and files. There are also logs file inside the `logs` folder. +Most of the data are stored in a database and can be stored outside the Bonita container as described above using the PostgreSQL or MySQL container. However, some data remains inside the Bonita bundle. Bonita Home is a folder, called `bonita`, which contains configuration, working, and temporary folders and files. There are also log files inside the `logs` folder. Important note: There are several ways to store data used by applications that run in Docker containers. We encourage users of the `%%REPO%%` images to familiarize themselves with the options available, including: - Let Docker manage the storage of your data [by writing the files to disk on the host system using its own internal volume management](https://docs.docker.com/userguide/dockervolumes/#adding-a-data-volume). This is the default and is easy and fairly transparent to the user. The downside is that the files may be hard to locate for tools and applications that run directly on the host system, i.e. outside containers. -- Create a data directory on the host system (outside the container) and [mount this to a directory visible from inside the container](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume). This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that e.g. directory permissions and other security mechanisms on the host system are set up correctly. +- Create a data directory on the host system (outside the container) and [mount this to a directory visible from inside the container](https://docs.docker.com/userguide/dockervolumes/#mount-a-host-directory-as-a-data-volume). This places the database files in a known location on the host system, and makes it easy for tools and applications on the host system to access the files. The downside is that the user needs to make sure that the directory exists, and that directory permissions and other security mechanisms on the host system are set up correctly. The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above: @@ -75,7 +75,7 @@ The Docker documentation is a good starting point for understanding the differen docker run --name some-%%REPO%% -v /my/own/datadir:/opt/bonita -d %%REPO%%:tag -The `-v /my/own/datadir:/opt/bonita` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/opt/bonita` inside the container, where Bonita by default will deploy its Bundle and write its data files. +The `-v /my/own/datadir:/opt/bonita` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/opt/bonita` inside the container, where Bonita will deploy the bundle and write data files by default. Note that users on host systems with SELinux enabled may see issues with this. The current workaround is to assign the relevant SELinux policy type to the new data directory so that the container will be allowed to access it: @@ -83,22 +83,27 @@ Note that users on host systems with SELinux enabled may see issues with this. T ## Migrate from an earlier version of Bonita BPM -1. First we need to stop the container to perform a backup +1. Stop the container to perform a backup docker stop bonita_7.0.0_postgres 2. Check where your data are stored - docker inspect bonita_7.0.0_postgres | grep -A1 '"Volumes"' - "Volumes": { - "/opt/bonita": {} - -- - "Volumes": { - "/opt/bonita": "/home/user/Documents/Docker/Volumes/bonita_7.0.0_postgres" + docker inspect bonita_7.0.0_postgres + [...] + "Mounts": [ + { + "Source": "/home/user/Documents/Docker/Volumes/bonita_7.0.0_postgres", + "Destination": "/opt/bonita", + "Mode": "", + "RW": true + } + ], + [...] 3. Copy data from the filesystem - cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.1_postgres + cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.3_postgres 4. Retrieve the DB container IP @@ -120,24 +125,24 @@ Note that users on host systems with SELinux enabled may see issues with this. T export PGPASSWORD=newbonitapass cat /tmp/bonitadb.sql | psql -U newbonitauser -h 172.17.0.26 newbonitadb -7. Retrieve the last migration tool and the target version of bonita bundle +7. Retrieve the last migration tool and the target version of the Bonita bundle - cd ~/Documents/Docker/Volumes/bonita_7.0.1_postgres - wget http://download.forge.ow2.org/bonita/bonita-migration-distrib-2.0.0.zip - wget http://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.0.1-Tomcat-7.0.55.zip - unzip bonita-migration-distrib-2.0.0.zip -d bonita-migration-distrib-2.0.0 - unzip BonitaBPMCommunity-7.0.1-Tomcat-7.0.55.zip + cd ~/Documents/Docker/Volumes/bonita_7.0.3_postgres + wget http://download.forge.ow2.org/bonita/bonita-migration-distrib-2.2.0.zip + wget http://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.0.3-Tomcat-7.0.55.zip + unzip bonita-migration-distrib-2.2.0.zip -d bonita-migration-distrib-2.2.0 + unzip BonitaBPMCommunity-7.0.3-Tomcat-7.0.55.zip -8. Move previous home into the new bundle +8. Move the previous Home into the new bundle - mv BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita.orig - cp -r BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita/ + mv BonitaBPMCommunity-7.0.3-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.3-Tomcat-7.0.55/bonita.orig + cp -r BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/bonita/ BonitaBPMCommunity-7.0.3-Tomcat-7.0.55/bonita/ 9. Configure the migration tool - cd bonita-migration-distrib-2.0.0/ + cd bonita-migration-distrib-2.2.0/ - add jdbc driver + add the jdbc driver cp ../BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/lib/bonita/postgresql-9.3-1102.jdbc41.jar lib/ @@ -147,28 +152,26 @@ Note that users on host systems with SELinux enabled may see issues with this. T For example : - bonita.home=/home/user/Documents/Docker/Volumes/bonita_7.0.1_postgres/BonitaBPMCommunity-7.0.1-Tomcat-7.0.55/bonita - # JDBC properties - ## Postgres + bonita.home=/home/user/Documents/Docker/Volumes/bonita_7.0.3_postgres/BonitaBPMCommunity-7.0.3-Tomcat-7.0.55/bonita db.vendor=postgres db.url=jdbc:postgresql://172.17.0.26:5432/newbonitadb db.driverClass=org.postgresql.Driver db.user=newbonitauser db.password=newbonitapass -10. Launch the migration : +10. Launch the migration ./migration.sh -11. launch the new container pointing towards the copy of DB and filesystem : +11. Launch the new container pointing towards the copy of DB and filesystem - docker run --name=bonita_7.0.1_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v ~/Documents/Docker/Volumes/bonita_7.0.1_postgres:/opt/bonita/ -d -p 8081:8080 bonita:7.0.1 + docker run --name=bonita_7.0.3_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v ~/Documents/Docker/Volumes/bonita_7.0.3_postgres:/opt/bonita/ -d -p 8081:8080 bonita:7.0.3 For more details regarding Bonita migration, see the [documentation](http://documentation.bonitasoft.com/migrate-earlier-version-bonita-bpm-0). ## Security -This docker image ensures to activate by default both static and dynamic authorization checks on REST API. To be coherent it also deactivates the HTTP API. +This Docker image activates both static and dynamic authorization checks by default on REST API. To be consistent, it also deactivates the HTTP API. - REST API authorization @@ -178,37 +181,37 @@ This docker image ensures to activate by default both static and dynamic authori - [HTTP API](http://documentation.bonitasoft.com/rest-api-authorization-0#activate) -But for specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false : +For specific needs you can override this behavior by setting HTTP_API to true and REST_API_DYN_AUTH_CHECKS to false: docker run -e HTTP_API=true -e REST_API_DYN_AUTH_CHECKS=false --name bonita -d -p 8080:8080 bonita -## Environnement variables +## Environment variables When you start the `bonita` image, you can adjust the configuration of the Bonita instance by passing one or more environment variables on the `docker run` command line. ### `PLATFORM_PASSWORD` -This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. This environment variable sets the platform administrator password for Bonita. If it is not specified, then the default password of `platform` will be used. +This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. It sets the platform administrator password for Bonita. If it is not specified, the default password `platform` will be used. ### `PLATFORM_LOGIN` -This optional environment variable is used in conjunction with `PLATFORM_PASSWORD` to define the username for the platform administrator. If it is not specified, then the default user of `platformAdmin` will be used. +This optional environment variable is used in conjunction with `PLATFORM_PASSWORD` to define the username for the platform administrator. If it is not specified, the default user `platformAdmin` will be used. ### `TENANT_PASSWORD` -This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. This environment variable sets the tenant administrator password for Bonita. If it is not specified, then the default password of `install` will be used. +This environment variable [is recommended](http://documentation.bonitasoft.com/first-steps-after-setup-1#reset_pw) for you to use the Bonita image. It sets the tenant administrator password for Bonita. If it is not specified, the default password `install` will be used. ### `TENANT_LOGIN` -This optional environment variable is used in conjunction with `TENANT_PASSWORD` to define the username for the tenant administrator. If it is not specified, then the default user of `install` will be used. +This optional environment variable is used in conjunction with `TENANT_PASSWORD` to define the username for the tenant administrator. If it is not specified, the default user of `install` will be used. ### `REST_API_DYN_AUTH_CHECKS` -This optional environment variable is used to enable or not [dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization-0#dynamic) on Bonita REST API. The default value is true`, which will activate dynamic authorization checking. +This optional environment variable is used to enable/disable [dynamic authorization checking](http://documentation.bonitasoft.com/rest-api-authorization-0#dynamic) on Bonita REST API. The default value is `true`, which will activate dynamic authorization checking. ### `HTTP_API` -This optional environment variable is used to enable or not Bonita HTTP API. The default value is `false`, which will deactivate the HTTP API. +This optional environment variable is used to enable/disable the Bonita HTTP API. The default value is `false`, which will deactivate the HTTP API. ### `JAVA_OPTS` @@ -216,11 +219,11 @@ This optional environment variable is used to customize JAVA_OPTS. The default v ### `ENSURE_DB_CHECK_AND_CREATION` -This optional environment variable is used to allow or not the SQL queries to automatically check and create the databases using the database adminstrator credentials. The default value is `true`. +This optional environment variable is used to allow/disallow the SQL queries to automatically check and create the databases using the database administrator credentials. The default value is `true`. ### `DB_VENDOR` -This environment variable is automatically set to `postgres` or `mysql` if the bonita container is linked to a PostgreSQL or MySQL database using `--link`. The default value is `h2`. It can be overrided if you don't use the `--link` capability. +This environment variable is automatically set to `postgres` or `mysql` if the Bonita container is linked to a PostgreSQL or MySQL database using `--link`. The default value is `h2`. It can be overridden if you don't use the `--link` capability. ### `DB_HOST`, `DB_PORT` @@ -228,7 +231,7 @@ These variables are optional, used in conjunction to configure the `bonita` imag ### `DB_NAME`, `DB_USER`, `DB_PASS` -These variables are used in conjunction to create a new user, set that user's password and create the `bonita` database. +These variables are used in conjunction to create a new user, set that user's password, and create the `bonita` database. `DB_NAME` default value is `bonitadb`. @@ -248,15 +251,15 @@ These variables are used in conjunction to create a new user, set that user's pa ### `DB_ADMIN_USER`, `DB_ADMIN_PASS` -These variables are optional, used in conjunction to create users and databases through the administrator account used on the database instance. +These variables are optional, and used in conjunction to create users and databases through the administrator account used on the database instance. -`DB_ADMIN_USER` if no value is provided, it's automatically set to `root` with MySQL or `postgres` with PostgreSQL. +`DB_ADMIN_USER` if no value is provided, this is automatically set to `root` with MySQL or `postgres` with PostgreSQL. -`DB_ADMIN_PASS` if no value is provided, it's automatically set using the value from the container linked : `MYSQL_ENV_MYSQL_ROOT_PASSWORD` or `POSTGRES_ENV_POSTGRES_PASSWORD`. +`DB_ADMIN_PASS` if no value is provided, this is automatically set using the value from the linked container: `MYSQL_ENV_MYSQL_ROOT_PASSWORD` or `POSTGRES_ENV_POSTGRES_PASSWORD`. # How to extend this image -If you would like to do additional initialization, you can add a `*.sh` script under `/opt/custom-init.d`. The `startup.sh` file will source any `*.sh` script found in that directory to do further initialization before starting the service. +If you would like to do additional initialization, you can add a `*.sh` script under `/opt/custom-init.d`. The `startup.sh` file will source any `*.sh` script found in this directory to do further initialization before starting the service. For example, you can increase the log level : @@ -267,7 +270,7 @@ For example, you can increase the log level : docker run --name bonita_custom -v ~/Documents/Docker/Volumes/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita -Note : there are several ways to check the `bonita` logs, one of them is +Note: There are several ways to check the `bonita` logs. One of them is docker exec -ti bonita_custom /bin/bash tail -f /opt/bonita/BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/logs/bonita.`date +%Y-%m-%d`.log From b2a717449e991683b1c3b171c4c48eb9d8e6001e Mon Sep 17 00:00:00 2001 From: JeremJR Date: Wed, 14 Oct 2015 16:34:13 +0200 Subject: [PATCH 15/15] simplify pathes --- bonita/content.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/bonita/content.md b/bonita/content.md index 42abe4670..7bb69860a 100644 --- a/bonita/content.md +++ b/bonita/content.md @@ -22,13 +22,13 @@ You can access the Bonita BPM Portal on http://localhost:8080/bonita and login u [Increase the packet size](http://documentation.bonitasoft.com/database-configuration-2#mysqlspec) which is set by default to 1M: - mkdir -p ~/Documents/Docker/Volumes/custom_mysql - echo "[mysqld]" > ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf - echo "max_allowed_packet=16M" >> ~/Documents/Docker/Volumes/custom_mysql/bonita.cnf + mkdir -p custom_mysql + echo "[mysqld]" > custom_mysql/bonita.cnf + echo "max_allowed_packet=16M" >> custom_mysql/bonita.cnf Mount that directory location as /etc/mysql/conf.d inside the MySQL container: - docker run --name mydbmysql -v ~/Documents/Docker/Volumes/custom_mysql/:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql:5.5 + docker run --name mydbmysql -v "$PWD"/custom_mysql/:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=mysecretpassword -d mysql:5.5 See the [official MySQL documentation](https://registry.hub.docker.com/_/mysql/) for more details. @@ -40,14 +40,14 @@ Start your application container to link it to the MySQL container: [Set max_prepared_transactions to 100](http://documentation.bonitasoft.com/database-configuration-business-data-1): - mkdir -p ~/Documents/Docker/Volumes/custom_postgres - echo '#!/bin/bash' > ~/Documents/Docker/Volumes/custom_postgres/bonita.sh - echo 'sed -i "s/^.*max_prepared_transactions\s*=\s*\(.*\)$/max_prepared_transactions = 100/" "$PGDATA"/postgresql.conf' >> ~/Documents/Docker/Volumes/custom_postgres/bonita.sh - chmod +x ~/Documents/Docker/Volumes/custom_postgres/bonita.sh + mkdir -p custom_postgres + echo '#!/bin/bash' > custom_postgres/bonita.sh + echo 'sed -i "s/^.*max_prepared_transactions\s*=\s*\(.*\)$/max_prepared_transactions = 100/" "$PGDATA"/postgresql.conf' >> custom_postgres/bonita.sh + chmod +x custom_postgres/bonita.sh Mount that directory location as /docker-entrypoint-initdb.d inside the PostgreSQL container: - docker run --name mydbpostgres -v ~/Documents/Docker/Volumes/custom_postgres/:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.3 + docker run --name mydbpostgres -v "$PWD"/custom_postgres/:/docker-entrypoint-initdb.d -e POSTGRES_PASSWORD=mysecretpassword -d postgres:9.3 See the [official PostgreSQL documentation](https://registry.hub.docker.com/_/postgres/) for more details. @@ -103,7 +103,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T 3. Copy data from the filesystem - cp -r ~/Documents/Docker/Volumes/bonita_7.0.0_postgres ~/Documents/Docker/Volumes/bonita_7.0.3_postgres + cp -r bonita_7.0.0_postgres bonita_7.0.3_postgres 4. Retrieve the DB container IP @@ -127,7 +127,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T 7. Retrieve the last migration tool and the target version of the Bonita bundle - cd ~/Documents/Docker/Volumes/bonita_7.0.3_postgres + cd bonita_7.0.3_postgres wget http://download.forge.ow2.org/bonita/bonita-migration-distrib-2.2.0.zip wget http://download.forge.ow2.org/bonita/BonitaBPMCommunity-7.0.3-Tomcat-7.0.55.zip unzip bonita-migration-distrib-2.2.0.zip -d bonita-migration-distrib-2.2.0 @@ -165,7 +165,7 @@ Note that users on host systems with SELinux enabled may see issues with this. T 11. Launch the new container pointing towards the copy of DB and filesystem - docker run --name=bonita_7.0.3_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v ~/Documents/Docker/Volumes/bonita_7.0.3_postgres:/opt/bonita/ -d -p 8081:8080 bonita:7.0.3 + docker run --name=bonita_7.0.3_postgres --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -v "$PWD"/bonita_7.0.3_postgres:/opt/bonita/ -d -p 8081:8080 bonita:7.0.3 For more details regarding Bonita migration, see the [documentation](http://documentation.bonitasoft.com/migrate-earlier-version-bonita-bpm-0). @@ -263,12 +263,12 @@ If you would like to do additional initialization, you can add a `*.sh` script u For example, you can increase the log level : - mkdir -p ~/Documents/Docker/Volumes/custom_bonita - echo '#!/bin/bash' > ~/Documents/Docker/Volumes/custom_bonita/bonita.sh - echo 'sed -i "s/^org.bonitasoft.level = WARNING$/org.bonitasoft.level = FINEST/" /opt/bonita/BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/conf/logging.properties' >> ~/Documents/Docker/Volumes/custom_bonita/bonita.sh - chmod +x ~/Documents/Docker/Volumes/custom_bonita/bonita.sh + mkdir -p custom_bonita + echo '#!/bin/bash' > custom_bonita/bonita.sh + echo 'sed -i "s/^org.bonitasoft.level = WARNING$/org.bonitasoft.level = FINEST/" /opt/bonita/BonitaBPMCommunity-7.0.0-Tomcat-7.0.55/conf/logging.properties' >> custom_bonita/bonita.sh + chmod +x custom_bonita/bonita.sh - docker run --name bonita_custom -v ~/Documents/Docker/Volumes/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita + docker run --name bonita_custom -v "$PWD"/custom_bonita/:/opt/custom-init.d -d -p 8080:8080 bonita Note: There are several ways to check the `bonita` logs. One of them is