Skip to content

Commit

Permalink
ISPN-13233 JSON and YAML config
Browse files Browse the repository at this point in the history
  • Loading branch information
oraNod authored and tristantarrant committed Sep 23, 2021
1 parent 187d847 commit 8859eab
Show file tree
Hide file tree
Showing 416 changed files with 792 additions and 988 deletions.
2 changes: 1 addition & 1 deletion documentation/pom.xml
Expand Up @@ -17,7 +17,7 @@

<properties>
<download.url>https://infinispan.org/download/</download.url>
<infinispan.tutorials>https://github.com/infinispan/infinispan-simple-tutorials/</infinispan.tutorials>
<infinispan.tutorials>https://infinispan.org/tutorials/simple/simple_tutorials.html</infinispan.tutorials>
<javadoc.root>https://docs.jboss.org/infinispan/${infinispan.base.version}/apidocs</javadoc.root>
<configdoc.root>https://docs.jboss.org/infinispan/${infinispan.base.version}/configdocs/</configdoc.root>
<wildfly.docroot>https://docs.jboss.org/author/display/WFLY11</wildfly.docroot>
Expand Down
21 changes: 9 additions & 12 deletions documentation/src/main/asciidoc/index.asciidoc
Expand Up @@ -8,7 +8,7 @@ Written and maintained by the {brandname} community
++++

[discrete]
== Get Up and Running
== Getting Started

[unstyled]
* link:titles/getting_started/getting_started.html[Getting Started with {brandname}]
Expand All @@ -28,6 +28,14 @@ Written and maintained by the {brandname} community
* link:titles/hotrod_java/hotrod_java.html[Hot Rod Java Client Guide]
* link:titles/hotrod_protocol/hotrod_protocol.html[Hot Rod Protocol Reference]

[discrete]
== Administrator

[unstyled]
* link:titles/upgrading/upgrading.html[Upgrading {brandname}]
* link:titles/security/security.html[Security]
* link:titles/tuning/tuning.html[Tuning {brandname} Performance]

[discrete]
== Developer

Expand All @@ -37,21 +45,10 @@ Written and maintained by the {brandname} community
* link:titles/encoding/encoding.html[Cache Encoding and Marshalling]
* link:titles/developing/developing.html[Developer's Guide]
* link:titles/xsite/xsite.html[Using Cross-Site Replication]
* link:titles/hotrod_java/hotrod_java.html[Hot Rod Java Client Guide]
* link:titles/hotrod_protocol/hotrod_protocol.html[Hot Rod Protocol Reference]
* link:titles/rest/rest.html[REST API]
* link:titles/hibernate/hibernate.html[Hibernate Second-Level Cache (2LC)]
* link:titles/spring/spring.html[Spring Cache and Spring Sessions]
* link:titles/spring_boot/starter.html[Spring Boot Starter]

[discrete]
== Administrator

[unstyled]
* link:titles/upgrading/upgrading.html[Upgrading {brandname}]
* link:titles/security/security.html[Security]
* link:titles/tuning/tuning.html[Performance Tuning]

[discrete]
== Additional Resources

Expand Down
@@ -0,0 +1,22 @@
[id='cache-configuration']
:context: cache-configuration
= {brandname} cache configuration

Cache configuration controls how {brandname} stores your data.

As part of your cache configuration, you declare the cache mode you want to use.
For instance, you can configure {brandname} clusters to use replicated caches or distributed caches.

Your configuration also defines the characteristics of your caches and enables the {brandname} capabilities that you want to use when handling data.
For instance, you can configure how {brandname} encodes entries in your caches, whether replication requests happen synchronously or asynchronously between nodes, if entries are mortal or immortal, and so on.

include::{topics}/con_declarative_cache_configuration.adoc[leveloffset=+1]
include::{topics}/ref_infinispan_caches.adoc[leveloffset=+2]
include::{topics}/proc_adding_cache_configuration_templates.adoc[leveloffset=+1]
include::{topics}/con_cache_template_inheritance.adoc[leveloffset=+2]
include::{topics}/con_cache_template_wildcards.adoc[leveloffset=+2]
include::{topics}/con_cache_template_xinclude.adoc[leveloffset=+2]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]

