From ee5871e211e91a2582d25495e581e5d60919d445 Mon Sep 17 00:00:00 2001 From: Bishal Thapaliya Date: Tue, 3 Sep 2024 11:33:18 +0200 Subject: [PATCH] docs(uib): configure healthcheck in production (#2824) Covers [PROD-336](https://bonitasoft.atlassian.net/browse/PROD-336) --- .../ui-builder/production-packaging.adoc | 31 +++++++++++++++++++ .../ui-builder-docker-installation.adoc | 4 ++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/modules/applications/pages/ui-builder/production-packaging.adoc b/modules/applications/pages/ui-builder/production-packaging.adoc index 759ef4c2d7..edd92db790 100644 --- a/modules/applications/pages/ui-builder/production-packaging.adoc +++ b/modules/applications/pages/ui-builder/production-packaging.adoc @@ -63,6 +63,37 @@ docker build --build-arg "BASE={bonita-ui-builder-image}" \ -t : . ---- + +=== 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 diff --git a/modules/applications/pages/ui-builder/ui-builder-docker-installation.adoc b/modules/applications/pages/ui-builder/ui-builder-docker-installation.adoc index 5dd817b945..f51fdbf168 100644 --- a/modules/applications/pages/ui-builder/ui-builder-docker-installation.adoc +++ b/modules/applications/pages/ui-builder/ui-builder-docker-installation.adoc @@ -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`). @@ -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. --- +-- \ No newline at end of file