Skip to content

Commit

Permalink
update Bonita Platform and Update Tool versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rbioteau committed Oct 11, 2024
1 parent cac31f1 commit 80d1122
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 39 deletions.
25 changes: 12 additions & 13 deletions bonita/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ From Bonita 2022.1 onwards, the Bonita docker image does not include configurati
Therefore the PostgreSQL container needs to be configured to work with Bonita before starting the Bonita container. The configuration of a PostgreSQL database to work with Bonita is described in details in the [database configuration page](https://documentation.bonitasoft.com/bonita/latest/runtime/database-configuration#postgres_setup). + Alternatively, Bonita provides a preconfigured [PostgreSQL image](https://hub.docker.com/r/bonitasoft/bonita-postgres) on docker-hub. + You can run the image with the following command:

```bash
docker run --name mydbpostgres -h <hostname> -d bonitasoft/bonita-postgres:12.6
docker run --name mydbpostgres -h <hostname> -d bonitasoft/bonita-postgres:16.4
```

This image is built from the following [GitHub repository](https://github.com/Bonitasoft-Community/bonita-database-docker/tree/main/postgres/12), which can be further adapted/customized to suit your needs.
This image is built from the following [GitHub repository](https://github.com/Bonitasoft-Community/bonita-database-docker/tree/main/postgres/15), which can be further adapted/customized to suit your needs.

## %%STACK%%

Expand Down Expand Up @@ -66,7 +66,7 @@ docker run --name=bonita -h <hostname> --env-file=env.txt -d -p 8080:8080 %%IMAG
## Start Bonita with custom security credentials

```bash
docker run --name=bonita -h <hostname> -e "TENANT_LOGIN=tech_user" -e "TENANT_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 %%IMAGE%%
docker run --name=bonita -h <hostname> -e "BONITA_RUNTIME_ADMIN_USERNAME=tech_user" -e "BONITA_RUNTIME_ADMIN_PASSWORD=secret" -e "PLATFORM_LOGIN=pfadmin" -e "PLATFORM_PASSWORD=pfsecret" -d -p 8080:8080 %%IMAGE%%
```

Now you can access the Bonita Runtime on localhost:8080/bonita and login using: tech_user / secret
Expand All @@ -92,11 +92,11 @@ This optional environment variable is used in conjunction with PLATFORM_PASSWORD

This environment variable is recommended 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.

### TENANT_LOGIN
### BONITA_RUNTIME_ADMIN_USERNAME

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 username `install` will be used.
This optional environment variable is used in conjunction with BONITA_RUNTIME_ADMIN_PASSWORD to define the username for the tenant administrator. If it is not specified, the default username `install` will be used.

### TENANT_PASSWORD
### BONITA_RUNTIME_ADMIN_PASSWORD

This environment variable is recommended 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.

Expand Down Expand Up @@ -190,7 +190,7 @@ These variables are used in conjunction to define how Bonita should access the [

The logger can be configured by mounting a volume on folder `/opt/bonita/conf/logs` containing the configuration files.

the volume must contain the 2 files [log4j2-loggers.xml](https://raw.githubusercontent.com/bonitasoft/bonita-distrib/7.14.0/tomcat-resources/tomcat-distrib-for-bonita/src/main/resources/tomcat/server/conf/log4j2-loggers.xml) and [log4j2-appenders.xml](https://raw.githubusercontent.com/bonitasoft/bonita-distrib/7.14.0/docker/files/log4j2/log4j2-appenders.xml)
the volume must contain the 2 files [log4j2-loggers.xml](https://raw.githubusercontent.com/bonitasoft/bonita-distrib/10.2.0/tomcat-resources/tomcat-distrib-for-bonita/src/main/resources/tomcat/server/conf/log4j2-loggers.xml) and [log4j2-appenders.xml](https://raw.githubusercontent.com/bonitasoft/bonita-distrib/10.2.0/docker/files/log4j2/log4j2-appenders.xml)

Any change made to one of this 2 files is automatically hot-reloaded and taken into account immediately.

Expand All @@ -212,7 +212,7 @@ $ docker run -e HTTP_API=true -e HTTP_API_PASSWORD="My-Cust0m_S3cR3T" --name bo

## Update from an earlier version of Bonita

For updating from a version before 7.10.0, please refer to the [documentation](https://documentation.bonitasoft.com/bonita/latest/version-update/migrate-from-an-earlier-version-of-bonita)
For updating from a version before 7.10.0, please refer to the [documentation](https://documentation.bonitasoft.com/bonita/latest/version-update/update-with-migration-tool)

- Stop the container to perform a database backup

Expand Down Expand Up @@ -246,17 +246,16 @@ For updating from a version before 7.10.0, please refer to the [documentation](h
$ cat /tmp/bonitadb.sql | psql -U newbonitauser -h 172.17.0.26 newbonitadb
```

- Retrieve the last update tool
- Retrieve the last update tool archive from https://www.bonitasoft.com/downloads

```console
wget https://github.com/bonitasoft/bonita-platform-releases/releases/download/2023.2-u0/bonita-update-tool-3.3.0.zip
unzip bonita-update-tool-3.3.0.zip
unzip bonita-update-tool-3.6.0.zip
```

- Configure the update tool

```console
$ cd bonita-update-tool-3.3.0
$ cd bonita-update-tool-3.6.0
```

edit the update tool configuration file `Config.properties` to point towards the database.
Expand Down Expand Up @@ -285,7 +284,7 @@ For updating from a version before 7.10.0, please refer to the [documentation](h
- Launch the new container pointing towards the copy of the database.

```console
$ docker run --name=bonita --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 %%IMAGE%%:2023.2-u0
$ docker run --name=bonita --link mydbpostgres:postgres -e "DB_NAME=newbonitadb" -e "DB_USER=newbonitauser" -e "DB_PASS=newbonitapass" -d -p 8081:8080 %%IMAGE%%:2024.3-u0
```

For more details regarding Bonita update and for version before 7.10.0, see the [documentation](https://documentation.bonitasoft.com/bonita/latest/version-update/migrate-from-an-earlier-version-of-bonita).
34 changes: 8 additions & 26 deletions bonita/stack.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
version: '3'

services:
db:
image: bonitasoft/bonita-postgres:12.6
image: bonitasoft/bonita-postgres:15.3
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: example
restart: always
command:
- -c
- max_prepared_transactions=100
bonita:
image: bonita:7.14.0
image: bonita:2024.1
hostname: custom-hostname.example.com
ports:
- 8080:8080
Expand All @@ -24,26 +21,11 @@ services:
- BIZ_DB_NAME=business_data
- BIZ_DB_USER=business_data
- BIZ_DB_PASS=bpm
- TENANT_LOGIN=tech_user
- TENANT_PASSWORD=secret
- BONITA_RUNTIME_ADMIN_USERNAME=tech_user
- BONITA_RUNTIME_ADMIN_PASSWORD=secret
- PLATFORM_LOGIN=pfadmin
- PLATFORM_PASSWORD=pfsecret
restart: on-failure:2
depends_on:
- db
entrypoint:
- bash
- -c
- |
set -e
echo 'Waiting for PostgreSQL to be available'
maxTries=10
while [ "$$maxTries" -gt 0 ] && [ $$(echo 'QUIT' | nc -w 1 "$$DB_HOST" 5432; echo "$$?") -gt 0 ]; do
sleep 1
let maxTries--
done
if [ "$$maxTries" -le 0 ]; then
echo >&2 'error: unable to contact Postgres after 10 tries'
exit 1
fi
exec /opt/files/startup.sh /opt/bonita/server/bin/catalina.sh run
db:
condition: service_healthy

0 comments on commit 80d1122

Please sign in to comment.