This file was deleted.

@@ -1,7 +1,7 @@
ifdef::context[:parent-context: {context}]
[id='mvn']
:context: install
= Configuring the {brandname} Maven Repository
[id='configuring-maven-repository']
:context: configuring-maven-repository
= Configuring the {brandname} Maven repository
{brandname} Java distributions are available from Maven.

//Community content
Expand Down
@@ -0,0 +1,24 @@
[id='statistics-jmx']
:context: statistics-jmx
= Enabling and configuring {brandname} statistics and JMX monitoring

{brandname} can provide Cache Manager and cache statistics as well as export JMX MBeans.

ifdef::embedded_caches[]
include::{topics}/proc_enabling_statistics_embedded.adoc[leveloffset=+1]
endif::embedded_caches[]

ifdef::remote_caches[]
include::{topics}/proc_enabling_statistics_remote.adoc[leveloffset=+1]
include::{topics}/proc_enabling_hotrod_client_statistics.adoc[leveloffset=+1]
endif::remote_caches[]

include::{topics}/proc_configuring_metrics.adoc[leveloffset=+1]
include::{topics}/proc_enabling_jmx.adoc[leveloffset=+1]
include::{topics}/proc_enabling_jmx_port.adoc[leveloffset=+2]
include::{topics}/ref_jmx_mbeans.adoc[leveloffset=+2]
include::{topics}/proc_registering_jmx_mbean_servers.adoc[leveloffset=+2]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
@@ -0,0 +1,12 @@
[id='creating-embedded-caches']
:context: creating-embedded-caches
= Creating embedded caches

{brandname} provides an `EmbeddedCacheManager` API that lets you control both the Cache Manager and embedded cache lifecycles programmatically.

include::{topics}/proc_installing_embedded.adoc[leveloffset=+1]
include::{topics}/proc_creating_caches_embedded.adoc[leveloffset=+1]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
@@ -1,22 +1,20 @@
[id='create_remote_cache']
:context: server
= Remotely Creating {brandname} Caches
Add caches to {brandname} Server so you can store data.
[id='creating-remote-caches']
:context: creating-remote-caches
= Creating remote caches

include::{topics}/con_remote_cache.adoc[leveloffset=+1]
include::{topics}/ref_default_cm_remote.adoc[leveloffset=+1]
When you create remote caches at runtime, {brandname} Server synchronizes your configuration across the cluster so that all nodes have a copy.
For this reason you should always create remote caches dynamically with the following mechanisms:

//Console
* {brandname} Console
* {brandname} Command Line Interface (CLI)
* Hot Rod or HTTP clients
include::{topics}/con_default_cache_manager.adoc[leveloffset=+1]
include::{topics}/proc_creating_caches_console.adoc[leveloffset=+1]
//CLI
include::{topics}/proc_creating_caches_cli.adoc[leveloffset=+1]
//Hot Rod
include::{topics}/proc_creating_caches_hotrod.adoc[leveloffset=+1]
//REST
include::{topics}/proc_creating_caches_rest.adoc[leveloffset=+1]

include::{topics}/ref_infinispan_caches.adoc[leveloffset=+1]

// Restore the parent context.
ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
14 changes: 0 additions & 14 deletions documentation/src/main/asciidoc/stories/assembly_embedding.adoc

This file was deleted.

Expand Up @@ -12,7 +12,7 @@ include::{topics}/ref_endpoints_hotrod_authentication.adoc[leveloffset=+1]
include::{topics}/proc_configuring_hotrod_authentication.adoc[leveloffset=+2]
include::{topics}/proc_creating_hotrod_client_logincontexts.adoc[leveloffset=+2]
include::{topics}/proc_configuring_hotrod_encryption.adoc[leveloffset=+1]
include::{topics}/proc_configuring_hotrod_jmx.adoc[leveloffset=+1]
include::{topics}/proc_enabling_hotrod_client_statistics.adoc[leveloffset=+1]
//Near caching
include::{topics}/con_near_caches.adoc[leveloffset=+1]
include::{topics}/proc_configuring_hotrod_nearcaching.adoc[leveloffset=+2]
Expand Down

This file was deleted.

Expand Up @@ -6,7 +6,7 @@ Configure your project with `application.properties` or `application.yaml`.

[source,text,options="nowrap"]
----
include::{topics}/config_examples/application.properties[]
include::{topics}/properties/application.properties[]
----

// Restore the parent context.
Expand Down
17 changes: 0 additions & 17 deletions documentation/src/main/asciidoc/stories/assembly_statistics.adoc

This file was deleted.

@@ -1,23 +1,13 @@
[id='xsite_monitoring']
:context: xsite
= Monitoring and Troubleshooting Global {brandname} Clusters
{brandname} provides statistics for cross-site replication operations via JMX
or the `/metrics` endpoint for {brandname} server.

Cross-site replication statistics are available at cache level so you must
explicitly enable statistics for your caches. Likewise, if you want to collect
statistics via JMX you must configure {brandname} to register MBeans.
{brandname} provides cache-level statistics for cross-site replication operations via JMX or the `/metrics` endpoint for {brandname} Server.

{brandname} also includes an `org.infinispan.XSITE` logging category so you can
monitor and troubleshoot common issues with networking and state transfer
operations.

include::{topics}/proc_enabling_statistics.adoc[leveloffset=+1]
include::{topics}/proc_configuring_metrics.adoc[leveloffset=+1]
include::{topics}/proc_collecting_metrics.adoc[leveloffset=+2]
include::{topics}/proc_enabling_jmx.adoc[leveloffset=+1]
include::{topics}/ref_jmx_xsite_components.adoc[leveloffset=+2]

include::{topics}/ref_jmx_xsite_components.adoc[leveloffset=+1]
include::{topics}/proc_troubleshooting_xsite.adoc[leveloffset=+1]
include::{topics}/ref_logs_xsite.adoc[leveloffset=+2]

Expand Down
Expand Up @@ -12,6 +12,13 @@ include::../{topics}/attributes/community-attributes.adoc[]
:toclevels: 3
:numbered:
:stem: asciimath
:context: configuration

//
// Conditional statements
//
:remote_caches:
:embedded_caches:

//Title
= Configuring {brandname} {infinispanversion}
Expand Down
12 changes: 7 additions & 5 deletions documentation/src/main/asciidoc/titles/configuring/stories.adoc
Expand Up @@ -2,12 +2,14 @@
//Please review authoring guidelines in the Contributors Guide.

include::{stories}/assembly_cache_modes.adoc[leveloffset=+1]
include::{stories}/assembly_cache_local.adoc[leveloffset=+1]
include::{stories}/assembly_cache_clustered.adoc[leveloffset=+1]
include::{stories}/assembly_cache_clustered_async.adoc[leveloffset=+2]
include::{stories}/assembly_configuration.adoc[leveloffset=+1]
include::{stories}/assembly_cache_local.adoc[leveloffset=+2]
include::{stories}/assembly_cache_clustered.adoc[leveloffset=+2]
include::{stories}/assembly_cache_clustered_async.adoc[leveloffset=+3]
include::{stories}/assembly_cache_configuration.adoc[leveloffset=+1]
include::{stories}/assembly_creating_remote_caches.adoc[leveloffset=+2]
include::{stories}/assembly_creating_embedded_caches.adoc[leveloffset=+2]
include::{stories}/assembly_configuring_statistics_jmx.adoc[leveloffset=+1]
include::{stories}/assembly_configuring_data_container.adoc[leveloffset=+1]
include::{stories}/assembly_statistics.adoc[leveloffset=+1]
include::{stories}/assembly_persistence.adoc[leveloffset=+1]
include::{stories}/assembly_creating_custom_cache_stores.adoc[leveloffset=+2]
include::{stories}/assembly_migrating_cache_stores.adoc[leveloffset=+2]
Expand Down
@@ -1,5 +1,7 @@
//Reference user stories or topics.
//Please review authoring guidelines in the Contributors Guide.

