Skip to content

Commit

Permalink
docs(uib): configure healthcheck in production (#2824)
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalThapaliya authored Sep 3, 2024
1 parent b399abb commit ee5871e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
31 changes: 31 additions & 0 deletions modules/applications/pages/ui-builder/production-packaging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,37 @@ docker build --build-arg "BASE={bonita-ui-builder-image}" \
-t <image-name>:<version> .
----


=== Configure and manage Bonita healthcheck settings in a production environment

The xref:runtime:healthcheck-mechanism.adoc[Bonita healthcheck] is a mechanism used to monitor the health and availability of Bonita services in production environments.
It periodically checks the status of these services to ensure they are functioning properly, helping to identify issues early and maintain system stability.

Changing the default credentials for the healthcheck is crucial for security.
The default values for `BONITA_HEALTHCHECK_USER` and `BONITA_HEALTHCHECK_PASSWORD` are publicly known, and failing to update them can expose your healthcheck endpoint to unauthorized access and potential manipulation.
Configuring Bonita's healthcheck in a production environment involves several key steps to ensure both security and functionality.

To manage this, begin by assigning custom values to the credentials through environment variables:

- `BONITA_HEALTHCHECK_USER`: Defines a custom username. Example: `export BONITA_HEALTHCHECK_USER=my_custom_user`

- `BONITA_HEALTHCHECK_PASSWORD`: Defines a custom password. Example: `export BONITA_HEALTHCHECK_PASSWORD=my_secure_password`

Healthcheck configurations are not handled via the UI Builder but are instead managed through environment variables on the server where Bonita is deployed.
To fine-tune the healthcheck behavior, adjust the following parameters:

- `BONITA_HEALTHCHECK_RETRY_DELAY`: Sets the delay (in milliseconds) between retry attempts, with a default of `5000`. Example: export `BONITA_HEALTHCHECK_RETRY_DELAY=3000` for a 3-second delay.
- `BONITA_HEALTHCHECK_MAX_ATTEMPTS`: Specifies the maximum number of retry attempts, defaulting to `20`. Example: `export BONITA_HEALTHCHECK_MAX_ATTEMPTS=10` reduces the number of attempts.

[NOTE]
====
These variables should be configured in the server environment where Bonita is deployed. After configuration, verify the healthcheck via a browser to ensure the service is responsive and requires custom credentials.
If issues arise, check the environment variables, service status, and logs, and adjust the retry delay and maximum attempts as needed.
====

By following these steps, you can effectively configure Bonita's healthcheck to maintain both security and optimal performance in your production environment.


[[run-production-binary]]
== Run the production binary

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The following environment variable is mandatory:

The following environment variables are optional:

- `BONITA_HEALTHCHECK_USER`: Defines the username to request the Bonita healthcheck API (default: `monitoring`).
- `BONITA_HEALTHCHECK_PASSWORD`: Defines the password to request the Bonita healthcheck API (default: `mon1tor1ng_adm1n`).
- `BONITA_DEV_MODE`: Enables user to development mode when set to `true` (default: `true`).
- `LOGGING_LEVEL_ROOT`: Sets the logging level for the root logger (default: `debug`).
- `LOGGING_LEVEL_COM_APPSMITH`: Sets the logging level for Appsmith components (default: `debug`).
Expand Down Expand Up @@ -59,4 +61,4 @@ The Bonita UI Builder is not correctly configured.

[.solution]#Solution#
Check the environment variables and make sure they are correctly set. The `BONITA_API_URL` should target a valid Bonita Runtime.
--
--

0 comments on commit ee5871e

Please sign in to comment.