infinispan
Install Infinispan or Red Hat DataGrid server configurations.
Role Defaults
Service configuration defaults
Variable |
Description |
Default |
---|---|---|
|
Alternate port for the service |
|
|
Alternate port for the jgroups cluster |
|
|
Alternate port for the jgroups relaying cluster |
|
|
Alternate bind address for the daemon |
|
|
Enable cross-DC relaying |
|
|
List of site names for cross-DC relaying |
|
|
Site the inventory host is in when cross-DC is enabled |
|
|
Enable clustering using JDBC PING discovery |
|
|
Enable persitence datasource for keycloak caches |
|
|
posix account for the service installation |
|
|
posix group for the service installation |
|
|
Main logfile format: FILE or JSON-FILE |
|
|
Root logging level: TRACE, DEBUG, INFO, WARN, ERROR |
|
|
Enable additional audit.log logfile |
|
|
Enable additional hotrod-access.log |
|
|
Enable additional rest-access.log |
|
|
Max file size, triggers rotation |
|
|
Enable TLS server certificate |
|
|
Path to keystore containing server identity certificate |
|
|
Keystore password |
|
|
Alias for the certificate to load from keystore |
|
|
Key passphrase for TLS server identity |
|
|
Creates remote caches for keycloak |
|
|
RHEL java package runtime |
|
|
Install Red Hat DataGrid when true |
|
Download and install defaults
Variable |
Description |
Default |
---|---|---|
|
Perform an offline install |
|
|
DataGrid version to install |
|
|
Target extracted installation |
|
|
Archive name for Red Hat DataGrid |
|
|
Customer portal product ID for Red Hat DataGrid |
|
|
Customer portal base download URL |
|
|
Complete customer portal default URL for DataGrid, or alternate download location |
|
|
Infinispan version to install |
|
|
Archive name for Infinispan download |
|
|
Download URL for infinispan |
|
|
Specific unxtracted installation path for infinispan |
|
|
Relocatable install directory parent |
|
|
Check health of service at end of installation |
|
|
Alternate bind address for the daemon |
|
|
List of cache definitions to configure statically |
|
|
List of users to create |
|
|
Path of infinispan rest api |
|
Role Variables
The following are a set of required variables for the role:
Variable |
Description |
---|---|
|
Password for the administration console user account |
|
List of user definitions to create |
Sample user definition format:
infinispan_users:
- { name: 'testuser1', password: 'test', roles: 'observer' }
- { name: 'testuser2', password: 'test', roles: 'application' }
The following are required when jdg_jgroups_jdbcping
is enabled:
Variable |
Description |
Default |
---|---|---|
|
backend database engine (values: |
|
|
driver version to download |
|
|
URL for jdbc connection |
|
|
username for jdbc connection |
|
|
password for jdbc connection |
|
When setting up cross-DC relaying, also setup mariadb in active-active mode (ie. with galera cluster), and switch the JDBC to url to the sequential
scheme; similar configuration for other database engines.
Dependencies
The roles depends on the redhat_csp_download
role of middleware_automation.redhat_csp_download collection. To install, from the collection root directory, run:
ansible-galaxy collections install -r requirements.yml
Python lxml and jmespath libraries are needed on the host that executes this module. To install, from the collection root directory, run:
pip install -r requirements.txt
Example Playbook
The following is an example playbook that makes use of the role to install Infinispan
---
- hosts: ...
collections:
- middleware_automation.infinispan
tasks:
- name: Include Infinispan role
include_role:
name: infinispan
vars:
supervisor_password: "changeme"
infinispan_users: []
Choosing what to install
The role will install Red Hat DataGrid when the following variables are defined in the playbook execution:
rhn_username: '<customer portal account username>'
rhn_password: '<customer portal account password>'
and jdg_enable
is left to its default, or set to True
.
The default installed version will be the baseline 8.3 release; it is possible to install updates setting jdg_version
to 8.x.y
;
check what versions are available in the jdg_rhn_ids
dictionary keys, declared at variables
Offline installation
Performing an offline installation is possible by:
setting
jdg_offline_install
toTrue
making the file available to ansible controller, using as filename
jdg_bundle
ifjdg_enable
is True,infinispan_bundle
otherwise.
Keycloak integration
Enabling infinispan_keycloak_caches
will prepare the following caches in a dedicated cache container for remote keycloak access:
- sessions
- offlineSessions
- clientSessions
- offlineClientSessions
- loginFailures
- actionTokens
- work
for more details, refer to the: INSTALLATION AND CONFIGURATION GUIDE - 3.4.6. Infinispan caches
Deploying custom cache configurations
It is possible to deploy caches statically in the infinispan.xml server configuration, by populating the jdg_caches
list of dicts.
In case of clustered deployments, this configuration must be executed against all nodes in the cluster, as they are not propagated by the service.
To deploy cache configurations at runtime, refer to the infinispan_cache
role instead.
For more details, refer to:
How to configure caches
A cache configuration can be passed-in as an XML file or string, as it is generated by the infinispan server console; otherwise, it is possible to define configuration dicts, used to populate the available templates.
To pass XML directly, as string or with a file:
jdg_caches:
- cache_xml: >
<local-cache name="testcachexml" statistics="true">
<encoding media-type="application/x-protostream"/>
</local-cache>
- cache_xml: "{{ lookup('file', user_data_file) }}"
To configure caches:
jdg_caches:
- cache_config:
name: 'my-distributed-cache'
template: 'distribute-cache'
encoding: 'application/x-jboss-marshalling'
persistence: False
It is possible to mix and match the two configurations in the jdg_caches
list.
License
Apache License 2.0