include::{stories}/assembly_embedding.adoc[leveloffset=+1]
include::{stories}/assembly_configuring_maven_repository.adoc[leveloffset=+1]
include::{stories}/assembly_creating_embedded_caches.adoc[leveloffset=+1]
include::{stories}/assembly_configuring_statistics_jmx.adoc[leveloffset=+1]
include::{stories}/assembly_setting_up_clusters.adoc[leveloffset=+1]
4 changes: 2 additions & 2 deletions documentation/src/main/asciidoc/titles/server/stories.adoc
Expand Up @@ -2,6 +2,7 @@
//Please review authoring guidelines in the Contributors Guide.

include::{stories}/assembly_server_getting_started.adoc[leveloffset=+1]
include::{stories}/assembly_creating_remote_caches.adoc[leveloffset=+1]
include::{stories}/assembly_server_interfaces_endpoints.adoc[leveloffset=+1]
include::{stories}/assembly_server_security_realms.adoc[leveloffset=+1]
include::{stories}/assembly_server_authentication.adoc[leveloffset=+1]
Expand All @@ -11,11 +12,10 @@ include::{stories}/assembly_server_credential_keystores.adoc[leveloffset=+1]
include::{stories}/assembly_server_endpoint_ipfilter.adoc[leveloffset=+1]
include::{stories}/assembly_authorization.adoc[leveloffset=+1]
include::{stories}/assembly_setting_up_clusters.adoc[leveloffset=+1]
include::{stories}/assembly_creating_remote_caches.adoc[leveloffset=+1]
include::{stories}/assembly_server_datasources.adoc[leveloffset=+1]
include::{stories}/assembly_server_remote_execution.adoc[leveloffset=+1]
include::{stories}/assembly_server_logging.adoc[leveloffset=+1]
include::{stories}/assembly_server_statistics.adoc[leveloffset=+1]
include::{stories}/assembly_configuring_statistics_jmx.adoc[leveloffset=+1]
include::{stories}/assembly_server_health.adoc[leveloffset=+1]
include::{stories}/assembly_server_rolling_upgrades.adoc[leveloffset=+1]
include::{stories}/assembly_server_patching.adoc[leveloffset=+1]
Expand Down
Expand Up @@ -17,6 +17,7 @@
// Special characters
//
:plusplus: ++
:hash: #
:underscores: ___

//
Expand All @@ -26,6 +27,12 @@
:server_root: ${infinispan.server.root}
:server_config: ${infinispan.server.configuration}

//
// Hot Rod clients
//
:hr_dotnet:
:hr_cpp: C{plusplus}

//
// Operator
//
Expand Down
@@ -0,0 +1 @@
$ bin/cli.sh user create myuser -p changeme -g admin
@@ -1 +1 @@
$ bin/cli.sh user create myuser -p "qwer1234!"
$ bin/cli.sh user create admin -p changeme
@@ -1 +1 @@
$ bin\cli.bat user create myuser -p "qwer1234!"
$ bin\cli.bat user create admin -p changeme
@@ -0,0 +1,9 @@
// Set up a clustered Cache Manager.
GlobalConfigurationBuilder global = GlobalConfigurationBuilder.defaultClusteredBuilder();
// Initialize the default Cache Manager.
DefaultCacheManager cacheManager = new DefaultCacheManager(global.build());
// Create an embedded cache configuration.
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.DIST_SYNC);
// Obtain a volatile cache.
Cache<String, String> cache = cacheManager.administration().withFlags(CacheContainerAdmin.AdminFlag.VOLATILE).getOrCreateCache("myCache", builder.build());
@@ -1,6 +1,6 @@
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.statistics().enable()
//Register JMX MBeans for RemoteCacheManager and each RemoteCache.
//Register JMX MBeans for the Cache Manager and remote caches.
.jmxEnable()
//Set the JMX domain name to which MBeans are exposed.
.jmxDomain("org.example")
Expand Down
@@ -0,0 +1,3 @@
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder()
.jmx().enable().mBeanServerLookup(new com.acme.MyMBeanServerLookup())
.build();

0 comments on commit 8859eab

Please sign in to comment.