Commit d4af8277 authored by Truc Nguyen's avatar Truc Nguyen Committed by JeremJR
Browse files

feat(customization): document bonita extra published ports (BCD-178) (#36)

* feat(customization): document bonita extra published ports (BCD-178)
* feat(customization): add link to Oracle JMX doc (BCD-178)
* feat(customization): explain port mapping
parent eabb7d1b
# How to enable remote monitoring using JMX
The Java virtual machine (Java VM) has built-in instrumentation that enables you to monitor and manage it using the [Java Management Extensions (JMX) technology](http://www.oracle.com/technetwork/articles/javase/jmx-138825.html).
To enable and configure the ready-to-use JMX agent so that it can monitor and manage the Java VM of the Bonita container, certain system properties must be set and an additional port must be exposed.
## Adding JMX system properties
BCD enables you to set system properties to the Java VM through the `bonita_java_opts` variable. Hence JMX system properties must be set in your YAML scenario as in the following example:
```yaml
bonita_java_opts: >-
-Djava.awt.headless=true
-Xms1024m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:+UseConcMarkSweepGC
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.rmi.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname={{ ec2_public_dns_name | default(ansible_fqdn) }}
```
This example configures port `9010` as JMX remote port.
## Exposing additional ports
By default the Bonita container exposes ports **8080** (Tomcat HTTP port) and **5701** (Hazelcast cluster communication port) to the Docker host. Then BCD publish these 2 ports as follows:
- Port 8080 is always published and mapped to the host port defined by `bonita_port` variable
- Port 5701 is only mapped to the host port defined by `bonita_hazelcast_port` variable when `bonita_cluster_mode` is enabled
Additionally BCD enables you to publish extra ports through the `bonita_published_ports_extra` variable. Hence additional port mappings must be added to your YAML scenario as in the following example:
```yaml
bonita_published_ports_extra:
- "9020:9010"
```
As a result you can now connect monitoring tools like JConsole or Java VisualVM using the JMX URL `<bonita_docker_host_fqdn_or_ip>:9020`.
......@@ -67,6 +67,7 @@ Some parameters should be precised for Bonita. The corresponding Docker tar file
|bonita_db_admin_pass|N|mysecretpassword|Admin password on database instance|password|
|bonita_http_api|N|false|Activates the Bonita [HTTP API](https://documentation.bonitasoft.com/bonita/${bonitaDocVersion}/rest-api-authorization#toc9)|true|
|bonita_rest_api_dyn_auth_checks|N|true|Activates [dynamic authorization checking](https://documentation.bonitasoft.com/bonita/${bonitaDocVersion}/rest-api-authorization#toc2) on REST API|false|
|bonita_published_ports_extra|N|[]|A list of additional host-to-container port mappings (`<host_port>:<container_port>`) to publish|[ '9020:9010', '2222:1111' ]|
## Email notification
An email can be sent automatically with Bonita stack details at the end of the deployment phase. This feature uses [Ansible mail module](http://docs.ansible.com/ansible/latest/mail_module.html).
......
......@@ -4,9 +4,10 @@
* [AWS prerequisites](aws_prerequisites.md)
* [Licensing prerequisites](licensing_prerequisites.md)
* [Quick start](quickstart.md)
* [Bonita container custom initialization](_custom_init.md)
* [Bonita container customization](_custom_init.md)
* [Custom initialization overview](custom_init.md)
* [How to configure REST API authorization](how_to_configure_rest_api_authorization.md)
* [How to enable remote monitoring using JMX](how_to_enable_remote_monitoring_jmx.md)
* [AWS Single Sign-On](aws_sso.md)
* [Scenario variables reference](scenarios.md)
* [BCD Controller Docker image](_docker.md)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment